IBM Support

IV48872: DEADLOCK BETWEEN JAVA.AWT.EVENTQUEUE AND LOGMANAGER

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Error Message: When creating a new java.awt.AppContext context,
    it will get hanged
    .
    Stack Trace: 3XMTHREADINFO "main" J9VMThread:0x0043F700,
    j9thread_t:0x00407B70, java/lang/Thread:0x10021320, state:B,
    prio=5
    3XMJAVALTHREAD (java/lang/Thread getId:0x1, isDaemon:false)
    3XMTHREADINFO1 (native thread ID:0xD81, native priority:0x5,
    native policy:UNKNOWN)
    3XMTHREADINFO2 (native stack address range from:0x7C9CA000,
    to:0x7D1CA000, size:0x800000)
    3XMCPUTIME CPU usage total: 3.323194467 secs
    3XMTHREADBLOCK Blocked on:
    sun/util/logging/PlatformLogger@0x100925A0 Owned by: "Thread-6"
    (J9VMThread:0x00B2AD00, java/lang/Thread:0x2FEC3330)
    3XMHEAPALLOC Heap bytes allocated since last GC cycle=160088
    (0x27158)
    3XMTHREADINFO3 Java callstack:
    4XESTACKTRACE at
    java/awt/EventQueue.<clinit>(EventQueue.java:184)
    4XESTACKTRACE at java/lang/Class.forNameImpl(Native Method)
    4XESTACKTRACE at java/lang/Class.forName(Class.java:194)
    4XESTACKTRACE at sun/awt/SunToolkit.initEQ(SunToolkit.java:115)
    4XESTACKTRACE at
    sun/awt/SunToolkit.createNewAppContext(SunToolkit.java:294)
    4XESTACKTRACE at sun/awt/AppContext$2.run(AppContext.java:271)
    4XESTACKTRACE at sun/awt/AppContext$2.run(AppContext.java:260)
    4XESTACKTRACE at
    java/security/AccessController.doPrivileged(AccessController.jav
    a:274)
    4XESTACKTRACE at
    sun/awt/AppContext.initMainAppContext(AppContext.java:260)
    4XESTACKTRACE at
    sun/awt/AppContext.access$200(AppContext.java:133)
    4XESTACKTRACE at sun/awt/AppContext$3.run(AppContext.java:314)
    4XESTACKTRACE at sun/awt/AppContext$3.run(AppContext.java:298)
    4XESTACKTRACE at
    java/security/AccessController.doPrivileged(AccessController.jav
    a:274)
    4XESTACKTRACE at
    sun/awt/AppContext.getAppContext(AppContext.java:297)
    4XESTACKTRACE at
    tests/com/ibm/jtc/utils/jse6592/Test6938813.validate(Test6938813
    .java:47)
    4XESTACKTRACE at
    tests/com/ibm/jtc/utils/jse6592/Test6938813.testMain(Test6938813
    .java:38)
    4XESTACKTRACE at
    sun/reflect/NativeMethodAccessorImpl.invoke0(Native Method)
    4XESTACKTRACE at
    sun/reflect/NativeMethodAccessorImpl.invoke(NativeMethodAccessor
    Impl.java:76)
    4XESTACKTRACE at
    sun/reflect/DelegatingMethodAccessorImpl.invoke(DelegatingMethod
    AccessorImpl.java:43)
    4XESTACKTRACE at
    java/lang/reflect/Method.invoke(Method.java:608)
    4XESTACKTRACE at
    junit/framework/TestCase.runTest(TestCase.java:154)
    4XESTACKTRACE at
    junit/framework/TestCase.runBare(TestCase.java:127)
    4XESTACKTRACE at
    junit/framework/TestResult$1.protect(TestResult.java:106)
    4XESTACKTRACE at
    junit/framework/TestResult.runProtected(TestResult.java:124)
    4XESTACKTRACE at
    junit/framework/TestResult.run(TestResult.java:109)
    4XESTACKTRACE at junit/framework/TestCase.run(TestCase.java:118)
    4XESTACKTRACE at
    junit/framework/TestSuite.runTest(TestSuite.java:208)
    4XESTACKTRACE at
    junit/framework/TestSuite.run(TestSuite.java:203)
    4XESTACKTRACE at
    junit/framework/TestSuite.runTest(TestSuite.java:208)
    4XESTACKTRACE at
    junit/framework/TestSuite.run(TestSuite.java:203)
    4XESTACKTRACE at
    com/ibm/jtc/junit/VerboseTestRunner.runTest(Bytecode PC:85)
    4XESTACKTRACE at
    com/ibm/jtc/junit/VerboseTestRunner.main(Bytecode PC:28)
    3XMTHREADINFO "Thread-6" J9VMThread:0x00A9D500,
    j9thread_t:0x007B1FAC, java/lang/Thread:0x2FF49AC0, state:CW,
    prio=5
    3XMJAVALTHREAD (java/lang/Thread getId:0x10, isDaemon:false)
    3XMTHREADINFO1 (native thread ID:0xAC54, native priority:0x5,
    native policy:UNKNOWN)
    3XMTHREADINFO2 (native stack address range from:0x7949B000,
    to:0x794DB000, size:0x40000)
    3XMCPUTIME CPU usage total: 0.002543273 secs
    3XMTHREADBLOCK Waiting on:
    java/lang/J9VMInternals$ClassInitializationLock@0x2FF6C5B0 Owned
    by: <unowned>
    3XMHEAPALLOC Heap bytes allocated since last GC cycle=12712
    (0x31A8)
    3XMTHREADINFO3 Java callstack:
    4XESTACKTRACE at java/lang/Class.forNameImpl(Native Method)
    4XESTACKTRACE at java/lang/Class.forName(Class.java:194)
    4XESTACKTRACE at sun/awt/SunToolkit.initEQ(SunToolkit.java:115)
    4XESTACKTRACE at
    sun/awt/SunToolkit.createNewAppContext(SunToolkit.java:294)
    4XESTACKTRACE at sun/awt/AppContext$2.run(AppContext.java:271)
    4XESTACKTRACE at sun/awt/AppContext$2.run(AppContext.java:260)
    4XESTACKTRACE at
    java/security/AccessController.doPrivileged(AccessController.jav
    a:274)
    4XESTACKTRACE at
    sun/awt/AppContext.initMainAppContext(AppContext.java:260)
    4XESTACKTRACE at
    sun/awt/AppContext.access$200(AppContext.java:133)
    4XESTACKTRACE at sun/awt/AppContext$3.run(AppContext.java:314)
    4XESTACKTRACE at sun/awt/AppContext$3.run(AppContext.java:298)
    4XESTACKTRACE at
    java/security/AccessController.doPrivileged(AccessController.jav
    a:274)
    4XESTACKTRACE at
    sun/awt/AppContext.getAppContext(AppContext.java:297)
    4XESTACKTRACE at
    sun/awt/AppContext$6.getContext(AppContext.java:841)
    4XESTACKTRACE at
    sun/misc/SharedSecrets.getJavaAWTAccess(SharedSecrets.java:200)
    4XESTACKTRACE at
    java/util/logging/LogManager.getUserContext(LogManager.java:359)
    4XESTACKTRACE at
    java/util/logging/LogManager.addLogger(LogManager.java:953)
    4XESTACKTRACE at
    java/util/logging/LogManager.demandSystemLogger(LogManager.java:
    452)
    4XESTACKTRACE at
    java/util/logging/Logger.getPlatformLogger(Logger.java:470)
    4XESTACKTRACE at
    java/util/logging/LoggingProxyImpl.getLogger(LoggingProxyImpl.ja
    va:41)
    4XESTACKTRACE at
    sun/util/logging/LoggingSupport.getLogger(LoggingSupport.java:10
    0)
    4XESTACKTRACE at
    sun/util/logging/PlatformLogger$JavaLoggerProxy.<init>(PlatformL
    ogger.java:639)
    4XESTACKTRACE at
    sun/util/logging/PlatformLogger.redirectToJavaLoggerProxy(Platfo
    rmLogger.java:230)
    4XESTACKTRACE at
    sun/util/logging/PlatformLogger.redirectPlatformLoggers(Platform
    Logger.java:220)
    5XESTACKTRACE (entered lock:
    sun/util/logging/PlatformLogger@0x100725A0, entry count: 1)
    4XESTACKTRACE at
    java/util/logging/LogManager$2$1.run(LogManager.java:299)
    .
    N/A
    

Local fix

  • N/A
    

Problem summary

  • There is a deadlock in design. One thread is initializing
    java.awt.EventQueue so it is holding its class lock and
    acquiring sun.util.logging.PlatformLogger lock, the other thread
    is holding sun.util.logging.PlatformLogger lock and trying to
    initialize java.awt.EventQueue. It causes deadlock.
    

Problem conclusion

  • This defect will be fixed in:
    7.0.0 SR6
    .
    Try to load java.awt.EeventQueue class in LogManager before
    holding sun.util.logging.PlatformLogger lock to avoid the
    deadlock
    

Temporary fix

  • N/A
    

Comments

APAR Information

  • APAR number

    IV48872

  • Reported component name

    JAVA CLASS LIBS

  • Reported component ID

    620700130

  • Reported release

    700

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2013-09-16

  • Closed date

    2013-09-18

  • Last modified date

    2013-10-22

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    JAVA CLASS LIBS

  • Fixed component ID

    620700130

Applicable component levels

  • R700 PSY

       UP

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSNVBF","label":"Runtimes for Java Technology"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"7.0","Line of Business":{"code":"LOB36","label":"IBM Automation"}}]

Document Information

Modified date:
21 February 2022