generate core dump file for easier debug#266
Conversation
fe94883 to
f1eb6e5
Compare
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #266 +/- ##
==========================================
- Coverage 64.29% 61.03% -3.27%
==========================================
Files 72 74 +2
Lines 4406 4863 +457
Branches 555 663 +108
==========================================
+ Hits 2833 2968 +135
- Misses 1327 1631 +304
- Partials 246 264 +18
🚀 New features to boost your workflow:
|
xiaoxichen
left a comment
There was a problem hiding this comment.
lgtm but wondering the rational behind original code. waiting for brain to confirm
IIRC Bryan Zimmerman wrote this stacktrace logic. My guess is that the intent was to avoid any kind of circular logic when doing normal process termination (as std::exit() does) using _exit instead. Raising an exception will cause this thread to unwind up to the top and then cause another Signal won't it? I would rather investigate migrating to libcpptrace (https://github.com/jeremy-rifkin/cpptrace) like the BayDB project is using and just dump a stack from here rather than rely on core files. |
|
I see we have backtrace in the log? not sure if it is using cpptrace... Previous code was trying to ignore SIGABORT for some reason :) As the signal handler all reset to default so it wont cause another signal . |
204589b to
faa16e4
Compare
Agreed. We have backtrace information in the logs (without using cpptrace), but it's insufficient for thorough debugging. We still require a core dump file to access more detailed information. Raising signals such as SIGABRT, SIGFPE, SIGSEGV, and SIGILL will not lead to circular logic, as the signal handlers are reset to their default behavior, which is to terminate the process and generate a core dump file. @szmyd pls correct me if I'm wrong. |
|
We also at some point starting using minidumps since our cores were absolutely massive (many GiBs). Does this impact that in anyway? @raakella1 knows a little more about this than myself maybe, just want to make sure we don't start blowing out the local PVC on crashes in production. |
|
We disabled collecting the traditional stacktrace and use minidump instead for the release builds because it takes a very long time for the process to exit waiting for all the threads to dump the stacktrace (up to an hour and sometimes stuck even forever) which is not acceptable for release builds. |
|
@raakella1 I completely understand and appreciate your concerns regarding the size and generation time of coredump files. However, during SH's testing process, we observed that even the corefile in RelWithDebugInfo has proven to be very helpful for debugging. This document highlights several issues that were successfully debugged using core files. Would it be possible to consider adding a configuration option where coredump generation is disabled by default? This way, SM or other users could enable it by modifying the configuration if needed, ensuring minimal impact on other projects. |
|
@Besroy Yes, config option seems like a good middle ground. |
f2c4b8a to
ee83bbb
Compare
|
Hi @raakella1 I add an option to enable core dump, please take a look, thanks! |
No description provided.