Skip to content

diagnostic report behavior on fatal error #331

@boneskull

Description

@boneskull

By "fatal error" I mean stuff like "out of memory", not exceptions thrown from JS.

  • In Node.js v12.11.0, passing --experimental-report to the node executable will cause a report to be written to disk
  • --report-on-fatalerror does not seem to have any practical effect that I'm aware of?

Furthermore, when a fatal error does occur, we get a stack-trace-ish thing (though not always--has something to do with where we are in the event loop), similar to the following:

<--- JS stacktrace --->

==== JS stack trace =========================================

    0: ExitFrame [pc: 0x10092bed9]
Security context: 0x0f61e84c08a1 <JSObject>
    1: nextTick [0xf61a90422f9] [internal/process/task_queues.js:~101] [pc=0x181bf64721a](this=0x0f61a9042481 <process map = 0xf613daf6941>,0x0f61bcdd0341 <JSFunction push (sfi = 0xf61c6f6e841)>)
    2: processTicksAndRejections [0xf61a90425d9] [internal/process/task_queues.js:~65] [pc=0x181bf64609b](this=0x0f61a9042481 <process map = 0xf613daf6941>)
    3: Int...

The above information is not in the written diagnostic report in any form. My questions, then:

  1. Is the above information practically useful? It does not show the root cause of the OOM fatal, but only where the process ran OOM
  2. If it is useful, should it be in the report?
  3. If it should be in the report, how can it be trapped and put into the report?
  4. Is there a bug in the implementation wherein --report-on-fatalerror is always enabled?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions