-
Bug
-
Resolution: Unresolved
-
P4
-
None
-
8
-
generic
-
generic
A DESCRIPTION OF THE PROBLEM :
The deadlock has already been reported in https://bugs.openjdk.org/browse/JDK-8030092 but didn't get any attention.
We recently hit this bug regularly after upgrading to 8u345 on a server which also uses the jolokia agent.
Both Jolokia's initialization of com.sun.net.httpserver.HttpServer and a call to System.setProperty trigger the JUL initialization and causes the deadlock.
https://github.com/rhuss/jolokia/issues/535
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
8u345
Server that calls System.setProperty() on startup
-javaagent:jolokia-jvm-1.7.1=port=localhost,host=127.0.0.1
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Server booting correctly
ACTUAL -
Deadlock + server freezing
"JolokiaStart":
at sun.util.logging.PlatformLogger.redirectPlatformLoggers(PlatformLogger.java:209)
- waiting to lock <0x00000000d78c5310> ERROR 30/Nov/2022:14:51:54.757 [567f:000000000000000000000000] (a java.lang.Class for sun.util.logging.PlatformLogger)
at java.util.logging.LogManager$3.run(LogManager.java:402)
at java.util.logging.LogManager$3.run(LogManager.java:396)
at java.security.AccessController.doPrivileged(Native Method)
at java.util.logging.LogManager.readPrimordialConfiguration(LogManager.java:396)
- locked <0x00000000d780ed90> ERROR 30/Nov/2022:14:51:54.757 [567f:000000000000000000000000] (a java.util.logging.LogManager)
at java.util.logging.LogManager.access$800(LogManager.java:145)
at java.util.logging.LogManager$2.run(LogManager.java:345)
at java.security.AccessController.doPrivileged(Native Method)
at java.util.logging.LogManager.ensureLogManagerInitialized(LogManager.java:338)
- locked <0x00000000d780ed90> ERROR 30/Nov/2022:14:51:54.757 [567f:000000000000000000000000] (a java.util.logging.LogManager)
at java.util.logging.LogManager.getLogManager(LogManager.java:378)
at java.util.logging.Logger.demandLogger(Logger.java:448)
at java.util.logging.Logger.getLogger(Logger.java:502)
at sun.net.httpserver.ServerImpl.<init>(ServerImpl.java:92)
at sun.net.httpserver.HttpServerImpl.<init>(HttpServerImpl.java:50)
at sun.net.httpserver.DefaultHttpServerProvider.createHttpServer(DefaultHttpServerProvider.java:35)
at com.sun.net.httpserver.HttpServer.create(HttpServer.java:130)
at org.jolokia.jvmagent.JolokiaServer.createHttpServer(JolokiaServer.java:238)
at org.jolokia.jvmagent.JolokiaServer.init(JolokiaServer.java:167)
at org.jolokia.jvmagent.JolokiaServer.<init>(JolokiaServer.java:77)
at org.jolokia.jvmagent.JvmAgent$1.run(JvmAgent.java:98)
"main":
at java.util.logging.LogManager.ensureLogManagerInitialized(LogManager.java:317)
- waiting to lock <0x00000000d780ed90> ERROR 30/Nov/2022:14:51:54.757 [567f:000000000000000000000000] (a java.util.logging.LogManager)
at java.util.logging.LogManager.getLogManager(LogManager.java:378)
at java.util.logging.Logger.getPlatformLogger(Logger.java:572)
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 <0x00000000d78c5310> ERROR 30/Nov/2022:14:51:54.758 [567f:000000000000000000000000] (a java.lang.Class for sun.util.logging.PlatformLogger)
at jdk.internal.event.EventHelper.isLoggingSecurity(EventHelper.java:138)
at java.security.Security.setProperty(Security.java:874)
CUSTOMER SUBMITTED WORKAROUND :
We patched jolokia to delay its startup. We never ran into this deadlock anymore because now JUL is initialized before jolokia starts
The deadlock has already been reported in https://bugs.openjdk.org/browse/JDK-8030092 but didn't get any attention.
We recently hit this bug regularly after upgrading to 8u345 on a server which also uses the jolokia agent.
Both Jolokia's initialization of com.sun.net.httpserver.HttpServer and a call to System.setProperty trigger the JUL initialization and causes the deadlock.
https://github.com/rhuss/jolokia/issues/535
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
8u345
Server that calls System.setProperty() on startup
-javaagent:jolokia-jvm-1.7.1=port=localhost,host=127.0.0.1
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Server booting correctly
ACTUAL -
Deadlock + server freezing
"JolokiaStart":
at sun.util.logging.PlatformLogger.redirectPlatformLoggers(PlatformLogger.java:209)
- waiting to lock <0x00000000d78c5310> ERROR 30/Nov/2022:14:51:54.757 [567f:000000000000000000000000] (a java.lang.Class for sun.util.logging.PlatformLogger)
at java.util.logging.LogManager$3.run(LogManager.java:402)
at java.util.logging.LogManager$3.run(LogManager.java:396)
at java.security.AccessController.doPrivileged(Native Method)
at java.util.logging.LogManager.readPrimordialConfiguration(LogManager.java:396)
- locked <0x00000000d780ed90> ERROR 30/Nov/2022:14:51:54.757 [567f:000000000000000000000000] (a java.util.logging.LogManager)
at java.util.logging.LogManager.access$800(LogManager.java:145)
at java.util.logging.LogManager$2.run(LogManager.java:345)
at java.security.AccessController.doPrivileged(Native Method)
at java.util.logging.LogManager.ensureLogManagerInitialized(LogManager.java:338)
- locked <0x00000000d780ed90> ERROR 30/Nov/2022:14:51:54.757 [567f:000000000000000000000000] (a java.util.logging.LogManager)
at java.util.logging.LogManager.getLogManager(LogManager.java:378)
at java.util.logging.Logger.demandLogger(Logger.java:448)
at java.util.logging.Logger.getLogger(Logger.java:502)
at sun.net.httpserver.ServerImpl.<init>(ServerImpl.java:92)
at sun.net.httpserver.HttpServerImpl.<init>(HttpServerImpl.java:50)
at sun.net.httpserver.DefaultHttpServerProvider.createHttpServer(DefaultHttpServerProvider.java:35)
at com.sun.net.httpserver.HttpServer.create(HttpServer.java:130)
at org.jolokia.jvmagent.JolokiaServer.createHttpServer(JolokiaServer.java:238)
at org.jolokia.jvmagent.JolokiaServer.init(JolokiaServer.java:167)
at org.jolokia.jvmagent.JolokiaServer.<init>(JolokiaServer.java:77)
at org.jolokia.jvmagent.JvmAgent$1.run(JvmAgent.java:98)
"main":
at java.util.logging.LogManager.ensureLogManagerInitialized(LogManager.java:317)
- waiting to lock <0x00000000d780ed90> ERROR 30/Nov/2022:14:51:54.757 [567f:000000000000000000000000] (a java.util.logging.LogManager)
at java.util.logging.LogManager.getLogManager(LogManager.java:378)
at java.util.logging.Logger.getPlatformLogger(Logger.java:572)
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 <0x00000000d78c5310> ERROR 30/Nov/2022:14:51:54.758 [567f:000000000000000000000000] (a java.lang.Class for sun.util.logging.PlatformLogger)
at jdk.internal.event.EventHelper.isLoggingSecurity(EventHelper.java:138)
at java.security.Security.setProperty(Security.java:874)
CUSTOMER SUBMITTED WORKAROUND :
We patched jolokia to delay its startup. We never ran into this deadlock anymore because now JUL is initialized before jolokia starts
- relates to
-
JDK-8030092 Deadlock on LogManager initialization but via <clinit> of HttpURLConnection
-
- Open
-