On Thu, 24 Sep 2026 04:50:13 GMT, Yasumasa Suenaga <[email protected]> wrote:
> serviceability/sa/TestJhsdbJstackMixedWithXComp.java#xcomp failed due because > stderr has message to report DebuggerException caused by unknown DWARF opcode. > > During the discussion, we've reached the conclusion that it is better to add > `print_waring()` to notice this case (it is handled in > [JDK-8392120](https://bugs.openjdk.org/browse/JDK-8392120): PR #33047), and > the exception should not be shown in normal. > > Thus this PR proposes to show DebuggerException when `LIBSAPROC_DEBUG` > environment variable is set in mixed jstack. > > --------- > - [x] I confirm that I make this contribution in accordance with the [OpenJDK > Interim AI Policy](https://openjdk.org/legal/ai). > So after this change a thread can silently disappear from the output with no > hint that anything went wrong. Yes, but warning message would be shown on stdout after #33047 if DWARF related issue would be happened. > This catch is broader than the case described in the bug. Yes, that's the point where I was stuck. But the exception might be thrown not only `getTopFrame()` but also `sender()`, thus I want to catch the exception in the loop. [Manual of jhsdb](https://docs.oracle.com/en/java/javase/26/docs/specs/man/jhsdb.html) explains `--mixed` is "attempts to" print. And also the comment in exception handler says `continue, may be we can do a better job for other threads`. This PR does not change the behavior, and the exception is for SA developers, so I thought we can ignore it silently if `LIBSAPROC_DEBUG` is set. As other option, I think we can introduce `DwarfException` for this purpose, but I'm not sure we can catch it in `PStack` because "DWARF" is platform-dependent (PStack is common code). What do you think? ------------- PR Comment: https://git.openjdk.org/jdk/pull/33048#issuecomment-5812445290
