RFR: 8315484: java/awt/dnd/RejectDragDropActionTest.java timed out [v3]
Damon Nguyen
dnguyen at openjdk.org
Thu Oct 5 15:50:40 UTC 2023
On Tue, 3 Oct 2023 22:33:16 GMT, Damon Nguyen <dnguyen at openjdk.org> wrote:
>> test/jdk/java/awt/dnd/RejectDragDropActionTest.java line 1:
>>
>>> 1: /*
>>
>> I've got questions whether all the AWT resources are released.
>>
>> When the test fails with timeout, the screen shot does not have the frame, it displays an empty desktop.
>>
>> The stack trace for the main thread:
>>
>>
>> java.base/java.lang.Object.wait0(Native Method)
>> java.base/java.lang.Object.wait(Object.java:375)
>> java.base/java.lang.Thread.join(Thread.java:2045)
>> java.base/java.lang.Thread.join(Thread.java:2121)
>> java.base/java.lang.ApplicationShutdownHooks.runHooks(ApplicationShutdownHooks.java:114)
>> java.base/java.lang.ApplicationShutdownHooks$1.run(ApplicationShutdownHooks.java:47)
>> java.base/java.lang.Shutdown.runHooks(Shutdown.java:130)
>> java.base/java.lang.Shutdown.exit(Shutdown.java:167)
>> java.base/java.lang.Runtime.exit(Runtime.java:188)
>> java.base/java.lang.System.exit(System.java:1920)
>> com.sun.javatest.regtest.agent.AStatus.exit(AStatus.java:198)
>> com.sun.javatest.regtest.agent.MainWrapper.main(MainWrapper.java:95)"
>>
>>
>> That is the main method of the test class terminated. Yet JVM does not exit for whatever reason.
>>
>> At the same time, the thread dump contains both `AWT-Windows` and `AWT-EventQueue-0` threads, which means AWT prevents the JVM from exiting. Why? I have no clue.
>>
>> Will removing the mouse listeners from the frame let it be disposed of?
>>
>> if (frame != null) {
>> frame.removeMouseListener((MouseListener) dgr);
>> frame.removeMouseMotionListener((MouseMotionListener) dgr);
>> frame.dispose();
>> }
>>
>>
>> Although the changes that you've made make the test faster, it may still time out unless we find the root cause.
>
> Interesting, let me look into this quickly. Didn't notice this.
I can't seem to tell whether or not the JVM exits at the end of the test when the frame is disposed. Does removing the listeners work for you? And where are you checking the stack trace? I can't reproduce this on my machine
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16018#discussion_r1347640465
More information about the client-libs-dev
mailing list