Closed GoogleCodeExporter closed 9 years ago
Just to add:
I build the application like so:
$ /opt/br/output/host/usr/bin/i486-unknown-linux-gnu-g++ mytest.cpp -g -I.
client/linux/libbreakpad_client.a -lrt -lpthread -o mytest
I can run the *same* mytest binary on Ubuntu 12.04, it works.
If I run mytest on my custom Linux, it fails.
e.g. Ubuntu:
$ ./mytest
dump path: ./203067e6-2feb-e836-2d7f49cd-68352f3e.dmp
dump succeeded
Segmentation fault (core dumped)
* Custom Linux
$ ./mytest
dump path: ./12451f9f-2602-6ff5-35ed760a-57787be1.dmp
dump failed
Segmentation fault
The problem has to be some run time difference if the same application can
perform differently.
Does Breakpad require something special in the standard libraries to debug
threads?
Original comment by aras.vai...@gmail.com
on 11 Sep 2012 at 1:23
I've traced the application as much as I can. It appears that the problem is
caused by the ThreadEntry function returning non-zero to GenerateDump via the
sys_waitpid() call.
If anyone is reading this ... I will keep tracing ...
Original comment by aras.vai...@gmail.com
on 12 Sep 2012 at 9:32
This code in src/client/linux/minidump_writer/linux_ptrace_dumper.cc:
#if defined(__i386)
if (sys_ptrace(PTRACE_GETFPXREGS, tid, NULL, &info->fpxregs) == -1)
{
perror("sys_ptrace");
printf( "sys_prtrace PTRACE_GETFPXREGS in LinuxPtraceDumper::GetThreadInfoByIndex\n" );
// return false;
}
#endif
Will cause the entire minidump to fail on pre-Pentium III CPUs that do not
contain these register.
For example, the Vortex86DX embedded x86 microcontroller does not support these
registers and it is commonly used in many industrial processor boards.
I will post a patch.
Original comment by aras.vai...@gmail.com
on 12 Sep 2012 at 12:49
Glad to see you found the root cause of your problem. Please attach patches by
creating a new issue here: https://breakpad.appspot.com/
Original comment by ted.mielczarek
on 12 Sep 2012 at 1:00
I've faced with this problem.
I tested this patch on my Vortex86DX and it worked fine for me. The problem was
that Vortex86DX doesn't have MMX registers so their state cannot be obtained
and we shouldn't try to do that.
Patch is very simple, could anybody finally make a review and apply it?
Original comment by alexande...@gmail.com
on 26 Nov 2013 at 8:52
Sure, will do.
Original comment by thestig@chromium.org
on 26 Nov 2013 at 8:58
Maybe this link will be helpful too:
http://stackoverflow.com/questions/12299333/breakpad-fails-to-create-minidump-on
-target-when-i-use-threads
Link to patch is posted in one of the comments:
https://breakpad.appspot.com/455002/
Original comment by alexande...@gmail.com
on 26 Nov 2013 at 9:44
AFAICT I was ready to land that patch, I just couldn't find out if the author
had a CLA on file with Google.
Original comment by ted.mielczarek
on 26 Nov 2013 at 10:51
Un-owning since there's already a patch out there from the original bug
reporter.
Original comment by thestig@chromium.org
on 26 Nov 2013 at 11:51
https://code.google.com/p/google-breakpad/source/detail?r=1248
Original comment by thestig@chromium.org
on 9 Dec 2013 at 8:23
Original issue reported on code.google.com by
aras.vai...@gmail.com
on 11 Sep 2012 at 1:06