On Thu, 30 Sep 2021 14:24:50 GMT, Manukumar V S <[email protected]> wrote:
> These two dnd tests fails most of the time with a time out, mostly noticed in
> windows 11 machines.
> 1. java/awt/dnd/AcceptDropMultipleTimes/AcceptDropMultipleTimes.java
> 2. java/awt/dnd/DropTargetEnterExitTest/MissedDragExitTest.java
>
> Fix:
> From the logs, I have noticed that some of the non-daemon threads are still
> waiting even after the test execution is complete. So it could be possible
> that java is waiting for these threads to be finished execution before the
> main thread exits.
> As a fix for this, I have put a Thread.sleep(100) at the end of the main() in
> order to enable other non-daemon threads get a chance to finish their
> execution before the main thread completes.
Looks like the hang occurs in some of the hook executed at the "exit" step. DId
you check which ShutdownHook is executed and hang? Is it possible it is some of
the AWT toolkit related?
at java.lang.Object.wait([email protected]/Native Method)
- waiting on <0x00000000ff504d78> (a java.lang.Thread)
at java.lang.Thread.join([email protected]/Thread.java:1305)
- waiting to re-lock in wait() <0x00000000ff504d78> (a java.lang.Thread)
at java.lang.Thread.join([email protected]/Thread.java:1379)
at
java.lang.ApplicationShutdownHooks.runHooks([email protected]/ApplicationShutdownHooks.java:107)
at
java.lang.ApplicationShutdownHooks$1.run([email protected]/ApplicationShutdownHooks.java:46)
-------------
PR: https://git.openjdk.java.net/jdk/pull/5777