-
Notifications
You must be signed in to change notification settings - Fork 20
Proposal for diagnostic NodeReport #24
Comments
Diff for easier viewing: https://github.com/rnchamberlain/node/compare/master...node-report-1 |
Thanks for this! This looks useful. For what it's worth, we've been bitten in the past by code that attempts to run after arbitrarily failures like this. For our use cases, I don't think we would typically take on the risk of such code failing or modifying the state in the core file. For the case of --abort-on-uncaught-exception, we really want to execute as little as possible between the failure and the fatal signal handler. It looks like the new reporting behavior is opt-in, so that would just work. A few questions and comments on the change:
Out of curiosity, what was the motivation for this change? (We would typically build something that produced a report from the core file instead, but I imagine there may be use cases where that doesn't work?) Thanks again. |
@davepacheco many thanks for the feedback, appreciated. Yes, we have to be very careful not to make things worse. For javascript problems like unhandled exception or javascript heap out of memory, the process should still be running fine. So as long as we stay in C++ code and don't try to run any javascript we should be OK. For native crashes/out of memory we found we could still do this type of report from the JVM, but we had to be very careful to avoid multiple dumps, potential hangs and secondary crashes (eg avoid locks and malloc, use a SIGSEGV handler and bail out if it triggers). Ideally the core dump is produced first, but that is hard to do on Linux because there is no OS 'dump me' API. re the questions
Motivation is to provide something that users can easily/immediately read. Running a debugger or other tool on a core dump is a bit of a hurdle for some. The core dump is the primary post-mortem diagnostic, this is intended as a useful (optional) extra resource. Experience with the Java equivalent was very positive. There are some things that are easier to do at runtime (eg native/C stack traces with symbols, as the libraries are immediately available) |
Renamed node-report is now available as npm module for Node 4 and later, on MacOS/Linux/Win/AIX/SmartOS here: https://www.npmjs.com/package/node-report, github repo here: https://github.com/nodejs/node-report |
This is a proposal for a human-readable summary dump/report, written to disk on the various failure scenarios. It is intended to preserve information for initial problem determination/triage, and for use
in combination with core dumps when more detailed analysis is needed. Configuration is via command line option(s)
Initial implementation is here:
https://github.com/rnchamberlain/node/compare/master...node-report-3
Documentation and sample output here:
https://github.com/rnchamberlain/node/wiki/NodeReport
Any feedback appreciated!
The text was updated successfully, but these errors were encountered: