Segfault in minidump_writer::linux::thread_list_stream::write
when opt-level
> 1
#84
Labels
bug
Something isn't working
I recently released
sentry-node-minidump
which usesnapi-rs
to expose some of the code I wrote inminidumper-child
to node.js to send minidumps to Sentry for node.js crashes.minidumper-child
takes the code from theminidumper
diskwrite example and packages it with a simpler API.It wasn't until I actually added e2e tests in CI that I noticed that it didn't work on Linux!
After much debugging I found that the server was segfaulting when trying to write the dump file. It would write 236 bytes (presumably the header) before segfaulting in
minidump_writer::linux::thread_list_stream::write
. I noticed that this wasn't the case in debug mode, so I've managed to work around this by overridingopt-level = 1
for the Linux release build.opt-level = 2
results in the crash. This isn't actually a huge issue forsentry-node-minidump
since I build and distribute the binaries.It was at this point I realised that the CI tests for
minidumper-child
are only testing the debug profile. I opened a PR to test the release profile and it's failing, presumably for the same reason. This suggests the issue has nothing to do with node.js ornapi-rs
since that code is all Rust:timfish/minidumper-child#2
Should I have opened this issue in
minidump-writer
?Have you seen anything like this before?
The text was updated successfully, but these errors were encountered: