[Bug 62175] Infinite recursive session PersistentManager.swapIn loop with OOM
https://bz.apache.org/bugzilla/show_bug.cgi?id=62175 --- Comment #10 from Holger Sunke --- My problem is fixed, instead of endless "Session destroyed" and "IOException" log entry loops I now get a single such log entry only combined with a single IOException: 16.03.2018 08:43:31.540 [http-nio-8080-exec-1] DEBUG d.b.w.c.application.listener.ApplicationListener - Session destroyed: BB45287...; creationTime: 2018/03/16 08:13:45:201 MEZ; lastAccessTime: 2018/03/16 08:13:52:843 MEZ; usageTime: 7642 ms; Mär 16, 2018 8:43:31 AM org.apache.catalina.session.PersistentManagerBase swapIn SCHWERWIEGEND: Swapped session [BB45287089392C6B6B13AD5B51FD051A] is invalid Mär 16, 2018 8:43:31 AM org.apache.catalina.session.PersistentManagerBase removeSession SCHWERWIEGEND: Exception removing session Unable to delete file [...BB45287089392C6B6B13AD5B51FD051A.session] which is no longer required java.io.IOException: Unable to delete file [...\BB45287089392C6B6B13AD5B51FD051A.session] which is no longer required at org.apache.catalina.session.FileStore.remove(FileStore.java:269) at org.apache.catalina.session.PersistentManagerBase.removeSession(PersistentManagerBase.java:598) at org.apache.catalina.session.PersistentManagerBase.swapIn(PersistentManagerBase.java:725) at org.apache.catalina.session.PersistentManagerBase.findSession(PersistentManagerBase.java:494) After that, the user gets a new session and can continute to work, without killing the JVM via OutOfMemoryError. Thanks for the quick fix. -- 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 62175] Infinite recursive session PersistentManager.swapIn loop with OOM
https://bz.apache.org/bugzilla/show_bug.cgi?id=62175 Felix Schumacher changed: What|Removed |Added Resolution|--- |FIXED Status|NEW |RESOLVED --- Comment #9 from Felix Schumacher --- Thanks for the detailed report and feedback, it would be great, if you could check, whether this really fixes your problem. Fixed in: - trunk for 9.0.7 onwards - 8.5.x for 8.5.30 onwards - 8.0.x for 8.0.51 onwards - 7.0.x for 7.0.86 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
[Bug 62175] Infinite recursive session PersistentManager.swapIn loop with OOM
https://bz.apache.org/bugzilla/show_bug.cgi?id=62175 Felix Schumacher changed: What|Removed |Added Attachment #35764|0 |1 is patch|| Attachment #35764|application/mbox|text/plain mime type|| -- 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 62175] Infinite recursive session PersistentManager.swapIn loop with OOM
https://bz.apache.org/bugzilla/show_bug.cgi?id=62175 Felix Schumacher changed: What|Removed |Added Attachment #35765|application/mbox|text/plain mime type|| Attachment #35765|0 |1 is patch|| -- 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 62175] Infinite recursive session PersistentManager.swapIn loop with OOM
https://bz.apache.org/bugzilla/show_bug.cgi?id=62175 Felix Schumacher changed: What|Removed |Added Attachment #35767|0 |1 is obsolete|| --- Comment #8 from Felix Schumacher --- Created attachment 35768 --> https://bz.apache.org/bugzilla/attachment.cgi?id=35768&action=edit Store currently loaded session in thread local storage to load it only once Store currently loaded session in thread local storage to load it only once (guard thread local with a try catch block) -- 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 62175] Infinite recursive session PersistentManager.swapIn loop with OOM
https://bz.apache.org/bugzilla/show_bug.cgi?id=62175 Felix Schumacher changed: What|Removed |Added Attachment #35766|application/mbox|text/plain mime type|| Attachment #35766|0 |1 is patch|| -- 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 62175] Infinite recursive session PersistentManager.swapIn loop with OOM
https://bz.apache.org/bugzilla/show_bug.cgi?id=62175 --- Comment #7 from Holger Sunke --- Shouldn't the ThreadLocal cleanup sessionToSwapIn.remove(); be in a finally{..} block? (just in case) A ThreadLocale stuck session would prevent garbage collection of webAppClassLoader if the app get's unloaded. -- 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 62175] Infinite recursive session PersistentManager.swapIn loop with OOM
https://bz.apache.org/bugzilla/show_bug.cgi?id=62175 --- Comment #6 from Felix Schumacher --- Created attachment 35767 --> https://bz.apache.org/bugzilla/attachment.cgi?id=35767&action=edit Store currently loaded session in thread local storage to load it only once Load sessions only once from store. -- 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 62175] Infinite recursive session PersistentManager.swapIn loop with OOM
https://bz.apache.org/bugzilla/show_bug.cgi?id=62175 --- Comment #5 from Felix Schumacher --- Created attachment 35766 --> https://bz.apache.org/bugzilla/attachment.cgi?id=35766&action=edit Refactoring part three to make fix more readable Extract reactivation of sessions into private method -- 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 62175] Infinite recursive session PersistentManager.swapIn loop with OOM
https://bz.apache.org/bugzilla/show_bug.cgi?id=62175 --- Comment #4 from Felix Schumacher --- Created attachment 35765 --> https://bz.apache.org/bugzilla/attachment.cgi?id=35765&action=edit Refactor part two to make fix more readable Further extraction of functionality in private method to load sessions from store -- 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 62175] Infinite recursive session PersistentManager.swapIn loop with OOM
https://bz.apache.org/bugzilla/show_bug.cgi?id=62175 --- Comment #3 from Felix Schumacher --- Created attachment 35764 --> https://bz.apache.org/bugzilla/attachment.cgi?id=35764&action=edit Refactor part one to make fix more readable Extract loading from store into private method -- 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 62175] Infinite recursive session PersistentManager.swapIn loop with OOM
https://bz.apache.org/bugzilla/show_bug.cgi?id=62175 --- Comment #2 from Felix Schumacher --- Created attachment 35763 --> https://bz.apache.org/bugzilla/attachment.cgi?id=35763&action=edit Test case that shows infinite recursion on session loading The attached test case shows the described infinite recursion. It has to jump through a lot of hoops to accomplish this. -- 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 62175] Infinite recursive session PersistentManager.swapIn loop with OOM
https://bz.apache.org/bugzilla/show_bug.cgi?id=62175 holger.su...@bodo-peters.de changed: What|Removed |Added OS||All --- Comment #1 from holger.su...@bodo-peters.de --- Although it would likely solve this issue, I think it would not be desirable to synchronize the org.apache.catalina.session.FileStore.load(String)/.remove(String) methods. Instead it would be better to prevent loading a session twice in a single thread. -- 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 62175] Infinite recursive session PersistentManager.swapIn loop with OOM
https://bz.apache.org/bugzilla/show_bug.cgi?id=62175 holger.su...@bodo-peters.de changed: What|Removed |Added OS||Windows 8 -- 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 62175] Infinite recursive session PersistentManager.swapIn loop with OOM
https://bz.apache.org/bugzilla/show_bug.cgi?id=62175 holger.su...@bodo-peters.de changed: What|Removed |Added OS|Windows NT |Windows 8 -- 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