bgreen0 / google-breakpad

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

After fork a breakpad process, the process is deadlocked in malloc function #513

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What is the expected output? What do you see instead?
pstack info 
[root@stkstore03 dump]# pstack 25436
#0  0x0000003847af6dde in __lll_lock_wait_private () from /lib64/libc.so.6
#1  0x0000003847a7c59b in _L_lock_9495 () from /lib64/libc.so.6
#2  0x0000003847a79b86 in malloc () from /lib64/libc.so.6
#3  0x00000038546bd09d in operator new(unsigned long) () from 
/usr/lib64/libstdc++.so.6
#4  0x00000038546bd1b9 in operator new[](unsigned long) () from 
/usr/lib64/libstdc++.so.6
#5  0x00000000009274f5 in google_breakpad::MinidumpWriter::Dump() ()
#6  0x0000000000923741 in google_breakpad::WriteMinidump(char const*, int, void 
const*, unsigned long, std::list<google_breakpad::MappingEntry, 
std::allocator<google_breakpad::MappingEntry> > const&) ()
#7  0x00000000009213a7 in google_breakpad::ExceptionHandler::DoDump(int, void 
const*, unsigned long) ()
#8  0x00000000009214d0 in google_breakpad::ExceptionHandler::ThreadEntry(void*) 
()
#9  0x0000000000921a58 in 
google_breakpad::ExceptionHandler::GenerateDump(google_breakpad::ExceptionHandle
r::CrashContext*) ()
#10 0x0000000000000000 in ?? ()

What version of the product are you using? On what operating system?
LSB 
Version:    :core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:
printing-4.0-amd64:printing-4.0-noarch
Distributor ID: RedHatEnterpriseServer
Description:    Red Hat Enterprise Linux Server release 6.3 (Santiago)
Release:    6.3
Codename:   Santiago

the glibc version is : glibc-2.12-1.80.el6.x86_64

Please provide any additional information below.

Original issue reported on code.google.com by a2903...@gmail.com on 8 Jan 2013 at 12:05

GoogleCodeExporter commented 9 years ago
I don't see anywhere in the Dump method where we call new[]:
http://code.google.com/p/google-breakpad/source/browse/trunk/src/client/linux/mi
nidump_writer/minidump_writer.cc#440

Do you have local changes to your copy of Breakpad? We're generally very 
careful to not allocate from the heap in the minidump writer for reasons like 
this.

Original comment by ted.mielczarek on 8 Jan 2013 at 12:47

GoogleCodeExporter commented 9 years ago
Thank you for your reply ~~~
I'm not local changes any code, but i have forget the version which i download. 
Do you means if i update to the current version, the issue can be fixed. 

Original comment by a2903...@gmail.com on 8 Jan 2013 at 3:16

GoogleCodeExporter commented 9 years ago
There is indeed a new operator in WriteDSODebugStream function.
In breakpad debug version,we can see the WriteDSODebugStream function in the 
stack;
but in release version,it is disappeared

Original comment by guangang...@gmail.com on 31 Jan 2013 at 5:04

GoogleCodeExporter commented 9 years ago
Oh, huh, I managed to miss that:
http://code.google.com/p/google-breakpad/source/browse/trunk/src/client/linux/mi
nidump_writer/minidump_writer.cc#1147

That should be easy to fix.

Original comment by meag...@gmail.com on 31 Jan 2013 at 1:01

GoogleCodeExporter commented 9 years ago
I have a patch:
http://breakpad.appspot.com/523002

Original comment by ted.mielczarek on 31 Jan 2013 at 2:58

GoogleCodeExporter commented 9 years ago
Fixed in r1107, thanks for the bug report!

Original comment by ted.mielczarek on 31 Jan 2013 at 4:17

GoogleCodeExporter commented 9 years ago
OK, Thanks for your fixed. I update and try it!

Original comment by a2903...@gmail.com on 31 Jan 2013 at 4:36