I'm trying to figure out why inspection of a crashed process is failing on OSX 10.8. I am adding Breakpad to the Mac version of a very large and complex professional application. I am currently using Breakpad r1035. Due to circumstances outside my control, my application is built using XCode 3.2.6 (GCC 4.2). This is probably a long shot, since there hasn't been a lot of activity under the Breakpad tag on SO lately.
I've done a bit of digging through the Breakpad code to determine where exactly the failure occurs. The generator.Write(...)
call in Inspector::InspectTask()
returns false. Within Write()
, the call to WriteMemoryListStream(...)
leads to ReadTaskMemory(...)
which makes a mach_vm_read(...)
system call that has an error later reported by Inspector as: Error writing minidump - errno=No such process
Is there a reason why the crashing process wouldn't exist, or why it would not be detected properly by Inspector? I have tried changing the @BREAKPAD_SEND_AND_EXIT
setting to "NO", but that did not make a difference. A 2MB .dmp file is generated each time I cause a crash, containing non-human readable text.
Here is the stdout from Inspector when I induce a crash:
message ID = 0
exception_type = 1
exception_code = 1
exception_subcode = 0
remote_task = 7171
crashing_thread = 6915
handler_thread = 6659
ack_port_ = 6403
parameter count = 18
Inspector: sent acknowledgement (os/kern) successful (0)
Here is the stderr from Inspector when I induce a crash (edited to remove the directories):
Suspended Remote task
Writing minidump to directory (<correct location>)
minidump path (<correct location>/DD6D8905-F55F-4035-96BA-25460453F236.dmp)
Error writing minidump - errno=No such process
Resumed remote task
Inspector: trying to send acknowledgement to port 6403
Inspection of crashed process failed
Has anyone experienced similar issues while adding Breakpad to an application on the Mac? Or seen mach_vm_read(...) fail in a similar way?