[R-SIG-Mac] R segfault at startup, causing R crash

Brandon Hurr brandon.hurr at gmail.com
Sun Nov 6 02:05:33 CET 2016


Upgrade to 3.3.2 does not change the segfault on loading.

R version 3.3.2 (2016-10-31)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: macOS Sierra 10.12.1

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base


Brandons-iMac:~ brandonhurr$  /usr/bin/lldb -w -n R
(lldb) process attach --name "R" --waitfor
Process 2070 stopped
* thread #1: tid = 0x12a32, 0x00007fff8cd41ad6
libsystem_kernel.dylib`__open + 10, queue = 'com.apple.main-thread', stop
reason = signal SIGSTOP
    frame #0: 0x00007fff8cd41ad6 libsystem_kernel.dylib`__open + 10
libsystem_kernel.dylib`__open:
->  0x7fff8cd41ad6 <+10>: jae    0x7fff8cd41ae0            ; <+20>
    0x7fff8cd41ad8 <+12>: movq   %rax, %rdi
    0x7fff8cd41adb <+15>: jmp    0x7fff8cd3ad94            ; cerror
    0x7fff8cd41ae0 <+20>: retq

Executable module set to "/Applications/R.app/Contents/MacOS/R".
Architecture set to: x86_64h-apple-macosx.
(lldb) c
Process 2070 resuming

On Sat, Nov 5, 2016 at 5:52 PM, Brandon Hurr <brandon.hurr at gmail.com> wrote:

> I have also had this issue since upgrading. Recently it's got so bad that
> I just hit escape and continue working while saving my script as often as I
> can remember in hopes that it doesn't freeze completely.
>
> I deleted my script history as mentioned and indeed it prevented it from
> coming up with the error until I opened about 3 files and then it started
> again.
>
> As Kevin suggested I opened it with libd and recorded the following. When
> it loaded with libd it caught something and loaded R normally without an
> error. I opened the same file and it "crashed" again. I reopened with libd
> and it caught another similar error (below).
>
> Brandons-iMac:~ brandonhurr$  /usr/bin/lldb -w -n R
> (lldb) process attach --name "R" --waitfor
> Process 1439 stopped
> * thread #1: tid = 0xf4c6, 0x000000011bb96ef6 dyld`ImageLoaderMachO::libPath(unsigned
> int) const + 118, queue = 'com.apple.main-thread', stop reason = signal
> SIGSTOP
>     frame #0: 0x000000011bb96ef6 dyld`ImageLoaderMachO::libPath(unsigned
> int) const + 118
> dyld`ImageLoaderMachO::libPath:
> ->  0x11bb96ef6 <+118>: movl   0x8(%rdx), %eax
>     0x11bb96ef9 <+121>: addq   %rdx, %rax
>     0x11bb96efc <+124>: addq   $0x8, %rsp
>     0x11bb96f00 <+128>: popq   %rbx
>
> Executable module set to "/Applications/R.app/Contents/MacOS/R".
> Architecture set to: x86_64h-apple-macosx.
> (lldb) c
> Process 1439 resuming
>
> #### second time
> Brandons-iMac:~ brandonhurr$  /usr/bin/lldb -w -n R
> (lldb) process attach --name "R" --waitfor
> Process 1467 stopped
> * thread #1: tid = 0xfa9f, 0x00007fff8c32a401 libobjc.A.dylib`objc_opt::
> objc_clsopt_t::getClassAndHeader(char const*, void*&, void*&) const + 49,
> queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
>     frame #0: 0x00007fff8c32a401 libobjc.A.dylib`objc_opt::objc_clsopt_t::getClassAndHeader(char
> const*, void*&, void*&) const + 49
> libobjc.A.dylib`objc_opt::objc_clsopt_t::getClassAndHeader:
> ->  0x7fff8c32a401 <+49>: movslq 0x420(%rax,%rcx,8), %rax
>     0x7fff8c32a409 <+57>: testb  $0x1, %al
>     0x7fff8c32a40b <+59>: jne    0x7fff8c32a43f            ; <+111>
>     0x7fff8c32a40d <+61>: leaq   0x420(%rsi,%rdx,4), %rdx
>
> Executable module set to "/Applications/R.app/Contents/MacOS/R".
> Architecture set to: x86_64h-apple-macosx.
> (lldb) c
> Process 1467 resuming
>
> #### third time
> Brandons-iMac:~ brandonhurr$  /usr/bin/lldb -w -n R
> (lldb) process attach --name "R" --waitfor
> Process 1486 stopped
> * thread #1: tid = 0xfd29, 0x000000010f4dc429 dyld`strrchr, queue =
> 'com.apple.main-thread', stop reason = signal SIGSTOP
>     frame #0: 0x000000010f4dc429 dyld`strrchr
> dyld`strrchr:
> ->  0x10f4dc429 <+0>: pushq  %rbp
>     0x10f4dc42a <+1>: movq   %rsp, %rbp
>     0x10f4dc42d <+4>: movsbl %sil, %ecx
>     0x10f4dc431 <+8>: xorl   %eax, %eax
>
> Executable module set to "/Applications/R.app/Contents/MacOS/R".
> Architecture set to: x86_64h-apple-macosx.
> (lldb) c
> Process 1486 resuming
>
>
> I hope that is helpful.
>
> B
>
> P.S. I will upgrade to 3.3.2 shortly so this may be resolved with that.
>
>
> On Sat, Nov 5, 2016 at 5:08 PM, Kevin Ushey <kevinushey at gmail.com> wrote:
>
>> /usr/bin/lldb -w -n R
>
>
>
>

	[[alternative HTML version deleted]]



More information about the R-SIG-Mac mailing list