-
Bug
-
Resolution: Fixed
-
Critical
Do a fresh install of Jenkins. Make 3+ executors.
Create project A, with downstream B.
Have it `sleep 15`.
Create project B, with downstream C.
Set it to block on building upstream projects.
Have it `sleep 30`.
Create project C.
Set it to block on building upstream projects.
Have it `sleep 30`.
Trigger A, B, and C together, in succession.
As A builds, notice that C is blocked, and waits for the (transitive) upstream project A to finish.
However, once A finished, B and C both start!
Only B should have started. C should have stayed blocked until B finished. Instead, C behaved as if A – and A alone – were the upstream project.
- is related to
-
JENKINS-27708 Concurrent build limits not honored on Jenkins 1.607
-
- Resolved
-
Code changed in jenkins
User: Stephen Connolly
Path:
core/src/main/java/hudson/model/Queue.java
http://jenkins-ci.org/commit/jenkins/5880ed830201f9349ae9def6653c19a186e1eb18
Log:
[FIXED JENKINS-27708][FIXED JENKINS-27871] Ensure that identification of blocked tasks is using the live state.
job execution. You probably would need 100's of jobs starting execution every iteration
of maintain() before this could even start to become an issue and likely the calculation
of isBuildBlocked(p) will become a bottleneck before updateSnapshot() will. Additionally
since the snapshot itself only ever has at most one reference originating outside of the stack
it should remain in the eden space and thus be cheap to GC.
JENKINS-27708comments 225819 and 225906 provide more complex but logically equivalent fixes ofthis issue. I am favouring this approach as it is simpler and provides less scope for error as any
new helper methods can just rely on the snapshot being up to date whereas with the other
two candidates if a new helper method is introduced there is the potential to miss adding support
for the live view. The comment 225819 has the risk of introducing extra lock contention while
the comment 225906 version forces every access to the helper methods to pass a second memory
barrier