[External] : Re: bug: breakpoints in in an anonymous class method executed on a virtual thread callstack are skipped

Chris Plummer chris.plummer at oracle.com
Wed Jul 5 17:54:37 UTC 2023


Hi Ben,

Can you elaborate on the issue you had with writing a minimal test case?

thanks,

Chris

On 7/1/23 5:00 PM, Ben Berman wrote:
> I did not succeed in writing a minimal test case. It feels like human 
> fuzzing. Surely there is a better way.
>
> -Ben
>
> On Thu, Jun 29, 2023 at 2:47 PM Chris Plummer 
> <chris.plummer at oracle.com> wrote:
>
>     Writing a test case in jtreg would be very helpful.
>     test/jdk/com/sun/jdi/BreakpointTest.java would be a good starting
>     point
>     for a new test. Note however this might be an IDE interaction
>     issue, and
>     you might not be successful in writing a jtreg test case the
>     reproduces
>     the problem. But that in itself would be useful to know.
>
>     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://urldefense.com/v3/__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__;JSUlJSUlJQ!!ACWV5N9M2RV99hQ!OMCGPkJwf-_phbiidESZklozXM_koH4yX6A25RjxKBh46-xbKaaitZObn6ju83CEpkr0xaSQbrdOCVQIdCLbOAUaC7R7bQ$>
>
>     >
>     <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://urldefense.com/v3/__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__;JSUlJSUlJQ!!ACWV5N9M2RV99hQ!OMCGPkJwf-_phbiidESZklozXM_koH4yX6A25RjxKBh46-xbKaaitZObn6ju83CEpkr0xaSQbrdOCVQIdCLbOAUaC7R7bQ$>>.,%20OS%20Mac%20OS%20X(aarch64)%20v13.4,%20screens%203456.0x2234.0;%20Retina
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/loom-dev/attachments/20230705/8051e75e/attachment-0001.htm>


More information about the loom-dev mailing list