[JENKINS-50407] Better diagnosis for certain fatal loading errors #809
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.
Continuing #215.
Without the main patch, you get the reported error in the system log
as well as in the build log
but that is it; the original exception is swallowed.
(What could be causing the actual problems in the field, I have no idea. It is unlikely to be an error from a shell decorator as in this test; that is just a convenient way I found to simulate a load failure and trigger the condition for
CpsFlowExecution.shell
to be null.)Sprinking in some
Thread.dumpStack
s here and there shows that while a root error might come fromthe improper use of the CPS VM thread comes a bit later
I am not actually sure what the purpose of the complex logic in
loadProgramFailed
is; if it ever worked as written, it does not seem to now (as seen by its failing attempt to runSandboxContinuable.run0
). The much simpler implementation in the second commit also passes the test with less noise.