Status: Resolved (View Workflow)
Affects Version/s: 4.2.1.FINAL, 5.0.1.FINAL
Fix Version/s: None
Steps to Reproduce:
- Start a tomcat instance with Infinispan embedded in an app with UDP multicast.
- Do whatever. As long as Infinispan gets initialized.
- Run the tomcat shutdown script.
We have embeded Infinispan into our project, but when used, we cannot gracefully shutdown the JVM anymore.
There are a few exceptions thrown by late-access to the classloader from log4j, but these errors are easy to work around. Tomcat blocks any class loading after an application has been marked as shutting down. I can load them in the classloader in my application at runtime and circumvent those issues.
The main problem is the fact that the threads are just hanging there. They are not marked as daemon threads, so the JVM doesn't shut them off automatically, if required. The culprit threads are:
- multicast receiver
Some of these threads might be related to JGroups. Please advise, and I will create a separate ticket in their bug tracker if needed.
I know Infinispan registers a shutdown hook in order to cleanly shut down, but it looks quite unreliable and causes a lot of problems for us.