Mark,
On 2/8/24 16:18, ma...@apache.org wrote:
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit 967be0a2d5bb90a5f962359e80fe3e6a78b1ea51
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Thu Feb 8 21:17:24 2024 +0000
Need for force GC to avoid duplicate clean-up (which triggers a crash)
---
java/org/apache/catalina/core/AprLifecycleListener.java | 2 ++
1 file changed, 2 insertions(+)
diff --git a/java/org/apache/catalina/core/AprLifecycleListener.java
b/java/org/apache/catalina/core/AprLifecycleListener.java
index da2c0e3862..974af71ba2 100644
--- a/java/org/apache/catalina/core/AprLifecycleListener.java
+++ b/java/org/apache/catalina/core/AprLifecycleListener.java
@@ -170,6 +170,8 @@ public class AprLifecycleListener implements
LifecycleListener {
private static void terminateAPR() {
Library.terminatePrepare();
+ // Need to force GC here as some components do APR clean-up in
finalize()
+ System.gc();
AprStatus.setAprInitialized(false);
AprStatus.setAprAvailable(false);
fipsModeActive = false;
I'm sure you we thinking "eew gross" when you wrote this.
Is there no other way to do this with volatile flags and
intentional-cleanup rather than ugly finalizer-based cleanup?
-chris
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org