[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ASAN:DEADLYSIGNAL
From: |
Ben Abbott |
Subject: |
Re: ASAN:DEADLYSIGNAL |
Date: |
Tue, 21 Jun 2016 18:09:27 -0400 |
> On Jun 20, 2016, at 8:10 PM, Ben Abbott <address@hidden> wrote:
>
>> On Jun 20, 2016, at 8:07 PM, Ben Abbott <address@hidden> wrote:
>>
>>> On Jun 20, 2016, at 8:04 PM, Ben Abbott <address@hidden> wrote:
>>>
>>>> On Jun 20, 2016, at 4:42 PM, Dmitri A. Sergatskov <address@hidden> wrote:
>>>>
>>>> On Mon, Jun 20, 2016 at 1:44 PM, Ben Abbott <address@hidden> wrote:
>>>> On Jun 20, 2016, at 09:43, Dmitri A. Sergatskov <address@hidden> wrote:
>>>>
>>>>> On Mon, Jun 20, 2016 at 7:21 AM, Ben Abbott <address@hidden> wrote:
>>>>>>
>>>>>> I’m using Apple’s clang and did hot set -fsanitize. I do not know if
>>>>>> other libraries did or if Apple uses -fsanitize by default.
>>>>>>
>>>>>> Ben
>>>>>
>>>>> Dmitri,
>>>>>
>>>>> Are you suggesting that this is a essentially an ABI problem? Maybe a
>>>>> problem between Apple’s clang and a library built with gcc?
>>>>>
>>>>> No. I have no idea is what is going on. But in both cases the error
>>>>> happens when you are building documentation. The octave binary should be
>>>>> built but that time, so you should be able to run
>>>>> it and experiment with it.
>>>>
>>>> I'm unable to run either the gui or cli.
>>>>
>>>> ./run-octave --norc
>>>>
>>>> GEN doc/interpreter/voronoi.txt
>>>> ASAN:DEADLYSIGNAL
>>>> =================================================================
>>>> ==68284==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000040
>>>> (pc 0x7fff8d3994cd bp 0x7fff51568360 sp 0x7fff515682e0 T0)
>>>>
>>>> I seem to remember that mac used to have "dtrace" utility. If ti still
>>>> does, you can do
>>>> dtrace ./run-octave -norc
>>>> (there should be some flags to control verbosity)
>>>> and see where it breaks.
>>>
>>> Things have changed on MacOS X. However, it turned out to be fairly simple
>>> to modify ./run-octave to use the lldb debugger (“gdb —args” -> “lldb —“).
>>> Then “./run-octave -g” put me into the clang debugger.
>>>
>>> (lldb) run
>>> Process 66739 launched:
>>> '/Users/bpabbott/Development/mercurial/default/sources/src/octave' (x86_64)
>>> ASAN:DEADLYSIGNAL
>>> =================================================================
>>> ==66749==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000040
>>> (pc 0x7fff8d3994cd bp 0x7fff5fbfcb40 sp 0x7fff5fbfcac0 T0)
>>> #0 0x7fff8d3994cc in _pthread_mutex_lock (libsystem_pthread.dylib+0x14cc)
>>> #1 0x7fff92277be5 in closedir (libsystem_c.dylib+0x25be5)
>>> #2 0x1027ce418 in
>>> octave::sys::dir_entry::open(std::__1::basic_string<char,
>>> std::__1::char_traits<char>, std::__1::allocator<char> > const&)
>>> dir-ops.cc:92
>>> #3 0x1019da729 in
>>> octave::sys::dir_entry::dir_entry(std::__1::basic_string<char,
>>> std::__1::char_traits<char>, std::__1::allocator<char> > const&)
>>> dir-ops.h:46
>>> #4 0x1016f177c in genpath(std::__1::basic_string<char,
>>> std::__1::char_traits<char>, std::__1::allocator<char> > const&,
>>> string_vector const&) load-path.cc:2146
>>> #5 0x101545021 in set_image_path(std::__1::basic_string<char,
>>> std::__1::char_traits<char>, std::__1::allocator<char> > const&)
>>> defaults.cc:301
>>> #6 0x10154625f in install_defaults() defaults.cc:455
>>> #7 0x10000171d in main main-gui.cc:102
>>> #8 0x7fff875c95c8 in start (libdyld.dylib+0x35c8)
>>> #9 0x7 (octave-gui)+0x7)
>>>
>>> AddressSanitizer can not provide additional info.
>>> SUMMARY: AddressSanitizer: SEGV (libsystem_pthread.dylib+0x14cc) in
>>> _pthread_mutex_lock
>>> ==66749==ABORTING
>>> Process 66739 exited with status = 0 (0x00000000)
>>>
>>> I’m not familiar with Octave’s startup process. Does anyone see something
>>> indicative the the problem?
>>>
>>> Ben
>>
>> With “./run-octave -g —no-gui” I get …
>>
>> (lldb) run
>> Process 67054 launched:
>> '/Users/bpabbott/Development/mercurial/default/sources/src/octave' (x86_64)
>> Process 67054 stopped
>> * thread #1: tid = 0x8ffa1a, 0x00007fff5fc01000 dyld`_dyld_start, stop
>> reason = exec
>> frame #0: 0x00007fff5fc01000 dyld`_dyld_start
>> dyld`_dyld_start:
>> -> 0x7fff5fc01000 <+0>: popq %rdi
>> 0x7fff5fc01001 <+1>: pushq $0x0
>> 0x7fff5fc01003 <+3>: movq %rsp, %rbp
>> 0x7fff5fc01006 <+6>: andq $-0x10, %rsp
>>
>> Ben
>
> Opps. Wasn’t done yet.
>
> (lldb) run
> Process 67189 launched:
> '/Users/bpabbott/Development/mercurial/default/sources/src/octave' (x86_64)
> Process 67189 stopped
> * thread #1: tid = 0x8fff4f, 0x00007fff5fc01000 dyld`_dyld_start, stop reason
> = exec
> frame #0: 0x00007fff5fc01000 dyld`_dyld_start
> dyld`_dyld_start:
> -> 0x7fff5fc01000 <+0>: popq %rdi
> 0x7fff5fc01001 <+1>: pushq $0x0
> 0x7fff5fc01003 <+3>: movq %rsp, %rbp
> 0x7fff5fc01006 <+6>: andq $-0x10, %rsp
> (lldb) continue
> Process 67189 resuming
> Process 67189 stopped
> * thread #1: tid = 0x8fff4f, 0x00007fff5fc01000 dyld`_dyld_start, stop reason
> = exec
> frame #0: 0x00007fff5fc01000 dyld`_dyld_start
> dyld`_dyld_start:
> -> 0x7fff5fc01000 <+0>: popq %rdi
> 0x7fff5fc01001 <+1>: pushq $0x0
> 0x7fff5fc01003 <+3>: movq %rsp, %rbp
> 0x7fff5fc01006 <+6>: andq $-0x10, %rsp
> (lldb) continue
> Process 67189 resuming
> AddressSanitizer debugger support is active. Memory error breakpoint has been
> installed and you can now use the 'memory history' command.
> Process 67189 stopped
> * thread #1: tid = 0x8fff4f, 0x00007fff5fc01000 dyld`_dyld_start, stop reason
> = exec
> frame #0: 0x00007fff5fc01000 dyld`_dyld_start
> dyld`_dyld_start:
> -> 0x7fff5fc01000 <+0>: popq %rdi
> 0x7fff5fc01001 <+1>: pushq $0x0
> 0x7fff5fc01003 <+3>: movq %rsp, %rbp
> 0x7fff5fc01006 <+6>: andq $-0x10, %rsp
> (lldb) continue
> Process 67189 resuming
> AddressSanitizer debugger support is active. Memory error breakpoint has been
> installed and you can now use the 'memory history' command.
> Process 67189 stopped
> * thread #1: tid = 0x8fff4f, 0x00007fff8d3994cd
> libsystem_pthread.dylib`_pthread_mutex_lock + 23, queue =
> 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x40)
> frame #0: 0x00007fff8d3994cd libsystem_pthread.dylib`_pthread_mutex_lock +
> 23
> libsystem_pthread.dylib`_pthread_mutex_lock:
> -> 0x7fff8d3994cd <+23>: cmpq $0x4d555458, (%rbx)
> 0x7fff8d3994d4 <+30>: je 0x7fff8d3994ea ; <+52>
> 0x7fff8d3994d6 <+32>: movq %rbx, %rdi
> 0x7fff8d3994d9 <+35>: callq 0x7fff8d3997d1 ;
> _pthread_mutex_check_init
> (lldb) continue
> Process 67189 resuming
> Process 67189 stopped
> * thread #1: tid = 0x8fff4f, 0x00007fff8d3994cd
> libsystem_pthread.dylib`_pthread_mutex_lock + 23, queue =
> 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x40)
> frame #0: 0x00007fff8d3994cd libsystem_pthread.dylib`_pthread_mutex_lock +
> 23
> libsystem_pthread.dylib`_pthread_mutex_lock:
> -> 0x7fff8d3994cd <+23>: cmpq $0x4d555458, (%rbx)
> 0x7fff8d3994d4 <+30>: je 0x7fff8d3994ea ; <+52>
> 0x7fff8d3994d6 <+32>: movq %rbx, %rdi
> 0x7fff8d3994d9 <+35>: callq 0x7fff8d3997d1 ;
> _pthread_mutex_check_init
> (lldb) continue
> Process 67189 resuming
> Process 67189 stopped
> * thread #1: tid = 0x8fff4f, 0x00007fff8d3994cd
> libsystem_pthread.dylib`_pthread_mutex_lock + 23, queue =
> 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x40)
> frame #0: 0x00007fff8d3994cd libsystem_pthread.dylib`_pthread_mutex_lock +
> 23
> libsystem_pthread.dylib`_pthread_mutex_lock:
> -> 0x7fff8d3994cd <+23>: cmpq $0x4d555458, (%rbx)
> 0x7fff8d3994d4 <+30>: je 0x7fff8d3994ea ; <+52>
> 0x7fff8d3994d6 <+32>: movq %rbx, %rdi
> 0x7fff8d3994d9 <+35>: callq 0x7fff8d3997d1 ;
> _pthread_mutex_check_init
> (lldb) continue
> Process 67189 resuming
> Process 67189 stopped
> * thread #1: tid = 0x8fff4f, 0x00007fff8d3994cd
> libsystem_pthread.dylib`_pthread_mutex_lock + 23, queue =
> 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x40)
> frame #0: 0x00007fff8d3994cd libsystem_pthread.dylib`_pthread_mutex_lock +
> 23
> libsystem_pthread.dylib`_pthread_mutex_lock:
> -> 0x7fff8d3994cd <+23>: cmpq $0x4d555458, (%rbx)
> 0x7fff8d3994d4 <+30>: je 0x7fff8d3994ea ; <+52>
> 0x7fff8d3994d6 <+32>: movq %rbx, %rdi
> 0x7fff8d3994d9 <+35>: callq 0x7fff8d3997d1 ;
> _pthread_mutex_check_init
> (lldb)
>
> Ben
I added -fsanitize-memory-track-origins” to my CXXFLAGS and LDFLAGS and now get
simllar info as with lldb.
GEN doc/interpreter/voronoi.txt
ASAN:DEADLYSIGNAL
=================================================================
==42617==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000040 (pc
0x7fff8d3994cd bp 0x7fff5ed9c360 sp 0x7fff5ed9c2e0 T0)
#0 0x7fff8d3994cc in _pthread_mutex_lock (libsystem_pthread.dylib+0x14cc)
#1 0x7fff92277be5 in closedir (libsystem_c.dylib+0x25be5)
#2 0x103b4def8 in octave::sys::dir_entry::open(std::__1::basic_string<char,
std::__1::char_traits<char>, std::__1::allocator<char> > const&)
(liboctave.3.dylib+0x536ef8)
#3 0x102e098f9 in
octave::sys::dir_entry::dir_entry(std::__1::basic_string<char,
std::__1::char_traits<char>, std::__1::allocator<char> > const&)
(liboctinterp.3.dylib+0xec38f9)
#4 0x102a24d5c in genpath(std::__1::basic_string<char,
std::__1::char_traits<char>, std::__1::allocator<char> > const&, string_vector
const&) (liboctinterp.3.dylib+0xaded5c)
#5 0x1027b0041 in set_image_path(std::__1::basic_string<char,
std::__1::char_traits<char>, std::__1::allocator<char> > const&)
(liboctinterp.3.dylib+0x86a041)
#6 0x1027b127f in install_defaults() (liboctinterp.3.dylib+0x86b27f)
#7 0x100e6173d in main (octave-gui+0x10000173d)
#8 0x7fff875c95c8 in start (libdyld.dylib+0x35c8)
#9 0xe (<unknown module>)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV (libsystem_pthread.dylib+0x14cc) in
_pthread_mutex_lock
==42617==ABORTING
octave exited with signal 6
Ben
- Re: ASAN:DEADLYSIGNAL, (continued)
- Re: ASAN:DEADLYSIGNAL, Ben Abbott, 2016/06/19
- Re: ASAN:DEADLYSIGNAL, Dmitri A. Sergatskov, 2016/06/20
- Re: ASAN:DEADLYSIGNAL, Ben Abbott, 2016/06/20
- Re: ASAN:DEADLYSIGNAL, Ben Abbott, 2016/06/20
- Re: ASAN:DEADLYSIGNAL, Dmitri A. Sergatskov, 2016/06/20
- Re: ASAN:DEADLYSIGNAL, Ben Abbott, 2016/06/20
- Re: ASAN:DEADLYSIGNAL, Dmitri A. Sergatskov, 2016/06/20
- Re: ASAN:DEADLYSIGNAL, Ben Abbott, 2016/06/20
- Re: ASAN:DEADLYSIGNAL, Ben Abbott, 2016/06/20
- Re: ASAN:DEADLYSIGNAL, Ben Abbott, 2016/06/20
- Re: ASAN:DEADLYSIGNAL,
Ben Abbott <=
- Re: ASAN:DEADLYSIGNAL, John W. Eaton, 2016/06/21
- Re: ASAN:DEADLYSIGNAL, Ben Abbott, 2016/06/21