-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Undeploy shows SecurityContextImpl [Null authentication] memory leak on tomcat #9841
Comments
Hi, @shirosaki, thanks for the report. I've attempted to reproduce this behavior using the Hello Security sample and the versions described; however, I'm unsuccessful. Would you be able to supply a minimal sample that reproduces the issue? |
@jzheaux Create war.
Put the war file to tomcat webapps. Then the war is deployed.
And remove the war file to undeploy.
|
This change seems to fix leaks.
|
To get current context without creating a new context. Creating a new context may cause ThreadLocal leak. Closes gh-9841
Describe the bug
Create a spring boot war application and deploy to tomcat server.
Undeploy the app from tomcat causes the following log.
To Reproduce
Put war file to webapps directory in tomcat and remove the war from webapps.
Spring boot v2.4.1, Java 11 and tomcat 9.0.41.
Expected behavior
SecurityContextImpl [Null authentication]
is not created with ThreadLocal or removed on stopping.If SecurityContextHolder strategy is MODE_GLOBAL, this doesn't occur.
I don't find how to remove
SecurityContextImpl [Null authentication]
.The text was updated successfully, but these errors were encountered: