[Bug 63251] [JDK-8194653] Deadlock in FileSystems.getDefault on catalina startup
https://bz.apache.org/bugzilla/show_bug.cgi?id=63251 --- Comment #4 from Mark Thomas --- It would be worth testing with Java 8 u231 when released - it is reported as fixed in that version. Meanwhile, you can see if the Spring Boot team is willing to add the workaround to Boot. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 63251] [JDK-8194653] Deadlock in FileSystems.getDefault on catalina startup
https://bz.apache.org/bugzilla/show_bug.cgi?id=63251 --- Comment #3 from harri...@gmail.com --- (In reply to harristr from comment #2) > The work-around of pre-loading the default FileSystem does not appear to > solve the problem for logging, or maybe it only reduced the frequency of the > occurrence. I am still seeing the following stacktrace from a Spring Boot > Microservice running Tomcat 9.0.22 with JDK 1.8.0_222 64-bit on RedHat 7.5: After further investigation I think this work-around actually CAUSED the "deadlock" I am experiencing. I never saw this using Tomcat 9.0.17, it only manifested after an upgrade directly to 9.0.22. In an environment such as mine (a SpringBoot Microservice), Tomcat is NOT running in the main thread or starting first, Spring Boot is. This means the probability of reaching the "deadlock" is higher since Spring Boot is the one running first and Tomcat is coming up in a different thread but is now trying to prime the FileSystem right away. I included more of the thread dump below. "background-preinit" #9 prio=5 os_prio=0 tid=0x02d11800 nid=0x726 waiting for monitor entry [0x7f26ddd01000] java.lang.Thread.State: BLOCKED (on object monitor) at java.lang.Runtime.loadLibrary0(Runtime.java:862) - waiting to lock <0xc010be00> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:1122) at sun.nio.fs.UnixNativeDispatcher$1.run(UnixNativeDispatcher.java:573) at sun.nio.fs.UnixNativeDispatcher$1.run(UnixNativeDispatcher.java:571) at java.security.AccessController.doPrivileged(Native Method) at sun.nio.fs.UnixNativeDispatcher.(UnixNativeDispatcher.java:571) at sun.nio.fs.UnixFileSystem.(UnixFileSystem.java:67) at sun.nio.fs.LinuxFileSystem.(LinuxFileSystem.java:39) at sun.nio.fs.LinuxFileSystemProvider.newFileSystem(LinuxFileSystemProvider.java:46) at sun.nio.fs.LinuxFileSystemProvider.newFileSystem(LinuxFileSystemProvider.java:39) at sun.nio.fs.UnixFileSystemProvider.(UnixFileSystemProvider.java:56) at sun.nio.fs.LinuxFileSystemProvider.(LinuxFileSystemProvider.java:41) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at java.lang.Class.newInstance(Class.java:442) at sun.nio.fs.DefaultFileSystemProvider.createProvider(DefaultFileSystemProvider.java:48) at sun.nio.fs.DefaultFileSystemProvider.create(DefaultFileSystemProvider.java:63) at java.nio.file.FileSystems$DefaultFileSystemHolder.getDefaultProvider(FileSystems.java:108) at java.nio.file.FileSystems$DefaultFileSystemHolder.access$000(FileSystems.java:89) at java.nio.file.FileSystems$DefaultFileSystemHolder$1.run(FileSystems.java:98) at java.nio.file.FileSystems$DefaultFileSystemHolder$1.run(FileSystems.java:96) at java.security.AccessController.doPrivileged(Native Method) at java.nio.file.FileSystems$DefaultFileSystemHolder.defaultFileSystem(FileSystems.java:96) at java.nio.file.FileSystems$DefaultFileSystemHolder.(FileSystems.java:90) at java.nio.file.FileSystems.getDefault(FileSystems.java:176) at org.apache.juli.logging.LogFactory.(LogFactory.java:85) at org.apache.juli.logging.LogFactory.(LogFactory.java:66) at org.apache.catalina.mbeans.MBeanFactory.(MBeanFactory.java:59) at org.springframework.boot.autoconfigure.BackgroundPreinitializer$MBeanFactoryInitializer.run(BackgroundPreinitializer.java:139) at org.springframework.boot.autoconfigure.BackgroundPreinitializer$1.runSafely(BackgroundPreinitializer.java:102) at org.springframework.boot.autoconfigure.BackgroundPreinitializer$1.run(BackgroundPreinitializer.java:94) at java.lang.Thread.run(Thread.java:748) "Service Thread" #8 daemon prio=9 os_prio=0 tid=0x00fa nid=0x6d7 runnable [0x] java.lang.Thread.State: RUNNABLE "C1 CompilerThread1" #7 daemon prio=9 os_prio=0 tid=0x00f9 nid=0x6d6 waiting on condition [0x] java.lang.Thread.State: RUNNABLE "C2 CompilerThread0" #6 daemon prio=9 os_prio=0 tid=0x00f98800 nid=0x6d4 waiting on condition [0x] java.lang.Thread.State: RUNNABLE "Signal Dispatcher" #4 daemon prio=9 os_prio=0 tid=0x00ebf800 nid=0x6d0 waiting on condition [0x] java.lang.Thread.State: RUNNABLE "Finalizer" #3 daemon prio=8 os_prio=0 tid=0x00e95000 nid=0x6c9 in Object.wait() [0x7f26e4c2d000] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on <0xc0166a10> (a
[Bug 63251] [JDK-8194653] Deadlock in FileSystems.getDefault on catalina startup
https://bz.apache.org/bugzilla/show_bug.cgi?id=63251 harri...@gmail.com changed: What|Removed |Added CC||harri...@gmail.com -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 63251] [JDK-8194653] Deadlock in FileSystems.getDefault on catalina startup
https://bz.apache.org/bugzilla/show_bug.cgi?id=63251 harri...@gmail.com changed: What|Removed |Added Version|9.0.14 |9.0.22 --- Comment #2 from harri...@gmail.com --- The work-around of pre-loading the default FileSystem does not appear to solve the problem for logging, or maybe it only reduced the frequency of the occurrence. I am still seeing the following stacktrace from a Spring Boot Microservice running Tomcat 9.0.22 with JDK 1.8.0_222 64-bit on RedHat 7.5: 2019-09-07 15:39:26 Full thread dump OpenJDK 64-Bit Server VM (25.222-b10 mixed mode): "background-preinit" #9 prio=5 os_prio=0 tid=0x02d11800 nid=0x726 waiting for monitor entry [0x7f26ddd01000] java.lang.Thread.State: BLOCKED (on object monitor) at java.lang.Runtime.loadLibrary0(Runtime.java:862) - waiting to lock <0xc010be00> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:1122) at sun.nio.fs.UnixNativeDispatcher$1.run(UnixNativeDispatcher.java:573) at sun.nio.fs.UnixNativeDispatcher$1.run(UnixNativeDispatcher.java:571) at java.security.AccessController.doPrivileged(Native Method) at sun.nio.fs.UnixNativeDispatcher.(UnixNativeDispatcher.java:571) at sun.nio.fs.UnixFileSystem.(UnixFileSystem.java:67) at sun.nio.fs.LinuxFileSystem.(LinuxFileSystem.java:39) at sun.nio.fs.LinuxFileSystemProvider.newFileSystem(LinuxFileSystemProvider.java:46) at sun.nio.fs.LinuxFileSystemProvider.newFileSystem(LinuxFileSystemProvider.java:39) at sun.nio.fs.UnixFileSystemProvider.(UnixFileSystemProvider.java:56) at sun.nio.fs.LinuxFileSystemProvider.(LinuxFileSystemProvider.java:41) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at java.lang.Class.newInstance(Class.java:442) at sun.nio.fs.DefaultFileSystemProvider.createProvider(DefaultFileSystemProvider.java:48) at sun.nio.fs.DefaultFileSystemProvider.create(DefaultFileSystemProvider.java:63) at java.nio.file.FileSystems$DefaultFileSystemHolder.getDefaultProvider(FileSystems.java:108) at java.nio.file.FileSystems$DefaultFileSystemHolder.access$000(FileSystems.java:89) at java.nio.file.FileSystems$DefaultFileSystemHolder$1.run(FileSystems.java:98) at java.nio.file.FileSystems$DefaultFileSystemHolder$1.run(FileSystems.java:96) at java.security.AccessController.doPrivileged(Native Method) at java.nio.file.FileSystems$DefaultFileSystemHolder.defaultFileSystem(FileSystems.java:96) at java.nio.file.FileSystems$DefaultFileSystemHolder.(FileSystems.java:90) at java.nio.file.FileSystems.getDefault(FileSystems.java:176) at org.apache.juli.logging.LogFactory.(LogFactory.java:85) at org.apache.juli.logging.LogFactory.(LogFactory.java:66) at org.apache.catalina.mbeans.MBeanFactory.(MBeanFactory.java:59) at org.springframework.boot.autoconfigure.BackgroundPreinitializer$MBeanFactoryInitializer.run(BackgroundPreinitializer.java:139) at org.springframework.boot.autoconfigure.BackgroundPreinitializer$1.runSafely(BackgroundPreinitializer.java:102) at org.springframework.boot.autoconfigure.BackgroundPreinitializer$1.run(BackgroundPreinitializer.java:94) at java.lang.Thread.run(Thread.java:748) "main" #1 prio=5 os_prio=0 tid=0x00b52000 nid=0x687 in Object.wait() [0x7f26fee02000] java.lang.Thread.State: RUNNABLE at java.nio.file.FileSystems.getDefault(FileSystems.java:176) at java.nio.file.Paths.get(Paths.java:138) at sun.misc.Launcher$ExtClassLoader.findLibrary(Launcher.java:235) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1830) at java.lang.Runtime.loadLibrary0(Runtime.java:870) - locked <0xc010be00> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:1122) at sun.security.ec.SunEC$1.run(SunEC.java:60) at sun.security.ec.SunEC$1.run(SunEC.java:58) at java.security.AccessController.doPrivileged(Native Method) at sun.security.ec.SunEC.(SunEC.java:58) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at
[Bug 63251] [JDK-8194653] Deadlock in FileSystems.getDefault on catalina startup
https://bz.apache.org/bugzilla/show_bug.cgi?id=63251 Mark Thomas changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #1 from Mark Thomas --- Thanks for the report and the stack trace showing the problem. Fixed in: - master for 9.0.18 onwards - 8.5.x for 8.5.40 onwards - 7.0.x for 7.0.94 onwards -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org