-
Notifications
You must be signed in to change notification settings - Fork 196
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
Pause executions when terminating even when not quieting down #866
Draft
jglick
wants to merge
2
commits into
jenkinsci:master
Choose a base branch
from
jglick:terminating
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…)` does not fix it, and test passes anyway
Managed to reproduce a stack trace, though not in fact involving CPS code: Not really successful attempt at reproduction
|
While restarting a controller running while (true) {
sleep 1
} I did see Stack trace
but that seems expected. |
Had a job running like checkpoint 'x' // CloudBees CI
build job: JOB_NAME, wait: false and pressed Ctrl-C on
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I observed a large stream of errors from a controller shutting down. This was part of a Kubernetes restart so the pod would have gotten a termination signal yet Jenkins is not “quieting down”.
Redacted examples of errors
From earlier log messages I know all this occurred after
suspendAll()
completed. Yet by looking at the line numbers you can seeworkflow-cps-plugin/plugin/src/main/java/org/jenkinsci/plugins/workflow/cps/CpsThreadGroup.java
Line 331 in b3ff2ae
EXECUTIONS_SUSPENDED
milestone (#766), we would not expect CPS chunks to still be run. Apparently they do not run well (the executor service has already been shut down, hence these errors), but perhaps the process is still writing other metadata files even aftercheckpoint
has been asked to save everything for the last time.I could not figure out how to reproduce this situation in a test. The lack of pausing is reproduced easily in
JenkinsSessionRule
.RealJenkinsRule
normally enters quiet-down mode which activates thePausing (Preparing for shutdown)
message, but even without jenkinsci/jenkins-test-harness#544 you can simply replace a call tostopJenkins
withrunRemotely
onWhat I do not know how to reproduce is the
FatalRejectedExecutionException
s shown above. What causes the program to trigger work during this time? Maybe I need to artificially slow down shutdown and then have somesh
steps finish?