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

When graceful shutdown of Tomcat is aborted it may report that it completed successfully #39942

Closed
wilkinsona opened this issue Mar 14, 2024 · 1 comment
Assignees
Labels
type: bug A general bug
Milestone

Comments

@wilkinsona
Copy link
Member

There's a race condition between the thread that's waiting for Tomcat to become inactive or the graceful shutdown to be aborted and the thread that aborts the shutdown and stops Tomcat when the grace period has elapsed. This race can lead to Tomcat appearing to have become inactive before the abort of the shutdown is noticed. When this happens, the result of the shutdown is reported as IDLE when it should have been REQUESTS_ACTIVE. This result is mostly benign although it does affect the log messages that are emitted. It is also causing some of our graceful shutdown tests to be flaky.

@wilkinsona wilkinsona added this to the 3.1.x milestone Mar 14, 2024
@wilkinsona wilkinsona added the type: bug A general bug label Mar 14, 2024
@wilkinsona wilkinsona self-assigned this Mar 14, 2024
@wilkinsona
Copy link
Member Author

This only affects 3.1.x (and earlier, now unsupported branches) as the problem was addressed in 3.2 as a side-effect of the changes to separate stop and destroy.

@wilkinsona wilkinsona modified the milestones: 3.1.x, 3.1.10 Mar 15, 2024
wilkinsona added a commit that referenced this issue Mar 15, 2024
While the bug fixed in 3.1.x (gh-39942) has already been addressed as
a side-effect of the changes made in dbb2428, the change is merged
forwards here to improve the consistency of the code between branches.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

No branches or pull requests

1 participant