francoisbj / google-breakpad

Automatically exported from code.google.com/p/google-breakpad
0 stars 0 forks source link

dump_syms reports this translator cannot yet translate DWARF expressions to Breakpad postfix expressions #475

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. get breakpad and build it
svn checkout http://google-breakpad.googlecode.com/svn/trunk/  breakpad
./configure && make
2. create and build breakpadtest.cpp
g++ -I~/Public/breakpad/src -O0 -g -Wall breakpadtest.cpp 
-L~/Public/breakpad/src/client/linux -o"breakpadtest"   -lbreakpad_client 
-lpthread

3. run the test program, analyze dump file.
$ ~/Public/breakpad/src/tools/linux/dump_syms/dump_syms breakpadtest > test.sym
breakpadtest, section '.eh_frame': the call frame entry at offset 0x7c uses a 
DWARF expression to describe how to recover register '$ebx',  but this 
translator cannot yet translate DWARF expressions to Breakpad postfix 
expressions
breakpadtest, section '.eh_frame': the call frame entry at offset 0x7c uses a 
DWARF expression to describe how to recover register '$esi',  but this 
translator cannot yet translate DWARF expressions to Breakpad postfix 
expressions
$ head -n1 test.sym
MODULE Linux x86 D5702C95B22469CE18793A30C1C636C80 breakpadtest
$ mkdir -p ./symbols/breakpadtest/D5702C95B22469CE18793A30C1C636C80
$ mv test.sym ./symbols/breakpadtest/D5702C95B22469CE18793A30C1C636C80
$ ./breakpadtest 
Dump path: /tmp/2c54ac0a-7e1a-677b-47eb8015-29f3153a.dmp
Segmentation fault (core dumped)
$ mv /tmp/2c54ac0a-7e1a-677b-47eb8015-29f3153a.dmp test.dmp
$ ~/Public/breakpad/src/processor/minidump_stackwalk test.dmp ./symbols

What is the expected output? What do you see instead?
expect minidump_stackwalk display call stack from the dump file, but it just 
prints some warnings.
 ~/Public/breakpad/src/processor/minidump_stackwalk test.dmp ./symbols > stackwalk.txt
2012-04-14 22:15:03: minidump_processor.cc:264: INFO: Processing minidump in 
file test.dmp
2012-04-14 22:15:03: minidump.cc:3775: INFO: Minidump opened minidump test.dmp
2012-04-14 22:15:03: minidump.cc:3820: INFO: Minidump not byte-swapping minidump
2012-04-14 22:15:03: minidump.cc:4186: INFO: GetStream: type 1197932545 not 
present
2012-04-14 22:15:03: minidump.cc:4186: INFO: GetStream: type 1197932546 not 
present
2012-04-14 22:15:03: minidump.cc:1958: INFO: MinidumpModule could not determine 
version for /home/onega/workspace/breakpadtest/src/breakpadtest
2012-04-14 22:15:03: minidump.cc:1958: INFO: MinidumpModule could not determine 
version for /lib/libgcc_s-4.4.4-20100726.so.1
2012-04-14 22:15:03: minidump.cc:1958: INFO: MinidumpModule could not determine 
version for /usr/lib/libstdc++.so.6.0.13
2012-04-14 22:15:03: minidump.cc:1958: INFO: MinidumpModule could not determine 
version for /lib/libpthread-2.12.so
2012-04-14 22:15:03: minidump.cc:1958: INFO: MinidumpModule could not determine 
version for /lib/ld-2.12.so
2012-04-14 22:15:03: minidump.cc:1958: INFO: MinidumpModule could not determine 
version for /lib/libm-2.12.so
2012-04-14 22:15:03: minidump.cc:1958: INFO: MinidumpModule could not determine 
version for linux-gate.so
2012-04-14 22:15:03: minidump.cc:1958: INFO: MinidumpModule could not determine 
version for /lib/libc-2.12.so
2012-04-14 22:15:03: minidump_processor.cc:116: INFO: Minidump test.dmp has CPU 
info, OS info, no Breakpad info, exception, module list, thread list, no dump 
thread, and requesting thread
2012-04-14 22:15:03: minidump_processor.cc:150: INFO: Looking at thread 
test.dmp:0/1 id 0xb79
2012-04-14 22:15:03: simple_symbol_supplier.cc:192: INFO: No symbol file at 
./symbols/breakpadtest/D5702C95B22469CE18793A30C1C636C80/breakpadtest.sym
2012-04-14 22:15:03: simple_symbol_supplier.cc:130: INFO: Cannot find symbol 
data buffer for module /home/onega/workspace/breakpadtest/src/breakpadtest
2012-04-14 22:15:03: simple_symbol_supplier.cc:192: INFO: No symbol file at 
./symbols/libc-2.12.so/23BA02C69A703F4941FDED38DA8594320/libc-2.12.so.sym
2012-04-14 22:15:03: simple_symbol_supplier.cc:130: INFO: Cannot find symbol 
data buffer for module /lib/libc-2.12.so
2012-04-14 22:15:03: minidump.cc:1205: INFO: MinidumpMemoryRegion request out 
of range: 0x4+4/0xbfb43000+0x3000
2012-04-14 22:15:03: simple_symbol_supplier.cc:192: INFO: No symbol file at 
./symbols/breakpadtest/D5702C95B22469CE18793A30C1C636C80/breakpadtest.sym
2012-04-14 22:15:03: minidump.cc:1205: INFO: MinidumpMemoryRegion request out 
of range: 0x4+4/0xbfb43000+0x3000
2012-04-14 22:15:03: basic_code_modules.cc:88: INFO: No module at 0x1
2012-04-14 22:15:03: basic_code_modules.cc:88: INFO: No module at 0xbfb435b4
2012-04-14 22:15:03: simple_symbol_supplier.cc:192: INFO: No symbol file at 
./symbols/breakpadtest/D5702C95B22469CE18793A30C1C636C80/breakpadtest.sym
2012-04-14 22:15:03: minidump.cc:1205: INFO: MinidumpMemoryRegion request out 
of range: 0x4+4/0xbfb43000+0x3000
2012-04-14 22:15:03: simple_symbol_supplier.cc:192: INFO: No symbol file at 
./symbols/breakpadtest/D5702C95B22469CE18793A30C1C636C80/breakpadtest.sym
2012-04-14 22:15:03: minidump.cc:1205: INFO: MinidumpMemoryRegion request out 
of range: 0x4+4/0xbfb43000+0x3000
2012-04-14 22:15:03: simple_symbol_supplier.cc:192: INFO: No symbol file at 
./symbols/ld-2.12.so/3B9068CE0EF793C5FBFD924CE9FBF3C80/ld-2.12.so.sym
2012-04-14 22:15:03: simple_symbol_supplier.cc:192: INFO: No symbol file at 
./symbols/ld-2.12.so/3B9068CE0EF793C5FBFD924CE9FBF3C80/ld-2.12.so.sym
2012-04-14 22:15:03: simple_symbol_supplier.cc:130: INFO: Cannot find symbol 
data buffer for module /lib/ld-2.12.so
2012-04-14 22:15:03: minidump.cc:1205: INFO: MinidumpMemoryRegion request out 
of range: 0x4+4/0xbfb43000+0x3000
2012-04-14 22:15:03: basic_code_modules.cc:88: INFO: No module at 0xbfb435ac
2012-04-14 22:15:03: basic_code_modules.cc:88: INFO: No module at 0x0
2012-04-14 22:15:03: basic_code_modules.cc:88: INFO: No module at 0x1
2012-04-14 22:15:03: basic_code_modules.cc:88: INFO: No module at 0xbfb4556b
2012-04-14 22:15:03: basic_code_modules.cc:88: INFO: No module at 0x0
2012-04-14 22:15:03: basic_code_modules.cc:88: INFO: No module at 0xbfb4557a
2012-04-14 22:15:03: basic_code_modules.cc:88: INFO: No module at 0xbfb4559b
2012-04-14 22:15:03: basic_code_modules.cc:88: INFO: No module at 0xbfb455ac
2012-04-14 22:15:03: basic_code_modules.cc:88: INFO: No module at 0xbfb455cd
2012-04-14 22:15:03: basic_code_modules.cc:88: INFO: No module at 0xbfb455d8
2012-04-14 22:15:03: basic_code_modules.cc:88: INFO: No module at 0xbfb455e8
2012-04-14 22:15:03: basic_code_modules.cc:88: INFO: No module at 0xbfb45639
2012-04-14 22:15:03: basic_code_modules.cc:88: INFO: No module at 0xbfb45647
2012-04-14 22:15:03: basic_code_modules.cc:88: INFO: No module at 0xbfb45681
2012-04-14 22:15:03: basic_code_modules.cc:88: INFO: No module at 0xbfb45693
2012-04-14 22:15:03: basic_code_modules.cc:88: INFO: No module at 0xbfb456a9
2012-04-14 22:15:03: basic_code_modules.cc:88: INFO: No module at 0xbfb456c7
2012-04-14 22:15:03: basic_code_modules.cc:88: INFO: No module at 0xbfb456de
2012-04-14 22:15:03: basic_code_modules.cc:88: INFO: No module at 0xbfb456e9
2012-04-14 22:15:03: basic_code_modules.cc:88: INFO: No module at 0xbfb45be8
2012-04-14 22:15:03: basic_code_modules.cc:88: INFO: No module at 0xbfb45c18
2012-04-14 22:15:03: basic_code_modules.cc:88: INFO: No module at 0xbfb45c45
2012-04-14 22:15:03: basic_code_modules.cc:88: INFO: No module at 0xbfb45c93
2012-04-14 22:15:03: basic_code_modules.cc:88: INFO: No module at 0xbfb45ca2
2012-04-14 22:15:03: basic_code_modules.cc:88: INFO: No module at 0xbfb45cb8
2012-04-14 22:15:03: basic_code_modules.cc:88: INFO: No module at 0xbfb45cd3
2012-04-14 22:15:03: basic_code_modules.cc:88: INFO: No module at 0xbfb45d39
2012-04-14 22:15:03: basic_code_modules.cc:88: INFO: No module at 0xbfb45d4a
2012-04-14 22:15:03: basic_code_modules.cc:88: INFO: No module at 0xbfb45d75
2012-04-14 22:15:03: basic_code_modules.cc:88: INFO: No module at 0xbfb45d89
2012-04-14 22:15:03: basic_code_modules.cc:88: INFO: No module at 0xbfb45da0
2012-04-14 22:15:03: minidump_processor.cc:258: INFO: Processed test.dmp
2012-04-14 22:15:03: minidump.cc:3747: INFO: Minidump closing minidump

What version of the product are you using? On what operating system?
CentOS 6.0. 
$ uname -a
Linux centos6 2.6.32-71.el6.i686 #1 SMP Fri Nov 12 04:17:17 GMT 2010 i686 i686 
i386 GNU/Linux
gcc version 4.4.4 20100726 (Red Hat 4.4.4-13) (GCC)

Please provide any additional information below.
//============================================================================
// Name        : breakpadtest.cpp
//============================================================================

#include <iostream>
#include "client/linux/handler/exception_handler.h"
using namespace std;
static bool dumpCallback(const char* dump_path,
                         const char* minidump_id,
                         void* context,
                         bool succeeded)
{
  printf("Dump path: %s/%s.dmp\n", dump_path, minidump_id);
  return succeeded;
}

void crash()
{
  volatile int* a = (int*)(NULL);
  *a = 1;
}

int main(int argc, char* argv[])
{
    google_breakpad::ExceptionHandler eh("/tmp", NULL, dumpCallback, NULL, true);
    crash();
    return 0;
}

Original issue reported on code.google.com by onegazh...@gmail.com on 15 Apr 2012 at 8:44

GoogleCodeExporter commented 9 years ago
attach stackwalk.txt

Original comment by onegazh...@gmail.com on 15 Apr 2012 at 8:47

Attachments:

GoogleCodeExporter commented 9 years ago
yeah, have that same on 3.7.5-1-ARCH #1 SMP PREEMPT Mon Jan 28 10:03:32 CET 
2013 x86_64 GNU/Linux archlinux. Any ideas how to handle this?

Original comment by lukasz.wychrystenko@gmail.com on 8 Feb 2013 at 8:51

GoogleCodeExporter commented 9 years ago
Has there been any traction on this? Anyone working on a fix?

Original comment by Rachelle...@gmail.com on 14 Mar 2013 at 10:11

GoogleCodeExporter commented 9 years ago
No one is working on this. It's generally not a problem in practice, since most 
unwind expressions don't use them.

Original comment by ted.mielczarek on 14 Mar 2013 at 10:50

GoogleCodeExporter commented 9 years ago
I had this problem initially when I tried to follow the linux example.
However, when I wrote a script that followed LinuxStarterGuide exactly,
it worked.
I've attached the script; does it work for you?

Original comment by daniel.r...@gmail.com on 24 Aug 2013 at 4:49

Attachments:

GoogleCodeExporter commented 9 years ago
i have the same issue.. i try your script but it doesn't work for me

Original comment by federico...@gmail.com on 7 Jan 2014 at 9:42

GoogleCodeExporter commented 9 years ago
@daniel.r...: i guess your script only checks if there is some output from the 
minidump_stackwalk utility and doesn't check if the output is symbolized. The 
issue (atleast I have) is that is NOT symbolizing even though the binary GUIDs 
are matching.

@breakpad_team: does it check anything else apart from module GUID for matching 
or picking up the right symbol file?

Any help is appreciated.

Original comment by rohit.wa...@gmail.com on 27 Mar 2014 at 10:19

GoogleCodeExporter commented 9 years ago
The SimpleSymbolSupplier implementation only considers the debug file and debug 
id when constructing the symbol filename:
https://code.google.com/p/google-breakpad/source/browse/trunk/src/processor/simp
le_symbol_supplier.cc#142

Nothing in the Breakpad processor actually reads the MODULE line from the 
symbol file.

Original comment by ted.mielczarek on 27 Mar 2014 at 3:08

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Please correct me if I am wrong and pardon my limited knowledge. So does it 
mean that this will not run in production/release mode, since there is no 
detereministic way to figure debug id on server side (or is there any)?

Thanks for your help and leads.

Btw I am using this for my android application and running the tools on a linux 
box.

Original comment by rohit.wa...@gmail.com on 28 Mar 2014 at 5:40