Skip to content
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

Close processing triggered by shutdown hook isn't thread safe [SPR-13556] #18132

Closed
spring-projects-issues opened this issue Oct 9, 2015 · 0 comments
Assignees
Labels
in: core status: backported type: bug
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues commented Oct 9, 2015

Andy Wilkinson opened SPR-13556 and commented

In AbstractApplicationContext, refresh and close both synchronize on startupShutdownMonitor to prevent concurrent processing. However, when the application context's shutdown hook is performing the close processing this doesn't hold true as it doesn't synchronise on startupShutdownMonitor. This means it's possible for two close calls or a close and a refresh to occur in parallel.


Affects: 4.1.7

Reference URL: spring-projects/spring-boot#4130

Issue Links:

  • #18004 ClasspathXmlApplicationContext cannot be closed twice

Referenced from: commits 92dc51f, 57125c0

Backported to: 4.1.8

@spring-projects-issues spring-projects-issues added type: bug status: backported in: core labels Jan 11, 2019
@spring-projects-issues spring-projects-issues added this to the 4.2.2 milestone Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core status: backported type: bug
Projects
None yet
Development

No branches or pull requests

2 participants