fimopatassou Posted April 10, 2012 at 11:17 PM Posted April 10, 2012 at 11:17 PM 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 Quote
borg Posted April 11, 2012 at 12:58 PM Posted April 11, 2012 at 12:58 PM Unortunately we still have 10.6.8 on the Mac we are using for testing. We expect hat the problems have something to do with 10.7, you are not the only one with problems there. I am currently updating our MacBook, i will report back as soon as i know more! Quote
borg Posted April 11, 2012 at 05:29 PM Posted April 11, 2012 at 05:29 PM 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! Quote
borg Posted April 11, 2012 at 05:45 PM Posted April 11, 2012 at 05:45 PM Alright, new version is up: http://download.tinkerforge.com/tools/brickd/macos/ please report if it is working! Quote
fimopatassou Posted April 11, 2012 at 08:36 PM Author Posted April 11, 2012 at 08:36 PM 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. Might be a problem in the installation package? Or do I need to uninstall before installing the newer version of brickd? Quote
borg Posted April 11, 2012 at 08:51 PM Posted April 11, 2012 at 08:51 PM Thats confusing. Did you remove brickd.log before you started brickd again? The error really shouldn't be there anymore, perhaps it is still a log from the earlier tries? Have you tried to start it with launchctl? sudo launchctl start com.tinkerforge.brickd Quote
fimopatassou Posted April 11, 2012 at 09:00 PM Author Posted April 11, 2012 at 09:00 PM 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$ Quote
fimopatassou Posted April 11, 2012 at 09:11 PM Author Posted April 11, 2012 at 09:11 PM regarding the installed version of brickd: I found the app in /usr/libexec/brickd.app Finder says it is version 1.0.3 All files within the app directory have a current timestamp --> installation seems to be fine... Quote
borg Posted April 11, 2012 at 09:49 PM Posted April 11, 2012 at 09:49 PM OK, interesting. Thank you for the help, will look into that tomorrow again. I probably will have to set up a fresh OS X install in a VM for that, something fishy is going on, because it works here . Quote
fimopatassou Posted April 12, 2012 at 09:24 PM Author Posted April 12, 2012 at 09:24 PM 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? Quote
borg Posted April 13, 2012 at 02:46 PM Posted April 13, 2012 at 02:46 PM 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. Quote
fimopatassou Posted April 13, 2012 at 09:00 PM Author Posted April 13, 2012 at 09:00 PM 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. Quote
borg Posted April 13, 2012 at 09:50 PM Posted April 13, 2012 at 09:50 PM I see. If that is the case everything should be alright now. As someone that doesn't use OS X normally it is quite hard to find good documentation about this low level stuff and how to use it. Also, the whole thing did work on 1.6.x! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.