A customer reported a crash when producing a JFR recording with `path-to-gc-roots=true`. It was a native stack overflow that occurred during the recursive path-to-gc-root search performed in the context of PathToGcRootsOperation.
We try to avoid this by limiting the maximum search depth (DFSClosure::max_dfs_depth). That solution is brittle, however, since recursion depth is not a good proxy for thread stack usage: it depends on many factors, e.g., compiler inlining decisions and platform specifics. In this case, the VMThread's stack was too small.
The search should be implemented in a non-recursive manner.
We try to avoid this by limiting the maximum search depth (DFSClosure::max_dfs_depth). That solution is brittle, however, since recursion depth is not a good proxy for thread stack usage: it depends on many factors, e.g., compiler inlining decisions and platform specifics. In this case, the VMThread's stack was too small.
The search should be implemented in a non-recursive manner.
- relates to
-
JDK-8371630 jdk/jfr/jvm/TestWaste.java failing after JDK-8369949
-
- Open
-
-
JDK-8373128 Stack overflow handling for non-Java threads
-
- New
-
- links to
-
Review(master)
openjdk/jdk/28659