cannot ignore false positive thread deadlock for com.sun.javafx.application.LauncherImpl

Questions about YourKit Java Profiler
Post Reply
mgroth49
Posts: 8
Joined: Sat Nov 12, 2022 3:42 pm

cannot ignore false positive thread deadlock for com.sun.javafx.application.LauncherImpl

Post by mgroth49 »

I am getting thread deadlocks every run like the following:

Code: Select all

jdk.internal.misc.Unsafe.park(Native Method)
java.util.concurrent.locks.LockSupport.park(LockSupport.java:211)
java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:715)
java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1047)
java.util.concurrent.CountDownLatch.await(CountDownLatch.java:230)
com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:857)
com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:196)
com.sun.javafx.application.LauncherImpl$$Lambda$411.0x000000080033bdd8.run()
java.lang.Thread.run(Thread.java:833)
I need to ignore it because of LauncherImpl.launchApplication is supposed to "park" the thread and therefore is a false positive.

However, as you can see the stack trace involves some randomness (com.sun.javafx.application.LauncherImpl$$Lambda$411.0x000000080033bdd8.) That part can be anything (0x000000080033b700, 0x000000080033a268, etc.)

When I click "Ignore a false positive" an entry is added to deadlock_ignore_list.json like the following:

Code: Select all

 [
    "jdk.internal.misc.Unsafe : park(boolean, long)",
    "java.util.concurrent.locks.LockSupport : park(java.lang.Object)",
    "java.util.concurrent.locks.AbstractQueuedSynchronizer : acquire(java.util.concurrent.locks.AbstractQueuedSynchronizer$Node, int, boolean, boolean, boolean, long)",
    "java.util.concurrent.locks.AbstractQueuedSynchronizer : acquireSharedInterruptibly(int)",
    "java.util.concurrent.CountDownLatch : await()",
    "com.sun.javafx.application.LauncherImpl : launchApplication1(java.lang.Class, java.lang.Class, java.lang.String[])",
    "com.sun.javafx.application.LauncherImpl : lambda$launchApplication$2(java.lang.Class, java.lang.Class, java.lang.String[], java.util.concurrent.CountDownLatch)",
    "com.sun.javafx.application.LauncherImpl$$Lambda$*.0x0000000800382548 : run()"
  ] 
However, this is not working. While all of my other ignores are working, this one is not ignoring. I assume its because of that random part of LauncherImpl.

I noticed the asterisk. I assume its some sort of wild card. So I tried manually adding the following to the json file:

Code: Select all

[
    "jdk.internal.misc.Unsafe : park(boolean, long)",
    "java.util.concurrent.locks.LockSupport : park(java.lang.Object)",
    "java.util.concurrent.locks.AbstractQueuedSynchronizer : acquire(java.util.concurrent.locks.AbstractQueuedSynchronizer$Node, int, boolean, boolean, boolean, long)",
    "java.util.concurrent.locks.AbstractQueuedSynchronizer : acquireSharedInterruptibly(int)",
    "java.util.concurrent.CountDownLatch : await()",
    "com.sun.javafx.application.LauncherImpl : launchApplication1(java.lang.Class, java.lang.Class, java.lang.String[])",
    "com.sun.javafx.application.LauncherImpl : lambda$launchApplication$2(java.lang.Class, java.lang.Class, java.lang.String[], java.util.concurrent.CountDownLatch)",
    "com.sun.javafx.application.LauncherImpl$$Lambda$*.0x* : run()"
  ]
However, this did not work.
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: cannot ignore false positive thread deadlock for com.sun.javafx.application.LauncherImpl

Post by Anton Katilin »

Hi,

We'll investigate.

Regarding the workaround. Please try a more generic pattern e.g "com.sun.javafx.application.LauncherImpl* : run()"

Please ensure you apply the manual changes while the profiler UI is not running, start it after the changes have been saved.

Best regards,
Anton
mgroth49
Posts: 8
Joined: Sat Nov 12, 2022 3:42 pm

Re: cannot ignore false positive thread deadlock for com.sun.javafx.application.LauncherImpl

Post by mgroth49 »

Your workaround seems to work perfectly.

Thanks.
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: cannot ignore false positive thread deadlock for com.sun.javafx.application.LauncherImpl

Post by Anton Katilin »

Hi,

Lambda pattern handling will be improved in the next build.

Best regards,
Anton
Post Reply