Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIXED JENKINS-19453] Propose fix: mask interrupt while loading a class
I think the crux of the issue is that, in general, a failed class loading will never get retried. It is certainly the case when another class loading has triggered a recurisve class loading as in this test case. In #19 Jesse proposed to fix this by dropping the whole RemoteClassLoader. But this will not work since the said RemoteClassLoader cloud have loaded other classes that might be already running. Dropping a classloader will not drop these classes, and we end up just creating another classloader that loads incompatible classes. That is a disaster waiting to happen. In this fix, we simply make findClass non-interruptible. That is, if a blocking remote operation gets interrupted, we catch that and simply retry and refuse to give up. We'll remember to set the interrupt flag back on, however, so that the interrupt signal doesn't disappear. The net effect is as if the delivery of the interrupt was bit late than usual. The way I see it, this is the only way to fix this. The nesting of control structures here is horrible, but I can't think of any better way to write this.
- Loading branch information
Showing
4 changed files
with
57 additions
and
19 deletions.
There are no files selected for viewing
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
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
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
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