breakpad dump has incorrect .so paths

118 views
Skip to first unread message

Tsani Prodanov

unread,
Jan 23, 2014, 8:12:32 AM1/23/14
to google-brea...@googlegroups.com
I'm using out of process crash handling to dump a process core on crash with
google_breakpad::WriteMinidump("./coredump",pid,tid)
The core file I get though (after conversion with md2core), shows this when I show the shared library info gdb:

(gdb) info sharedlibrary
From                To                  Syms Read   Shared Object Library
                                        No          /var/lib/breakpad/445F6148-E60E-DEB5-BA17-31E5768C209E-lib1.so.0
                                        No          /var/lib/breakpad/80C98035-F11A-0955-47B1-87B4286F28B4-lib2.so.0
                                        No          /var/lib/breakpad/5457E323-F782-B41E-6898-CF4FC7159B42-lib3.so
                                        No          /var/lib/breakpad/31F88D31-1D89-71EE-A6B3-E265FA26E77D-lib4.so
0x00007f1c4b0a83f0  0x00007f1c4b115376  Yes (*)     /usr/lib64/libstdc++.so.6
0x00007f1c4add1e70  0x00007f1c4ae11f48  Yes (*)     /lib64/libm.so.6
0x00007f1c4abba910  0x00007f1c4abcaf18  Yes (*)     /lib64/libgcc_s.so.1
0x00007f1c4a9a0660  0x00007f1c4a9abeb8  Yes (*)     /lib64/libpthread.so.0
0x00007f1c4a626a20  0x00007f1c4a74776c  Yes (*)     /lib64/libc.so.6
                                        No          /var/lib/breakpad/8442F9BB-134E-731E-4435-E8F9402843A9-lib5.so.0
0x00007f1c4a3f4120  0x00007f1c4a3ff3a8  Yes (*)     /lib64/libz.so.1
0x00007f1c4a1eede0  0x00007f1c4a1ef998  Yes (*)     /lib64/libdl.so.2
0x00007f1c49fb7c00  0x00007f1c49fbc9a8  Yes (*)     /lib64/libcrypt.so.1
0x00007f1c49db1140  0x00007f1c49db44f8  Yes (*)     /lib64/librt.so.1
                                        No          /var/lib/breakpad/9EF8BCD4-69C3-7E58-01E2-C825BF587FD6-lib6.so
0x00007f1c4d240b00  0x00007f1c4d2598db  Yes (*)     /lib64/ld-linux-x86-64.so.2
0x00007f1c499336c0  0x00007f1c4997a868  Yes (*)     /lib64/libfreebl3.so


This obiously prevents gdb from loading the correct libraries (which are ./lib1, ./lib2 etc. ). For the same crash I also generated a dump with gcore:

(gdb) info sharedlibrary
From                To                  Syms Read   Shared Object Library
0x00007f1c4cff9840  0x00007f1c4d023f38  Yes (*)     ./lib1.so.0
0x00007f1c4cdbb850  0x00007f1c4cdbba08  Yes (*)     ./
lib2.so.0
0x00007f1c4cbb2f10  0x00007f1c4cbb6e48  Yes         ./
lib3.so
0x00007f1c4bd0ef30  0x00007f1c4c567b38  Yes         ./
lib4.so
0x00007f1c4b0a83f0  0x00007f1c4b115376  Yes (*)     /usr/lib64/libstdc++.so.6
0x00007f1c4add1e70  0x00007f1c4ae11f48  Yes (*)     /lib64/libm.so.6
0x00007f1c4abba910  0x00007f1c4abcaf18  Yes (*)     /lib64/libgcc_s.so.1
0x00007f1c4a9a0660  0x00007f1c4a9abeb8  Yes (*)     /lib64/libpthread.so.0
0x00007f1c4a626a20  0x00007f1c4a74776c  Yes (*)     /lib64/libc.so.6
0x00007f1c4d32cc20  0x00007f1c4d342628  Yes         ./
lib5.so.0
0x00007f1c4a3f4120  0x00007f1c4a3ff3a8  Yes (*)     /lib64/libz.so.1
0x00007f1c4a1eede0  0x00007f1c4a1ef998  Yes (*)     /lib64/libdl.so.2
0x00007f1c49fb7c00  0x00007f1c49fbc9a8  Yes (*)     /lib64/libcrypt.so.1
0x00007f1c49db1140  0x00007f1c49db44f8  Yes (*)     /lib64/librt.so.1
0x00007f1c49b9df70  0x00007f1c49babfe8  Yes         ./
lib6.so
0x00007f1c4d240b00  0x00007f1c4d2598db  Yes (*)     /lib64/ld-linux-x86-64.so.2
0x00007f1c499336c0  0x00007f1c4997a868  Yes (*)     /lib64/libfreebl3.so

This is the correct information. I was wondering what could be causing this behavior and how I can fix it.

Asher Baker

unread,
Jan 23, 2014, 11:48:49 AM1/23/14
to google-brea...@googlegroups.com
This is behaviour of md2core, presumably to let you do the same thing with shared libraries as regular breakpad tools do with symbol files - i.e. store them for every version and always load the correct one when debugging.

https://code.google.com/p/google-breakpad/source/browse/trunk/src/tools/linux/md2core/minidump-2-core.cc?r=774#791

Should be trivial to patch locally if you don't want to keep a copy of your SOs in /var/lib/breakpad/


--
You received this message because you are subscribed to the Google Groups "google-breakpad-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-breakpad-d...@googlegroups.com.
To post to this group, send email to google-brea...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-breakpad-discuss.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages