[lldb-dev] [Bug 26567] New: Backtrace missing frames while debugging breakpad generated minidump

via lldb-dev lldb-dev at lists.llvm.org
Wed Feb 10 11:48:14 PST 2016


https://llvm.org/bugs/show_bug.cgi?id=26567

            Bug ID: 26567
           Summary: Backtrace missing frames while debugging breakpad
                    generated minidump
           Product: lldb
           Version: unspecified
          Hardware: PC
                OS: other
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: lldb-dev at lists.llvm.org
          Reporter: joshualang at google.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

I am trying out the minidump target on the windows lldb builds.

My test was to debug a windows minidump generated through breakpad using
lldb/trunk at 259885  

I've attached:

   The executable with debug symbols (cross compiled from linux with
mingw-gcc).  This was used to generate the breakpad symbols.

   The minidump generated through breakpad

   The stack trace that I get from lldb

Using breakpad's stackwalk tool I see the following stack trace (truncated)
which has the correct stack trace.

Report ID859ac03000000000
Total Threads43
Processed Threads43
Thread 1 CRASHED [EXCEPTION_ACCESS_VIOLATION_READ @ 0x00000000 ]
0x005c1f13    (emulator-x86.exe -console.c:2606 )    do_crash
0x005be45b    (emulator-x86.exe -console.c:427 )    control_client_do_command
0x005be713    (emulator-x86.exe -console.c:513 )    control_client_read_byte
0x005bea56    (emulator-x86.exe -console.c:572 )    control_client_read
0x00459d65    (emulator-x86.exe -Looper.cpp:129 )   
android::qemu::::QemuLooper::FdWatch::fire
0x0045aac0    (emulator-x86.exe -Looper.cpp:329 )   
android::qemu::::QemuLooper::handleBottomHalf
0x00408942    (emulator-x86.exe -async.c:150 )    qemu_bh_poll
0x004a2f3a    (emulator-x86.exe -main-loop.c:307 )    main_loop_wait
0x004a2f83    (emulator-x86.exe -main-loop.c:333 )    main_loop
0x004bd73a    (emulator-x86.exe -vl-android.c:3853 )    qemu_main
0x0045c0e6    (emulator-x86.exe -main.c:155 )    enter_qemu_main_loop
0x007fb32d    (emulator-x86.exe -emulator-qt-window.h:64 )   
MainLoopThread::run
0x6696291d    (Qt5Core.dll + 0x0002291d )    
0x76e67faf    (msvcrt.dll + 0x00017faf )    
0x76e680f4    (msvcrt.dll + 0x000180f4 )    
0x75677c03    (kernel32.dll + 0x00017c03 )    
0x778fad6e    (ntdll.dll + 0x0005ad6e )    
0x778fad39    (ntdll.dll + 0x0005ad39 )    
Thread 0
0x778dc9ec    (ntdll.dll + 0x0003c9ec )    
0x7550dcc2    (user32.dll + 0x0000dcc2 )    
0x66b6d1af    (Qt5Core.dll + 0x0022d1af )    
0x6dee4580    (qwindows.dll + 0x00024580 )    
0x66b164a5    (Qt5Core.dll + 0x001d64a5 )    
0x66b1e467    (Qt5Core.dll + 0x001de467 )    
0x0053d116    (emulator-x86.exe -winsys-qt.cpp:115 )   
skin_winsys_enter_main_loop
0x0045e4e5    (emulator-x86.exe -main.c:1030 )    qt_main
0x0053e997    (emulator-x86.exe -winsys-qt.cpp:397 )    qMain
0x00402801    (emulator-x86.exe -qtmain_win.cpp:113 )    WinMain
0x0089f3ec    (emulator-x86.exe -crt0_c.c:18 )    main
0x00401401    (emulator-x86.exe -crtexe.c:315 )    __tmainCRTStartup
0x75677c03    (kernel32.dll + 0x00017c03 )    
0x778fad6e    (ntdll.dll + 0x0005ad6e )    
0x778fad39    (ntdll.dll + 0x0005ad39 )    
Thread 2
0x778dc47c    (ntdll.dll + 0x0003c47c )    
0x77222c01    (KERNELBASE.dll + 0x00002c01 )    
0x005e7637    (emulator-x86.exe -ConditionVariable_win32.cpp:91 )   
android::base::ConditionVariable::wait
0x005b4297    (emulator-x86.exe -WearAgent.cpp:261 )   
android::wear::WearAgentImpl::connectToAdbHostWorker
0x005b4a84    (emulator-x86.exe + 0x001b4a84 )    
0x005b5197    (emulator-x86.exe -functional:2057 )   
std::_Function_handler<int(),
android::wear::WearAgentImpl::WearAgentImpl(android::base::Looper*,
int)::__lambda0>::_M_invoke
0x00845ce9    (emulator-x86.exe -functional:2471 )   
std::function<int()>::operator()
0x005e19c5    (emulator-x86.exe -FunctorThread.cpp:29 )   
android::base::FunctorThread::main
0x005e7e0c    (emulator-x86.exe -Thread_win32.cpp:127 )   
android::base::Thread::thread_main
0x75677c03    (kernel32.dll + 0x00017c03 )    
0x778fad6e    (ntdll.dll + 0x0005ad6e )    
0x778fad39    (ntdll.dll + 0x0005ad39 )    
Thread 3
0x778dc47c    (ntdll.dll + 0x0003c47c )    
0x77222c01    (KERNELBASE.dll + 0x00002c01 )    
0x005e7637    (emulator-x86.exe -ConditionVariable_win32.cpp:91 )   
android::base::ConditionVariable::wait
0x005dcfcd    (emulator-x86.exe -MessageChannel.cpp:51 )   
android::base::MessageChannelBase::beforeRead
0x00823812    (emulator-x86.exe -MessageChannel.h:87 )   
android::base::MessageChannel<CameraCommand, 4u>::receive
0x007f9f61    (emulator-x86.exe -camera-capture-windows.cpp:905 )   
CameraThread::main
0x005e7e0c    (emulator-x86.exe -Thread_win32.cpp:127 )   
android::base::Thread::thread_main
0x75677c03    (kernel32.dll + 0x00017c03 )    
0x778fad6e    (ntdll.dll + 0x0005ad6e )    
0x778fad39    (ntdll.dll + 0x0005ad39 )

When I use lldb, I get the following backtrace which has some similar frames
but some threads are basically empty.

For example, Thread 2 below is Thread 1 in the above stacktrace due to start at
0 count but there are only kernel frames even though the the exception address
is the same.  When I use a stripped binary (or no debug symbols are found),
there are no frames displayed at all.  I'd expect that the frames would be
included at least with addresses and module name but maybe I'm mistaken on how
the stackwalk/unwinder works.

>..\..\lldb\bin\lldb.exe emulator-x86.exe -c 32bd5c16-1afd-410d-911c-1bc0e1e71909.dmp
(lldb) target create "emulator-x86.exe" --core
"32bd5c16-1afd-410d-911c-1bc0e1e7
1909.dmp"
Core file
'C:\Users\joshualang\Downloads\tools_r25-windows\tools\32bd5c16-1afd-4
10d-911c-1bc0e1e71909.dmp' (i386) was loaded.
(lldb) bt
* thread #2: tid = 0x1cd0, 0x778dc9ec ntdll.dll`NtWaitForMultipleObjects + 12,
s
top reason = Exception 0xc0000005 encountered at address 0x5c1f13
  * frame #0: 0x778dc9ec ntdll.dll`NtWaitForMultipleObjects + 12
    frame #1: 0x772328c3 KERNELBASE.dll`GetStartupInfoW + 4643
(lldb) bt all
  thread #1: tid = 0x2a74, 0x778dc9ec ntdll.dll`NtWaitForMultipleObjects + 12
    frame #0: 0x778dc9ec ntdll.dll`NtWaitForMultipleObjects + 12
    frame #1: 0x772328c3 KERNELBASE.dll`GetStartupInfoW + 4643

* thread #2: tid = 0x1cd0, 0x778dc9ec ntdll.dll`NtWaitForMultipleObjects + 12,
s
top reason = Exception 0xc0000005 encountered at address 0x5c1f13
  * frame #0: 0x778dc9ec ntdll.dll`NtWaitForMultipleObjects + 12
    frame #1: 0x772328c3 KERNELBASE.dll`GetStartupInfoW + 4643

  thread #3: tid = 0x2ea4, 0x778dc47c ntdll.dll`NtWaitForSingleObject + 12
    frame #0: 0x778dc47c ntdll.dll`NtWaitForSingleObject + 12
    frame #1: 0x77222cc7 KERNELBASE.dll`WaitForSingleObjectEx + 183
    frame #2: 0x77222c02 KERNELBASE.dll`WaitForSingleObject + 18
    frame #3: 0x005e7638
emulator-x86.exe`android::base::ConditionVariable::wait
(this=0x0295c10c, userLock=0x0295c130) + 104 at ConditionVariable_win32.cpp:91
    frame #4: 0x005b4298
emulator-x86.exe`android::wear::WearAgentImpl::connectT
oAdbHostWorker(this=0x0295bc60) + 136 at WearAgent.cpp:261
    frame #5: 0x005b4a85 emulator-x86.exe`operator(__closure=0x02902a78) + 21
at
 WearAgent.cpp:437
    frame #6: 0x005b5198 emulator-x86.exe`std::_Function_handler<int(),
android:
:wear::WearAgentImpl::WearAgentImpl(android::base::Looper*,
int)::__lambda0>::_M
_invoke(__functor=0x0295c0f8) + 24 at functional:2057
    frame #7: 0x00845cea emulator-x86.exe`std::function<int
()>::operator(this=0
x0295c0f8)() const + 42 at functional:2471
    frame #8: 0x005e19c6
emulator-x86.exe`android::base::FunctorThread::main(thi
s=0x0295c0c8) + 22 at FunctorThread.cpp:29
    frame #9: 0x005e7e0d
emulator-x86.exe`_ZN7android4base6Thread11thread_mainEP
v at 4(arg=0x0295c0c8) + 29 at Thread_win32.cpp:127
    frame #10: 0x75677c04 kernel32.dll`BaseThreadInitThunk + 36
    frame #11: 0x778fad6f ntdll.dll`RtlInitializeExceptionChain + 143

  thread #4: tid = 0x3a94, 0x778dc47c ntdll.dll`NtWaitForSingleObject + 12
    frame #0: 0x778dc47c ntdll.dll`NtWaitForSingleObject + 12
    frame #1: 0x77222cc7 KERNELBASE.dll`WaitForSingleObjectEx + 183
    frame #2: 0x77222c02 KERNELBASE.dll`WaitForSingleObject + 18
    frame #3: 0x005e7638
emulator-x86.exe`android::base::ConditionVariable::wait
(this=0x008a74b8, userLock=0x008a74a0) + 104 at ConditionVariable_win32.cpp:91
    frame #4: 0x005dcfce
emulator-x86.exe`android::base::MessageChannelBase::bef
oreRead(this=0x008a7494) + 46 at MessageChannel.cpp:51
    frame #5: 0x00823813
emulator-x86.exe`android::base::MessageChannel<CameraCo
mmand, 4u>::receive(this=0x008a7494, msg=0x063fff20) + 19 at
MessageChannel.h:87

    frame #6: 0x007f9f62 emulator-x86.exe`CameraThread::main(this=0x008a7464) +
34 at camera-capture-windows.cpp:905
    frame #7: 0x005e7e0d
emulator-x86.exe`_ZN7android4base6Thread11thread_mainEP
v at 4(arg=0x008a7464) + 29 at Thread_win32.cpp:127
    frame #8: 0x75677c04 kernel32.dll`BaseThreadInitThunk + 36
    frame #9: 0x778fad6f ntdll.dll`RtlInitializeExceptionChain + 143

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20160210/a8ed9197/attachment.html>


More information about the lldb-dev mailing list