You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by GitBox <gi...@apache.org> on 2021/10/29 17:53:06 UTC

[GitHub] [tomcat] ChristopherSchultz edited a comment on pull request #456: Document conditions under which the AprLifecycleListener can be used …

ChristopherSchultz edited a comment on pull request #456:
URL: https://github.com/apache/tomcat/pull/456#issuecomment-954934999


   > [...] so the second Tomcat now shuts down APR globally, releasing the global structures. The first Tomcat is now shutting down, its `AprConnector` tries to use a sub APR pool/object from a pool which has already been released.
   
   There is no `AprConnector`. Where is the Java call which eventually goes down into native to cause this problem? As the AprLifecycleListener is stopping, it should not try to use any APR pool. Perhaps the other connector is still trying to actually use pool objects in some other way. If that's the case, the problem isn't with double-shutdown. It's with shutdown-while-trying-to-still-do-stuff.
   
   > See
   >     * https://github.com/apache/tomcat-native/blob/c17d3e0e0a594604ff4f30065360aacc688cfb50/native/src/jnilib.c#L243-L262
   
   Notably, even this native method prevents crashes due to double-shutdown. The predicate around the whole thing prevents it from being called twice.
   
   So can we get a Java stack trace for where this is crashing? It should be simple to check to see if APR has been killed at some point and at least not crash the JVM.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org