Skip to content

[Fix #149] DTFJ/OpenJ9 system dumps: mark all alive threads as GC roots - #150

Merged
kgibm merged 1 commit into
eclipse-mat:masterfrom
kgibm:issue149
Dec 30, 2025
Merged

[Fix #149] DTFJ/OpenJ9 system dumps: mark all alive threads as GC roots#150
kgibm merged 1 commit into
eclipse-mat:masterfrom
kgibm:issue149

Conversation

@kgibm

@kgibm kgibm commented Dec 30, 2025

Copy link
Copy Markdown
Member

Pending eclipse-openj9/openj9#23137

There were a bunch of different ways to solve this. I chose the most surgical and conservative: Iterate through all threads and remember any that are JavaThread.STATE_ALIVE. Then, when processing the GC roots of the JavaRuntime, if we find a thread there, ignore the GC root reachability (in one example dump demonstrating this issue, WEAK), and set the reachability to REACHABILITY_STRONG and the type of root to THREAD_OBJ. No other significant changes although the diff shows a lot due to spacing changes because some try/catch blocks and initialization had to be moved around to make the most surgical change. All local tests pass. This change only impacts DTFJ and OpenJ9 system dumps, so I'll commit directly but open to feedback.

Fixes #149

…s as GC roots

Signed-off-by: Kevin Grigorenko <kevin.grigorenko@us.ibm.com>
@kgibm
kgibm merged commit ce64324 into eclipse-mat:master Dec 30, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DTFJ: Some active threads may be incorrectly marked as unreachable

1 participant