Skip to content

src: diagnostic NodeReport initial implementation

Checklist
  • make -j4 test (UNIX) or vcbuild test nosign (Windows) passes
  • a test and/or benchmark is included
  • documentation is changed or added
  • the commit message follows commit guidelines
Affected core subsystem(s)

src

Description of change

Implementation of a diagnostic report for Node, intended for devt, test and production use, to capture and preserve information for problem determination. The code sits behind a new option "--nodereport-events=" which enables selective triggering of the report on unhandled exceptions, fatal errors and signals. The report is not enabled by default.

Content of the NodeReport in the initial implementation consists of a header section containing the event type, timestamp, PID and Node version, a section containing the Javascript stack trace, a section containing V8 heap information and an OS platform information section. Existing V8 APIs are used to obtain the stack trace and V8 heap information. There are changes in node.cc to handle the command-line option and report triggering, and new files containing the report writer and testcase.

Candidates for additional content in the NodeReport include: native stack traces; detailed JS stacktraces with call parameters, stack locals/references and code; long stack traces; libuv information; OS and hypervisor information and levels; CPU usage; GC history; module-specific information (inserted in the report via callback).

More information here: https://github.com/nodejs/post-mortem/issues/24 https://github.com/rnchamberlain/node/wiki/NodeReport

@nodejs/post-mortem @bnoordhuis @mhdawson

Merge request reports

Loading