Remove `AVM_PRINT_PROCESS_CRASH_DUMPS`
Maintainers usually reply within 3 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- c, erlang
- Domain
- backend, embedded-iot
Research direction
Start by reading PRs #1799 and #2049 to understand the existing crash dump workaround and the failure case. Then trace how globalcontext stores and uses the logger PID and where system_flag handles system_logger; the issue gives no file or test names. Done means an alive logger suppresses context_dump() at runtime, while the default behavior uses avm_context_dump when no logger is configured.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- Erlang
- Stars
- 2.3k
- Forks
- 171
- Avg merge
- 4d 11h
- Merged PRs (30d)
- 20
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from atomvm/AtomVM
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 3 days
-
lwIP sockets: a failed listen or connect leaves the socket lock held, a later close hangs foreverOpen
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 3 days
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
milind-soni/OpenMausBot#5829 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
finos/fluxnova-bpm-platform#387 ·
Maintainers usually reply within 4 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
OHDSI/Data2Evidence#3693 ·
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Project-N-E-K-O/N.E.K.O#3725 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
kubernetes-sigs/headlamp#8408 ·
Maintainers usually reply within 1 day