RFR: 8296646: com/sun/jdi/JdbLastErrorTest.java test failure

2023-02-06 Thread Kevin Walls
This test fails sometimes with ZGC. It is testing using Panama to access Windows' last error value, and can of course be interrupted by VM work that changes the value, but it does generally work. Skipping the test with ZGC is reasonable as you don't really _have_ to step through this kind of Pan

Re: RFR: 8299739: HashedPasswordFileTest.java and ExceptionTest.java can fail with java.lang.NullPointerException

2023-02-06 Thread Kevin Walls
On Fri, 6 Jan 2023 13:11:41 GMT, Kevin Walls wrote: > Exceptions during setup of these tests could leave e.g. JMXConnector cs as > null. > But, we call cs.close() during a finally block and fail with an NPE, > obscuring the real failure. > We must only call close if this is not null. Thanks Ch

Re: RFR: 8282379: [LOOM] vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod011 sometimes fails

2023-02-06 Thread Chris Plummer
On Mon, 6 Feb 2023 00:34:38 GMT, David Holmes wrote: > Relying on `sleep(0)` to avoid the problem with virtual threads seems fragile > - what if the action of that changes for VTs in the future? In any case the > use of `sleep(0)` needs to be documented so it doesn't get changed back, or > con

Re: RFR: 8297638: Memory leak in case of many started-dead threads [v2]

2023-02-06 Thread Chris Plummer
On Thu, 19 Jan 2023 21:59:22 GMT, Chris Plummer wrote: >> Fix JDI leak when the debuggee creates a lot of threads, while at the same >> the debugger is not sending any commands. The lack of commands being sent >> results in code not being triggered that normally would clear out >> unreachable

Re: RFR: 8282379: [LOOM] vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod011 sometimes fails [v2]

2023-02-06 Thread Chris Plummer
> A number of tests that use JDI invokeMethod() support occasionally fail when > run using virtual threads. The tests fail with: > > > # ERROR: TEST FAILED: wrong invocation: > # ERROR: invoking debuggee thread instance of > java.lang.VirtualThread(name='invokemethod010tThr', id=272) > # ERROR:

Re: RFR: 8282379: [LOOM] vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod011 sometimes fails

2023-02-06 Thread Chris Plummer
On Fri, 3 Feb 2023 21:40:59 GMT, Chris Plummer wrote: > A number of tests that use JDI invokeMethod() support occasionally fail when > run using virtual threads. The tests fail with: > > > # ERROR: TEST FAILED: wrong invocation: > # ERROR: invoking debuggee thread instance of > java.lang.Virt

Re: RFR: 8228604: StackMapFrames are missing from redefined class bytes of retransformed classes [v4]

2023-02-06 Thread Serguei Spitsyn
On Thu, 2 Feb 2023 19:08:49 GMT, Alex Menkov wrote: >> classFileParser drops stack map frames for JDK classes (when verification is >> not required). >> As a result JvmtiClassFileReconstituter cannot restore the attribute for >> class redefinition. >> Note that if the class is in CDS archive, t

Re: RFR: 8282379: [LOOM] vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod011 sometimes fails [v2]

2023-02-06 Thread David Holmes
On Mon, 6 Feb 2023 21:57:11 GMT, Chris Plummer wrote: >> A number of tests that use JDI invokeMethod() support occasionally fail when >> run using virtual threads. The tests fail with: >> >> >> # ERROR: TEST FAILED: wrong invocation: >> # ERROR: invoking debuggee thread instance of >> java.la

Re: RFR: 8282379: [LOOM] vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod011 sometimes fails [v2]

2023-02-06 Thread David Holmes
On Mon, 6 Feb 2023 21:57:11 GMT, Chris Plummer wrote: >> A number of tests that use JDI invokeMethod() support occasionally fail when >> run using virtual threads. The tests fail with: >> >> >> # ERROR: TEST FAILED: wrong invocation: >> # ERROR: invoking debuggee thread instance of >> java.la

Re: RFR: 8297638: Memory leak in case of many started-dead threads [v2]

2023-02-06 Thread Alex Menkov
On Thu, 19 Jan 2023 21:59:22 GMT, Chris Plummer wrote: >> Fix JDI leak when the debuggee creates a lot of threads, while at the same >> the debugger is not sending any commands. The lack of commands being sent >> results in code not being triggered that normally would clear out >> unreachable

Re: RFR: 8296646: com/sun/jdi/JdbLastErrorTest.java test failure

2023-02-06 Thread David Holmes
On Mon, 6 Feb 2023 14:24:51 GMT, Kevin Walls wrote: > This test fails sometimes with ZGC. It is testing using Panama to access > Windows' last error value, and can of course be interrupted by VM work that > changes the value, but it does generally work. Skipping the test with ZGC is > reasonab

Re: RFR: 8299739: HashedPasswordFileTest.java and ExceptionTest.java can fail with java.lang.NullPointerException

2023-02-06 Thread Alex Menkov
On Fri, 6 Jan 2023 13:11:41 GMT, Kevin Walls wrote: > Exceptions during setup of these tests could leave e.g. JMXConnector cs as > null. > But, we call cs.close() during a finally block and fail with an NPE, > obscuring the real failure. > We must only call close if this is not null. Exception

Re: RFR: 8282379: [LOOM] vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod011 sometimes fails [v2]

2023-02-06 Thread Serguei Spitsyn
On Tue, 7 Feb 2023 00:56:21 GMT, David Holmes wrote: >> Chris Plummer has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Get rid of Thread.sleep() in the invoked method can add warning comment. > > test/hotspot/jtreg/vmTestbase/nsk/jdi/Clas

Re: RFR: 8299739: HashedPasswordFileTest.java and ExceptionTest.java can fail with java.lang.NullPointerException

2023-02-06 Thread Alex Menkov
On Fri, 6 Jan 2023 13:11:41 GMT, Kevin Walls wrote: > Exceptions during setup of these tests could leave e.g. JMXConnector cs as > null. > But, we call cs.close() during a finally block and fail with an NPE, > obscuring the real failure. > We must only call close if this is not null. My only g

Re: RFR: 8296646: com/sun/jdi/JdbLastErrorTest.java test failure

2023-02-06 Thread Serguei Spitsyn
On Mon, 6 Feb 2023 14:24:51 GMT, Kevin Walls wrote: > This test fails sometimes with ZGC. It is testing using Panama to access > Windows' last error value, and can of course be interrupted by VM work that > changes the value, but it does generally work. Skipping the test with ZGC is > reasonab

Re: RFR: 8282379: [LOOM] vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod011 sometimes fails [v2]

2023-02-06 Thread Chris Plummer
On Tue, 7 Feb 2023 01:00:43 GMT, David Holmes wrote: > Okay so these tests are incredibly fragile - as you note display() may be a > problem in theory, as could any potential class-loading or initialization. Yes, the more that is done int the called method the more fragile it becomes. The jav

Re: RFR: 8282379: [LOOM] vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod011 sometimes fails [v2]

2023-02-06 Thread Chris Plummer
On Tue, 7 Feb 2023 01:49:39 GMT, Serguei Spitsyn wrote: >> test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod011t.java >> line 94: >> >>> 92: while(!doExit) { >>> 93: l--; l++; >>> 94: Thread.currentThread().sleep(0); >> >> BTW this is an

Re: RFR: 8297638: Memory leak in case of many started-dead threads [v2]

2023-02-06 Thread Chris Plummer
On Tue, 7 Feb 2023 02:21:32 GMT, Serguei Spitsyn wrote: >> Chris Plummer has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Cleaned up removeUnreachableListeners(). > > src/jdk.jdi/share/classes/com/sun/tools/jdi/VMState.java line 184: > >

Re: RFR: 8297638: Memory leak in case of many started-dead threads [v2]

2023-02-06 Thread Serguei Spitsyn
On Thu, 19 Jan 2023 21:59:22 GMT, Chris Plummer wrote: >> Fix JDI leak when the debuggee creates a lot of threads, while at the same >> the debugger is not sending any commands. The lack of commands being sent >> results in code not being triggered that normally would clear out >> unreachable

Re: RFR: 8297638: Memory leak in case of many started-dead threads [v2]

2023-02-06 Thread Chris Plummer
On Tue, 7 Feb 2023 02:23:43 GMT, Chris Plummer wrote: >> src/jdk.jdi/share/classes/com/sun/tools/jdi/VMState.java line 184: >> >>> 182: // We always need to clear the ReferenceQueue >>> 183: while (listenersReferenceQueue.poll() != null) >>> 184: ; >> >> I'm not sure

Re: RFR: 8282379: [LOOM] vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod011 sometimes fails [v2]

2023-02-06 Thread David Holmes
On Mon, 6 Feb 2023 21:57:11 GMT, Chris Plummer wrote: >> A number of tests that use JDI invokeMethod() support occasionally fail when >> run using virtual threads. The tests fail with: >> >> >> # ERROR: TEST FAILED: wrong invocation: >> # ERROR: invoking debuggee thread instance of >> java.la

Re: RFR: 8296646: com/sun/jdi/JdbLastErrorTest.java test failure

2023-02-06 Thread Chris Plummer
On Mon, 6 Feb 2023 14:24:51 GMT, Kevin Walls wrote: > This test fails sometimes with ZGC. It is testing using Panama to access > Windows' last error value, and can of course be interrupted by VM work that > changes the value, but it does generally work. Skipping the test with ZGC is > reasonab

Re: RFR: 8297638: Memory leak in case of many started-dead threads [v2]

2023-02-06 Thread Serguei Spitsyn
On Tue, 7 Feb 2023 02:25:45 GMT, Chris Plummer wrote: >> The poll() removes the next object from the queue. > > This code is a bit odd in that it uses the reference queue to find out if > there are one or more unreachable listeners. If there are, then it uses the > code below to remove them. So

RFR: 8301767: Convert virtual thread tests to JUnit

2023-02-06 Thread Alan Bateman
The non-hotspot tests integrated with JEP 425/428 were mostly TestNG tests. We'd like to convert these JUnit in the main line in advance of other updates to these tests in 21. The changes are mostly mechanical and trivial: - BeforeClass/AfterClass changed to static BeforeAll/AfterAll methods -