bug: breakpoints in in an anonymous class method executed on a virtual thread callstack are skipped
Chris Plummer
chris.plummer at oracle.com
Mon Jul 10 22:27:33 UTC 2023
Hi Ben,
The first time I read this I didn't notice the link you provided to the
jetbrains issue you filed. I see about halfway down the page you show
the following exception:
JDWP exit error AGENT_ERROR_INVALID_THREAD(203): missing entry in
running thread table
[src/jdk.jdwp.agent/share/native/libjdwp/threadControl.c:1109]
As is pointed out later in this issue page, this looks like JDK-8305209
<https://bugs.openjdk.org/browse/JDK-8305209>, which was fixed a few
months ago. You were ask to try a recent version of JDK 21, and you
replied back that it still reproduced, but the error you show later
indicates that it is still happening at line 1109. It should be line
1116 if you are using a fixed version. Just wanted to double check that
line 1116 is the line number you are seeing the error at when you use
JDK 21.
Also, when this error happens, it should cause the debuggee to exit with
a core file and hs_err file. Are either of these present? The hs_err
file would be very useful since it will contain a stack trace at the
point of the error.
thanks,
Chris
On 6/29/23 2:23 PM, Ben Berman wrote:
> Investigating an issue in both IntelliJ and Eclipse debuggers led to
> this bug: I can't break inside an anonymous class method of the form
>
> ```
> new Object() {
> void test() {
> System.out.println("breakpoint here does not work");
> }
> }.test();
> ```
>
> due to a buggy interaction between JDWP and virtual threads. The
> console statement in the example above does indeed print, i.e. it is
> executed.
>
> What would the next steps be to help with investigating and resolving
> this issue?
>
> https://youtrack.jetbrains.com/issue/IDEA-324002/IntelliJ-debugger-doesnt-break-nor-does-Eclipse-in-a-virtual-threads-project-inside-anonymous-class-methods-reproduction?clearDraft=true&description=%0A%0AIU-231.9161.38,%20JRE%2017.0.7%2B10-b829.16x64%20JetBrains%20s.r.o
> <https://youtrack.jetbrains.com/issue/IDEA-324002/IntelliJ-debugger-doesnt-break-nor-does-Eclipse-in-a-virtual-threads-project-inside-anonymous-class-methods-reproduction?clearDraft=true&description=%0A%0AIU-231.9161.38,%20JRE%2017.0.7%2B10-b829.16x64%20JetBrains%20s.r.o>.,%20OS%20Mac%20OS%20X(aarch64)%20v13.4,%20screens%203456.0x2234.0;%20Retina
More information about the loom-dev
mailing list