Skip to content

Remove AVM_PRINT_PROCESS_CRASH_DUMPS #2050

@bettio

Description

@bettio

PR #1799 introduced AVM_PRINT_PROCESS_CRASH_DUMPS since "The OTP relies on the logger to print information about abruptly terminated processes, and so we try to do in Popcorn, thus we need to disable the crash dumps.".
That PR was a reasonable workaround however it introduces an additional option that can be configured only at build time. Also if a crash happens without having a logger enabled, processes (or even the VM) terminates without any explaination (see PR #2049).

A different approach should be investigated: globalcontext should remember the logger PID, so if there is an alive logger, crash dumps are never printed using context_dump(). This basically makes AVM_PRINT_PROCESS_CRASH_DUMPS behavior configurable at runtime.

This can be done with system_flag(system_logger, logger | undefined | pid()) -> logger | undefined | pid(). In AtomVM will use avm_context_dump as a default.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions