I'm probably doing something wrong, but I can't figure this one out.
I have a simple crash minidump, generated on Windows. If I open the dump in visual studio, it loads without problems and show the crash line. But I cannot get it to symbolicate in minidump_stackwalker.
I did create a symbol repository folder, inside I have: symbols/myapplication.pdb/67892B042C8F4CCFAA6BE53445F9B2141/myapplication.sym and all the: symbols/wkernel32.pdb/XXXXXX/wkernel32.sym etc used by the application.
When I call "minidump_stackwalk mycrash.dmp symbols", stderr shows that simple_symbol_supplier finds all the symbols correctly, and load them. However, the output keeps being the stack without any symbols in it.
I also tried to compile and run minidump_stackwalk on linux and on MacOSX, but the result is the same.
What am I doing wrong?
The stderr output of stackwalk looks like this:
2014-05-08 16:44:48: minidump_processor.cc:235: INFO: Processing minidump in file 604c29d0-318a-4321-9e40-b0198085c17d.dmp
2014-05-08 16:44:48: minidump.cc:3258: INFO: Minidump opened minidump 604c29d0-318a-4321-9e40-b0198085c17d.dmp on fd 3
2014-05-08 16:44:48: minidump.cc:3303: INFO: Minidump not byte-swapping minidump
2014-05-08 16:44:48: minidump.cc:1726: ERROR: MinidumpModule could not determine debug_file for C:\Windows\winsxs\x86_microsoft.vc90.mfcloc_1fc8b3b9a1e18e3b_9.0.30729.6161_none_49768ef57548175e\MFC90ENU.DLL
2014-05-08 16:44:48: minidump.cc:1794: ERROR: MinidumpModule could not determine debug_identifier for C:\Windows\winsxs\x86_microsoft.vc90.mfcloc_1fc8b3b9a1e18e3b_9.0.30729.6161_none_49768ef57548175e\MFC90ENU.DLL
2014-05-08 16:44:48: minidump_processor.cc:103: INFO: Minidump 604c29d0-318a-4321-9e40-b0198085c17d.dmp has CPU info, OS info, Breakpad info, exception, module list, thread list, dump thread, and requesting thread
2014-05-08 16:44:48: minidump_processor.cc:137: INFO: Looking at thread 604c29d0-318a-4321-9e40-b0198085c17d.dmp:0/24 id 0x1570
2014-05-08 16:44:49: basic_source_line_resolver.cc:223: INFO: Loading symbols for module C:\Program Files\MyApplication\myapplication.exe from buffer
2014-05-08 16:44:49: basic_source_line_resolver.cc:223: INFO: Loading symbols for module C:\Windows\System32\user32.dll from buffer
2014-05-08 16:44:49: basic_source_line_resolver.cc:223: INFO: Loading symbols for module C:\Windows\System32\kernel32.dll from buffer
2014-05-08 16:44:49: basic_source_line_resolver.cc:223: INFO: Loading symbols for module C:\Windows\System32\ntdll.dll from buffer
2014-05-08 16:44:49: minidump_processor.cc:137: INFO: Looking at thread 604c29d0-318a-4321-9e40-b0198085c17d.dmp:1/24 id 0xbb4
...
2014-05-08 16:44:49: minidump_processor.cc:229: INFO: Processed 604c29d0-318a-4321-9e40-b0198085c17d.dmp
2014-05-08 16:44:49: minidump.cc:3232: INFO: Minidump closing minidump on fd 3
And the output looks like this:
Operating system: Windows NT
6.1.7601 Service Pack 1
CPU: x86
GenuineIntel family 6 model 15 stepping 6
2 CPUs
Crash reason: EXCEPTION_ACCESS_VIOLATION
Crash address: 0x0
Thread 0 (crashed)
0 myapplication.exe + 0x6d0aa7
eip = 0x01500aa7 esp = 0x0023eef4 ebp = 0x0023eefc ebx = 0x0505f9bc
esi = 0x0505f9bc edi = 0x00000000 eax = 0x0514fe33 ecx = 0x0003c11d
edx = 0x00000003 efl = 0x00010202
Found by: given as instruction pointer in context
1 myapplication.exe + 0x146fb
eip = 0x00e446fc esp = 0x0023ef04 ebp = 0x0023ef20
Found by: previous frame's frame pointer
2 myapplication.exe + 0x127b1
eip = 0x00e427b2 esp = 0x0023ef28 ebp = 0x0023ef4c
Found by: previous frame's frame pointer
...
Some extra informations:
http://www.chromium.org/developers/decoding-crash-dumps
http://blog.inventic.eu/2012/08/qt-and-google-breakpad/
My core problem was that in symbols folder i don't have folder with exactly same name as my binary. Simply everything name as your binary. Example on linux:
it will print something like
Now make something like:
And on the end
Or you can use simple script:
Example usage:
script:
Another thing can be if you look at end of your detailed crash info you will see something like:
As you can see i don't have symbols for libJansson.so and many others that means that in my "symbols" folder i need to have symbols for this library.
I can generate them in similar way
it will print something like
Now make something like:
and now i can see stack trace for libJansson.so
So if you use my script you must only do something like this:
use the "minidump_stackwalk" in linux to parse the '.sym' file generated on windows. But,firstly, you must transform the '.sym' from dos format to unix format and the encoding type to UTF-8. if you skip it,the problem you asked above would appear.