Jump to content

[resolved] Mac OS: brickd fails


fimopatassou

Recommended Posts

Hi,

 

I just downloaded brickd & brickv for Mac OS.

 

brickd won't start. In /var/log/brickd.log:

 

The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().

Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.

 

Mac OS 10.7.3

 

 

Can you please help... Thanks and regards

 

fimopatassou

 

Link zu diesem Kommentar
Share on other sites

Phew! After the update to 10.7 brickd did indeed not work anymore. But we already found the problem. On OS X 10.7 the standard unix double fork trick (to make daemons) does't work anymore if some core libraries are already included. Totally weird if you ask me.

 

We should be able to upload a fixed version shortly!

Link zu diesem Kommentar
Share on other sites

Thank you for the really fast fix...

 

I downloaded both "brickd_1.0.3.dmg" and "brickd_latest.dmg". Installation completed successfully, but brickd was still not running, with the same error message in /var/log/brickd.log ("The process has forked and you cannot....")

 

Then, I downloaded the source and was able to start brickd with

 

    sudo python brickd_macosx.py

 

After this, Brick Viewer could connect to brickd. ;D

Might be a problem in the installation package? Or do I need to uninstall before installing the newer version of brickd?

 

 

Link zu diesem Kommentar
Share on other sites

yes, I did all of that (and repeated it now). Is there a way to check which version of brickd is currently installed on my system?

 

 

macintosh-2:brickd christian$ ps -ef |grep brickd

    0  2851    1  0 10:28pm ??        0:00.23 python brickd_macosx.py

  501  2891  320  0 10:53pm ttys000    0:00.00 grep brickd

macintosh-2:brickd christian$ sudo kill 2851

Password:

macintosh-2:brickd christian$ rm /var/log/brickd.log

rm: /var/log/brickd.log: Permission denied

macintosh-2:brickd christian$ sudo rm /var/log/brickd.log

macintosh-2:brickd christian$ sudo launchctl start com.tinkerforge.brickd

macintosh-2:brickd christian$ ps -ef |grep brickd

  501  2907  320  0 10:54pm ttys000    0:00.00 grep brickd

macintosh-2:brickd christian$ cat /var/log/brickd.log

The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().

Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.

The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().

Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.

The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().

Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.

The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().

Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.

The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().

Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.

The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().

Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.

macintosh-2:brickd christian$

 

Link zu diesem Kommentar
Share on other sites

I double checked the installed files in /usr/libexec, and brickd_macosx.py is exactly the same file as the downloaded source.

==> installation package is fine and correctly installed.

 

 

Then I downloaded the source files of brickd1.0.2, and I am able to start brickd with

 

sudo python brickd_macosx.py

 

It still fails when started with

 

sudo launchctl start com.tinkerforge.brickd

(Version 1.0.2 and 1.0.3)

 

==> The problem appears only when started via launchctl, independent of the fix you provided yesterday

 

Is there any further analysis I can perform? Logging etc?

 

Link zu diesem Kommentar
Share on other sites

Alright! New version is online: I managed to reproduce the problem but i did not manage to understand it unfortunately. For now i just removed the unix double fork magic completely, so the process is not running as a "real daemon". But it does work now.

 

http://download.tinkerforge.com/tools/brickd/macos/

 

Sorry for the problems.

Link zu diesem Kommentar
Share on other sites

works fine now!

 

Thank you for the excellent support.

 

In my understanding, use of "fork" is unnecessary / forbidden when using Mac OS' launchctl/launchd, so I believe the current implementation is totally correct. Seems that starting a process via launchctl makes it a "real daemon" by definition.

 

Link zu diesem Kommentar
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Gast
Reply to this topic...

×   Du hast formatierten Text eingefügt.   Formatierung jetzt entfernen

  Only 75 emoji are allowed.

×   Dein Link wurde automatisch eingebettet.   Einbetten rückgängig machen und als Link darstellen

×   Dein vorheriger Inhalt wurde wiederhergestellt.   Clear editor

×   Du kannst Bilder nicht direkt einfügen. Lade Bilder hoch oder lade sie von einer URL.

×
×
  • Neu erstellen...