|
||||||||
|
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Hi,
I'm seeing this with an even older version: 1.480.3. The trace is slightly difference, but similar:
java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
at java.util.ArrayList.rangeCheck(ArrayList.java:571)
at java.util.ArrayList.get(ArrayList.java:349)
at hudson.model.queue.MappingWorksheet$ReadOnlyList.get(MappingWorksheet.java:102)
at hudson.model.queue.MappingWorksheet$ExecutorChunk.execute(MappingWorksheet.java:150)
at hudson.model.queue.MappingWorksheet$ExecutorChunk.access$000(MappingWorksheet.java:110)
at hudson.model.queue.MappingWorksheet$Mapping.execute(MappingWorksheet.java:298)
at hudson.model.Queue.maintain(Queue.java:1045)
at hudson.model.Queue.pop(Queue.java:863)
at hudson.model.Executor.grabJob(Executor.java:285)
at hudson.model.Executor.run(Executor.java:206)
more info
In particular, the MappingWorksheet bits are the same.
This issue https://issues.jenkins-ci.org/browse/JENKINS-19799 seems to be exactly the same as well, and I agree with the assement made there: if isAvailable is false, there's nothing preventing 'e' to go out of bounds in ExecutorChunk.execute().
Here's a patch against current git:
{{
diff --git a/core/src/main/java/hudson/model/queue/MappingWorksheet.java b/core/src/main/java/hudson/model/queue/MappingWorksheet.java
index 0e21fa3..0516161 100644
— a/core/src/main/java/hudson/model/queue/MappingWorksheet.java
+++ b/core/src/main/java/hudson/model/queue/MappingWorksheet.java
@@ -159,9 +159,12 @@ public class MappingWorksheet {
assert capacity() >= wc.size();
int e = 0;
for (SubTask s : wc) {
+ while (e < size() && !get(e).isAvailable()) { e++; - get(e++).set(wuc.createWorkUnit(s)); + }
+ if (e < size()) { + get(e++).set(wuc.createWorkUnit(s)); + }
}
}
}
}}