[R-SIG-Mac] Forking issues in Mavericks
Simon Urbanek
simon.urbanek at r-project.org
Wed Oct 30 22:57:44 CET 2013
On Oct 30, 2013, at 5:45 PM, Jeroen Ooms <jeroen.ooms at stat.ucla.edu> wrote:
> On Wed, Oct 30, 2013 at 1:41 PM, Simon Urbanek
> <simon.urbanek at r-project.org> wrote:
>> Jeroen,
>>
>> actually, it works just fine for me on 10.9 (with CRAN build of R):
>
> Hmm interesting. Here is a clip of what happens on my machine:
> http://youtu.be/GAtKa6P75Qs. Note that it shows the error messages
> from the child proc, but afterwards the parent process is also broken.
> I think it is no longer allowed to use fork() or exec().
>
> This mac is an almost completely blank installation of Mavericks. I
> formatted and did a recovery of 10.8 before updating to 10.9.
> Afterwards installed R.app and xquarts. Other than that almost
> everything on the machine is factory settings.
>
Ah, you're running it in R.app? That less likely to work, because R.app is fully in CF by being an app, so anything that touches the event loop will die. R itself is trying to avoid that by disabling the EL calls in children, but libraries may not know.
Anyway, my hunch was correct - it's libcurl crashing in SSL trying to use CF. There must be some code that is conditional in running in an app, so it thinks it's ok to use CF which fails (see below). A way around could be compiling static libcurl against openssl so it doesn't uses the system one.
* thread #1: tid = 0x11e139, 0x00007fff83381206 libdispatch.dylib`_dispatch_wakeup + 100, queue = 'com.apple.main-thread, stop reason = EXC_BAD_ACCESS (code=1, address=0x110)
frame #0: 0x00007fff83381206 libdispatch.dylib`_dispatch_wakeup + 100
frame #1: 0x00007fff833817a8 libdispatch.dylib`_dispatch_queue_push_list_slow2 + 30
frame #2: 0x00007fff83384145 libdispatch.dylib`_dispatch_mach_msg_send + 608
frame #3: 0x00007fff83383e99 libdispatch.dylib`dispatch_mach_send + 136
frame #4: 0x00007fff8198a864 libxpc.dylib`_xpc_connection_send_message_with_reply_f + 125
frame #5: 0x00007fff8198a724 libxpc.dylib`xpc_connection_send_message_with_reply_sync + 180
frame #6: 0x00007fff8c8cc193 CoreFoundation`-[CFPrefsPlistSource copyReplyForDaemonMessage:toConnection:error:] + 243
frame #7: 0x00007fff8ca26820 CoreFoundation`__47-[CFPrefsPlistSource alreadylocked_synchronize]_block_invoke_2 + 352
frame #8: 0x00007fff8c8cba9b CoreFoundation`withDaemonConnection + 299
frame #9: 0x00007fff8c8cb4fb CoreFoundation`-[CFPrefsPlistSource alreadylocked_synchronize] + 587
frame #10: 0x00007fff8c8cb1f3 CoreFoundation`_copyValueForKey + 131
frame #11: 0x00007fff8c8cb147 CoreFoundation`-[CFPrefsPlistSource copyValueForKey:] + 71
frame #12: 0x00007fff8c8f3730 CoreFoundation`___CFPreferencesCopyValueWithContainer_block_invoke + 32
frame #13: 0x00007fff8c8ca097 CoreFoundation`+[CFPrefsSource withSourceForIdentifier:user:byHost:container:perform:] + 839
frame #14: 0x00007fff8c8f36c7 CoreFoundation`_CFPreferencesCopyValueWithContainer + 231
frame #15: 0x00007fff85c7e3de Security`_SSLContextReadDefault + 46
frame #16: 0x00007fff8d52d8d6 libsystem_pthread.dylib`__pthread_once_handler + 65
frame #17: 0x00007fff884b5156 libsystem_platform.dylib`_os_once + 73
frame #18: 0x00007fff8d52d875 libsystem_pthread.dylib`pthread_once + 57
frame #19: 0x00007fff85c7cec5 Security`SSLCreateContextWithRecordFuncs + 329
frame #20: 0x00007fff85c7cd3f Security`SSLCreateContext + 25
frame #21: 0x00007fff867a8fe4 libcurl.4.dylib`darwinssl_connect_common + 443
frame #22: 0x00007fff8679a18c libcurl.4.dylib`Curl_ssl_connect_nonblocking + 36
frame #23: 0x00007fff86778134 libcurl.4.dylib`Curl_http_connect + 77
frame #24: 0x00007fff867847da libcurl.4.dylib`Curl_protocol_connect + 129
frame #25: 0x00007fff867953cb libcurl.4.dylib`multi_runsingle + 840
frame #26: 0x00007fff86794fd1 libcurl.4.dylib`curl_multi_perform + 166
frame #27: 0x00007fff8678e944 libcurl.4.dylib`curl_easy_perform + 244
frame #28: 0x000000010069a18a RCurl.so`R_curl_easy_perform(handle=0x0000000102ce6000, opts=0x0000000104026ca0, isProtected=0x000000010090a848, encoding=0x000000010087f000) + 106 at curl.c:93
More information about the R-SIG-Mac
mailing list