aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_process_dump.c
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2018-02-15 20:31:17 +0100
committerSverker Eriksson <[email protected]>2018-02-20 17:37:21 +0100
commitfac2f04b8e294b137d8bc4292fcaefb597faf9e8 (patch)
tree1ede21430b58e0aabe14186e8a6600c4fe4ec710 /erts/emulator/beam/erl_process_dump.c
parent283e669d971cdd493226d33ae89e507acf84ea7b (diff)
downloadotp-fac2f04b8e294b137d8bc4292fcaefb597faf9e8.tar.gz
otp-fac2f04b8e294b137d8bc4292fcaefb597faf9e8.tar.bz2
otp-fac2f04b8e294b137d8bc4292fcaefb597faf9e8.zip
erts: Include failing garbing process in crash dump
Exclude garbing processes, EXCEPT if run by crash dumping thread in which case we assume the heap is healthy without any move markers yet/left. Switched order between (allocating) setup_rootset() and (move marking) collect_live_heap_frags().
Diffstat (limited to 'erts/emulator/beam/erl_process_dump.c')
-rw-r--r--erts/emulator/beam/erl_process_dump.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/erts/emulator/beam/erl_process_dump.c b/erts/emulator/beam/erl_process_dump.c
index e0b795fbf3..c30a1e48ec 100644
--- a/erts/emulator/beam/erl_process_dump.c
+++ b/erts/emulator/beam/erl_process_dump.c
@@ -78,8 +78,17 @@ erts_deep_process_dump(fmtfn_t to, void *to_arg)
Process *p = erts_pix2proc(i);
if (p && p->i != ENULL) {
erts_aint32_t state = erts_smp_atomic32_read_acqb(&p->state);
- if (!(state & (ERTS_PSFLG_EXITING|ERTS_PSFLG_GC)))
- dump_process_info(to, to_arg, p);
+ if (state & ERTS_PSFLG_EXITING)
+ continue;
+ if (state & ERTS_PSFLG_GC) {
+ ErtsSchedulerData *sdp = erts_get_scheduler_data();
+ if (!sdp || p != sdp->current_process)
+ continue;
+
+ /* We want to dump the garbing process that caused the dump */
+ }
+
+ dump_process_info(to, to_arg, p);
}
}