Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8049585

Deadlock between PlatformLogger and AppContext

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2
    • Resolution: Duplicate
    • Affects Version/s: 8, 9
    • Fix Version/s: 9
    • Component/s: client-libs
    • Labels:

      Description

      We see the following deadlock in our HotSpot testing:


      Found one Java-level deadlock:
      =============================

      "Thread-32":
        waiting to lock Monitor@0x0000000001d3a7a0 (Object@0x0000000694e24bf8, a sun/awt/AppContext$GetAppContextLock),
        which is held by "Thread-50"
      "Thread-50":
        waiting to lock Monitor@0x0000000001ae0d60 (Object@0x00000003c075c440, a java/lang/Class),
        which is held by "Thread-32"

      And the threads are standing still at:
      "Thread-50" #71 prio=5 os_prio=64 tid=0x0000000001c67000 nid=0x61 waiting for monitor entry [0xfffffd7fbd8c8000]
         java.lang.Thread.State: BLOCKED (on object monitor)
         JavaThread state: _thread_blocked
      Thread: 0x0000000001c67000 [0x61] State: _at_safepoint _has_called_back 0 _at_poll_safepoint 0
         JavaThread state: _thread_blocked
      at sun.util.logging.PlatformLogger.getLogger(PlatformLogger.java:192)
      - waiting to lock <0x00000003c075c440> (a java.lang.Class for sun.util.logging.PlatformLogger)
      at java.awt.EventQueue.<clinit>(EventQueue.java:185)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:259)
      at sun.awt.SunToolkit.initEQ(SunToolkit.java:119)
      at sun.awt.SunToolkit.createNewAppContext(SunToolkit.java:304)
      at sun.awt.AppContext$2.run(AppContext.java:277)
      at sun.awt.AppContext$2.run(AppContext.java:266)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.awt.AppContext.initMainAppContext(AppContext.java:266)
      at sun.awt.AppContext.access$400(AppContext.java:135)
      at sun.awt.AppContext$3.run(AppContext.java:321)
      - locked <0x0000000694e24bf8> (a sun.awt.AppContext$GetAppContextLock)
      at sun.awt.AppContext$3.run(AppContext.java:304)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.awt.AppContext.getAppContext(AppContext.java:303)
      at java.awt.Component.<init>(Component.java:999)
      at java.awt.Button.<init>(Button.java:151)
      at java.awt.Button.<init>(Button.java:139)
      at javasoft.sqe.tests.api.java.util.EventObject.serial.ConstructorTests.ConstructorTest0001(ConstructorTests.java:66)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:484)
      at javasoft.sqe.javatest.lib.MultiTest.invokeTestCase(MultiTest.java:406)
      at javasoft.sqe.javatest.lib.MultiTest.run(MultiTest.java:195)
      at sun.reflect.GeneratedMethodAccessor39.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:484)
      at nsk.stress.share.StressTest$TestThread.runTest(StressTest.java:756)
      at nsk.stress.share.StressTest$TestThread.run(StressTest.java:770)

      "Thread-32" #53 prio=5 os_prio=64 tid=0x0000000001ca7000 nid=0x4f waiting for monitor entry [0xfffffd7fbeadb000]
         java.lang.Thread.State: BLOCKED (on object monitor)
         JavaThread state: _thread_blocked
      Thread: 0x0000000001ca7000 [0x4f] State: _at_safepoint _has_called_back 0 _at_poll_safepoint 0
         JavaThread state: _thread_blocked
      at sun.awt.AppContext$3.run(AppContext.java:318)
      - waiting to lock <0x0000000694e24bf8> (a sun.awt.AppContext$GetAppContextLock)
      at sun.awt.AppContext$3.run(AppContext.java:304)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.awt.AppContext.getAppContext(AppContext.java:303)
      at sun.awt.AppContext$6.getAppletContext(AppContext.java:869)
      at java.util.logging.LogManager.getUserContext(LogManager.java:421)
      - locked <0x0000000694ea8f78> (a sun.awt.AppContext$6)
      at java.util.logging.LogManager.addLogger(LogManager.java:1073)
      at java.util.logging.LogManager.demandSystemLogger(LogManager.java:505)
      at java.util.logging.Logger.getPlatformLogger(Logger.java:576)
      at java.util.logging.LoggingProxyImpl.getLogger(LoggingProxyImpl.java:41)
      at sun.util.logging.LoggingSupport.getLogger(LoggingSupport.java:100)
      at sun.util.logging.PlatformLogger$JavaLoggerProxy.<init>(PlatformLogger.java:602)
      at sun.util.logging.PlatformLogger$JavaLoggerProxy.<init>(PlatformLogger.java:597)
      at sun.util.logging.PlatformLogger.<init>(PlatformLogger.java:239)
      at sun.util.logging.PlatformLogger.getLogger(PlatformLogger.java:198)
      - locked <0x00000003c075c440> (a java.lang.Class for sun.util.logging.PlatformLogger)
      at java.util.prefs.FileSystemPreferences.getLogger(FileSystemPreferences.java:72)
      at java.util.prefs.FileSystemPreferences.access$200(FileSystemPreferences.java:50)
      at java.util.prefs.FileSystemPreferences$1.run(FileSystemPreferences.java:126)
      at java.util.prefs.FileSystemPreferences$1.run(FileSystemPreferences.java:109)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.util.prefs.FileSystemPreferences.setupUserRoot(FileSystemPreferences.java:109)
      at java.util.prefs.FileSystemPreferences.getUserRoot(FileSystemPreferences.java:102)
      - locked <0x00000003c058bf88> (a java.lang.Class for java.util.prefs.FileSystemPreferences)
      at java.util.prefs.FileSystemPreferencesFactory.userRoot(FileSystemPreferencesFactory.java:41)
      at java.util.prefs.Preferences.userRoot(Preferences.java:454)
      at java.util.prefs.Preferences.userNodeForPackage(Preferences.java:368)
      at javasoft.sqe.tests.api.java.util.prefs.Preferences.userNodeForPackageTests.UserNodeForPackage3003(userNodeForPackageTests.java:152)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:484)
      at javasoft.sqe.javatest.lib.MultiTest.invokeTestCase(MultiTest.java:406)
      at javasoft.sqe.javatest.lib.MultiTest.run(MultiTest.java:195)
      at sun.reflect.GeneratedMethodAccessor39.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:484)
      at nsk.stress.share.StressTest$TestThread.runTest(StressTest.java:756)
      at nsk.stress.share.StressTest$TestThread.run(StressTest.java:770)

      ILW = H?H => P1 until it's triaged correctly.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              pchelko Petr Pchelko (Inactive)
              Reporter:
              stefank Stefan Karlsson
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: