Code changed in jenkins
User: Kohsuke Kawaguchi
Path:
src/main/java/hudson/remoting/RemoteClassLoader.java
src/test/java/hudson/remoting/ClassRemotingTest.java
src/test/java/hudson/remoting/DummyClassLoader.java
src/test/java/hudson/remoting/TestLinkage.java
http://jenkins-ci.org/commit/remoting/425301511aeb5a876b224cf4e572b74447e08ebc
Log:
[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 https://github.com/jenkinsci/remoting/pull/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.

Compare: https://github.com/jenkinsci/remoting/compare/bfbc7d693a50...425301511aeb

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to