acrisci / simple-breakpad-server

Simple breakpad crash reports collecting server
https://www.npmjs.com/package/simple-breakpad-server
MIT License
67 stars 29 forks source link

Working with Crashpad? #21

Open siredmar opened 5 years ago

siredmar commented 5 years ago

Hi! I am trying to figure out the whole breakpad and crashpad cosmos. Uploading .dmp files and .sym files work just fine. The correlate to each other and i have nice back traces. To create the minidump i wrote a little hello world program that uses crashpad to create the dmp files. Currently i upload the .dmp file directly via curl. I noticed that crashpad_handler has the ability to upload the .dmp file directly. Does this work for the simple-breakpad-server as well? Can anyone give me a hint on how to setup my crashpad client in my C++ source?

Jimbly commented 5 years ago

I haven't used crashpad, I'm unfamiliar with it, but breakpad's http upload handler (in theory) worked, so crashpads probably does too, there's not much to the upload itself (tricky part is just making sure it's happening in a different process than the process that actually crashed, since a crashed process will likely be unable load the required libraries to do an http upload). Looks like crashpad has some out-of-process deamon, so that last part probably is already solved. Sorry I don't know any specifics that might help you.

csuft commented 3 years ago

Hi, we are facing the same problem. We have set up test project and it generated dump files when crashed. The dump files were uploaded by crashpad_handler automatically, but in the console page, the browser just says:

Bad things happened: 2021-02-25 04:00:13: minidump.cc:4693: ERROR: ReadBytes: read 4/32 2021-02-25 04:00:13: minidump.cc:4356: ERROR: Minidump cannot read header 2021-02-25 04:00:13: minidump_stackwalk.cc:87: ERROR: Minidump /tmp/tmp-1wak7IiRnrci1.tmp could not be read

How do I resolve this issue?Or did I miss something important?

Jimbly commented 3 years ago

Sounds like a different problem than the original poster - he was wondering how to upload dump files automatically, but the dumps worked when he uploaded them manually. Yours sounds likes the dump files aren't working after being uploaded. Perhaps there's something wrong with the dump files - you could try opening them directly in a debugger or uploading them via curl and see if that behaves differently. If it's from a newer version of something, maybe simple-breakpad-server needs a newer version of the tool that parses dump files (minidump, I think?).

csuft commented 3 years ago

The dump files uploaded to server are simply corrupted. Do you have any plans to test with crashpad? Since breakpad will be replaced by crashpad gradually. @Jimbly

Jimbly commented 3 years ago

What do you mean by "simply corrupted"? Are the dump files fine if you open them on the computer that generates them before uploading? If you upload them with curl do they go bad to?

This server is not particularly Breakpad-specific, it basically just accepts minidump uploads through standard HTTP, so there's no particular reason crashpad or any custom uploaders people use would be problematic. I actually don't use Breakpad to upload dumps on any of my projects, just a raw HTTP post because their built-in uploader was terrible (not t all reliable if the process had already crashed). If you can post valid dump files to the server, they should work - to resolve this issue you'd need to determine if the dump files are bad to start with (crashpad problem), if they're not being uploaded successfully (transfer/upload problem), or if they're arriving successfully and just aren't being read correctly (used (simple-breakpad-server problem, probably can't be read by the version of minidump we reference).

Definitely no plans for testing with crashpad myself, as this project is just on maintenance - the original author completely stopped using it and I'm still using it in production for one product, but not doing any active development on that product or this server. If you find any issues with crashpad support, I'll happily advise where I can, and accept PRs to fix them, though!