Comments (5)
Are you able to get a heap dump in the frozen state?
from classloader-leak-prevention.
I've tried getting a heap dump with jcmd, but I wasn't able to and got this error message:
com.sun.tools.attach.AttachNotSupportedException: Unable to open socket file: target process not responding or HotSpot VM not loaded
at sun.tools.attach.LinuxVirtualMachine.<init>(LinuxVirtualMachine.java:106)
at sun.tools.attach.LinuxAttachProvider.attachVirtualMachine(LinuxAttachProvider.java:63)
at com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:208)
at sun.tools.jcmd.JCmd.executeCommandForPid(JCmd.java:147)
at sun.tools.jcmd.JCmd.main(JCmd.java:131)
But I did manage to get a threaddump, in which I found a single thread related to the library and it looked like this:
Thread 10592: (state = IN_NATIVE)
- sun.nio.fs.UnixNativeDispatcher.access0(long, int) @bci=0 (Compiled frame; information may be imprecise)
- sun.nio.fs.UnixNativeDispatcher.access(sun.nio.fs.UnixPath, int) @bci=10, line=454 (Compiled frame)
- sun.nio.fs.UnixFileSystemProvider.checkAccess(java.nio.file.Path, java.nio.file.AccessMode[]) @bci=202, line=306 (Compiled frame)
- java.nio.file.Files.isAccessible(java.nio.file.Path, java.nio.file.AccessMode[]) @bci=6, line=2455 (Compiled frame)
- java.nio.file.Files.isReadable(java.nio.file.Path) @bci=11, line=2490 (Compiled frame)
- org.jboss.as.logging.LoggingResource$1.visitFile(java.nio.file.Path, java.nio.file.attribute.BasicFileAttributes) @bci=53, line=269 (Compiled frame)
- org.jboss.as.logging.LoggingResource$1.visitFile(java.lang.Object, java.nio.file.attribute.BasicFileAttributes) @bci=6, line=252 (Compiled frame)
- java.nio.file.Files.walkFileTree(java.nio.file.Path, java.util.Set, int, java.nio.file.FileVisitor) @bci=105, line=2670 (Compiled frame)
- org.jboss.as.logging.LoggingResource.findFiles(java.lang.String, org.jboss.dmr.ModelNode, boolean) @bci=55, line=252 (Interpreted frame)
- org.jboss.as.logging.LoggingResource.getChildrenNames(java.lang.String) @bci=37, line=158 (Interpreted frame)
- org.jboss.as.logging.LoggingResource.hasReadableFile(java.lang.String) @bci=3, line=230 (Compiled frame)
- org.jboss.as.logging.LoggingResource.getChild(org.jboss.as.controller.PathElement) @bci=17, line=108 (Compiled frame)
- org.jboss.as.controller.OperationContextImpl.getAuthorizationResource(org.jboss.as.controller.PathAddress) @bci=113, line=1788 (Compiled frame)
- org.jboss.as.controller.OperationContextImpl.getBasicAuthorizationResponse(org.jboss.as.controller.AbstractOperationContext$OperationId, org.jboss.dmr.ModelNode) @bci=55, line=1745 (Compiled frame)
- org.jboss.as.controller.OperationContextImpl.authorizeResource(boolean, boolean) @bci=130, line=1282 (Compiled frame)
- org.jboss.as.controller.OperationContextImpl.authorizeResource(boolean, boolean) @bci=3, line=133 (Compiled frame)
- org.jboss.as.controller.operations.global.ReadResourceDescriptionHandler$CheckResourceAccessHandler.execute(org.jboss.as.controller.OperationContext, org.jboss.dmr.ModelNode) @bci=28, line=429 (Compiled frame)
- org.jboss.as.controller.AbstractOperationContext.executeStep(org.jboss.as.controller.AbstractOperationContext$Step) @bci=33, line=890 (Compiled frame)
- org.jboss.as.controller.AbstractOperationContext.processStages() @bci=158, line=659 (Compiled frame)
- org.jboss.as.controller.AbstractOperationContext.executeOperation() @bci=27, line=370 (Compiled frame)
- org.jboss.as.controller.OperationContextImpl.executeOperation() @bci=20, line=1349 (Compiled frame)
- org.jboss.as.controller.ModelControllerImpl.internalExecute(org.jboss.dmr.ModelNode, org.jboss.as.controller.client.OperationMessageHandler, org.jboss.as.controller.ModelController$OperationTransactionControl, org.jboss.as.controller.client.OperationAttachments, org.jboss.as.controller.OperationStepHandler, boolean, boolean) @bci=673, line=395 (Compiled frame)
- org.jboss.as.controller.ModelControllerImpl.execute(org.jboss.dmr.ModelNode, org.jboss.as.controller.client.OperationMessageHandler, org.jboss.as.controller.ModelController$OperationTransactionControl, org.jboss.as.controller.client.OperationAttachments) @bci=12, line=207 (Compiled frame)
- org.jboss.as.jmx.model.ResourceAccessControlUtil.getResourceAccess(org.jboss.as.controller.PathAddress, boolean) @bci=59, line=85 (Interpreted frame)
- org.jboss.as.jmx.model.RootResourceIterator.doIterate(org.jboss.as.controller.registry.Resource, org.jboss.as.controller.PathAddress) @bci=25, line=51 (Compiled frame)
- org.jboss.as.jmx.model.RootResourceIterator.doIterate(org.jboss.as.controller.registry.Resource, org.jboss.as.controller.PathAddress) @bci=162, line=61 (Interpreted frame)
- org.jboss.as.jmx.model.RootResourceIterator.doIterate(org.jboss.as.controller.registry.Resource, org.jboss.as.controller.PathAddress) @bci=162, line=61 (Interpreted frame)
- org.jboss.as.jmx.model.RootResourceIterator.iterate() @bci=8, line=43 (Interpreted frame)
- org.jboss.as.jmx.model.ModelControllerMBeanHelper.queryNames(javax.management.MBeanServer, javax.management.ObjectName, javax.management.QueryExp) @bci=28, line=195 (Interpreted frame)
- org.jboss.as.jmx.model.ModelControllerMBeanServerPlugin.queryNames(javax.management.ObjectName, javax.management.QueryExp) @bci=52, line=216 (Interpreted frame)
- org.jboss.as.jmx.PluggableMBeanServerImpl.queryNames(javax.management.ObjectName, javax.management.QueryExp) @bci=107, line=838 (Interpreted frame)
- se.jiderhamn.classloader.leak.prevention.cleanup.MBeanCleanUp.cleanUp(se.jiderhamn.classloader.leak.prevention.ClassLoaderLeakPreventor) @bci=15, line=25 (Interpreted frame)
- se.jiderhamn.classloader.leak.prevention.ClassLoaderLeakPreventor.runCleanUps() @bci=128, line=246 (Interpreted frame)
- se.jiderhamn.classloader.leak.prevention.ClassLoaderLeakPreventorListener.contextDestroyed(javax.servlet.ServletContextEvent) @bci=107, line=242 (Interpreted frame)
- io.undertow.servlet.core.ApplicationListeners.contextDestroyed() @bci=48, line=202 (Interpreted frame)
- io.undertow.servlet.core.DeploymentImpl.destroy() @bci=4, line=220 (Interpreted frame)
- io.undertow.servlet.core.DeploymentManagerImpl.undeploy() @bci=16, line=598 (Interpreted frame)
- org.wildfly.extension.undertow.deployment.UndertowDeploymentService.stopContext() @bci=94, line=145 (Interpreted frame)
- org.wildfly.extension.undertow.deployment.UndertowDeploymentService$2.run() @bci=4, line=121 (Interpreted frame)
- java.util.concurrent.Executors$RunnableAdapter.call() @bci=4, line=511 (Compiled frame)
- java.util.concurrent.FutureTask.run() @bci=42, line=266 (Compiled frame)
- java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) @bci=95, line=1149 (Compiled frame)
- java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=5, line=624 (Interpreted frame)
- java.lang.Thread.run() @bci=11, line=750 (Compiled frame)
- org.jboss.threads.JBossThread.run() @bci=10, line=320 (Interpreted frame)
from classloader-leak-prevention.
Interestingly on my local tomcat server this problem does not occur. The next log entry (which is supposed to be following the freeze) is 13-Feb-2024 10:04:16.124 WARNING [RMI TCP Connection(12)-127.0.0.1] se.jiderhamn.classloader.leak.prevention.JULLogger.warn JDBC driver loaded by protected ClassLoader deregistered: class org.postgresql.Driver
And org.postgres is provided by jboss in our remote configuration.
Could the issue be that the library is trying to deregister a class which is provided by the Jboss EAP?
from classloader-leak-prevention.
I've made org.postgres not be provided in our jboss build config and I can now see
2024-02-13 13:57:25,341 WARNING [se.jiderhamn.classloader.leak.prevention.ClassLoaderLeakPreventor] (ServerService Thread Pool -- 258) JDBC driver loaded by protected ClassLoader deregistered: class org.postgresql.Driver
in jboss logs
This gives me another reason to think provided dependencies might be the cause of the issue
from classloader-leak-prevention.
I haven't been able to further investigate this.
My current best guess is that somehow the unsetting process gets stuck on either the provided dependencies or JNDI resources.
I'll try to add this library again when we migrate to tomcat instances on production
from classloader-leak-prevention.
Related Issues (20)
- Unreliable tests HOT 1
- JDK11 - llegal reflective access on Tomcat 9
- 2.7.0 not yet available on maven central HOT 2
- Unavoidable SEVERE message: "Internal registry of java.beans.PropertyEditorManager not found" HOT 2
- endless print error:"Unexpected assignedDomains - please report to developer of this library!" HOT 3
- javax.swing.ImageIcon classloader leak
- ThreadLocal with SoftReference as value is not cleared HOT 1
- JURTKiller fails with java.lang.ClassNotFoundException: Illegal access using Tomcat 9
- java.beans.Introspector leaks again with JDK 9 to JDK 15
- Add java.io.ObjectStreamClass leak cleanup HOT 1
- Add capability to build and test with JDK up to version 17
- Remove finalize from RedefiningClassLoader
- Add jdk., and com.apple. to DEFAULT_IGNORED_PACKAGES HOT 4
- Catch and rethrow Throwable to prevent accidental leaks from SeparateClassLoaderInvokeMethod HOT 3
- Remove debug logging from the default output
- Rethrow exception from a failing test instead of analyzing leaks from the failing tests HOT 2
- Remove "JUnit used " + getTestClass().getJavaClass().getClassLoader() HOT 1
- Support Jakarta EE 9. NoClassDefFoundError: javax.servlet.ServletContextListener
- Strong references to inheritedAccessControlContext in java.lang.Thread cause classloader to be leaked HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from classloader-leak-prevention.