Commit 71f4839
committed
fix: disable lockedSynchronizers in dumpAllThreads to avoid safepoint heap scan (#16194)
`ThreadMXBean.dumpAllThreads(true, true)` with lockedSynchronizers=true
forces the JVM to scan the entire heap at a safepoint to find all
AbstractOwnableSynchronizer instances. On ZGC with large heaps (65GB+),
this causes ~37-second safepoint pauses that freeze all application
threads, leading to cascading thread pool exhaustion.
Change lockedSynchronizers from true to false. This retains locked
monitor information (derived from thread stacks, cheap) but skips the
expensive heap scan. Only java.util.concurrent.locks ownership info
is lost from the thread dump output.
Fixes #161941 parent 69084bd commit 71f4839
1 file changed
Lines changed: 6 additions & 1 deletion
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
37 | 42 | | |
38 | 43 | | |
39 | 44 | | |
| |||
0 commit comments