Branch: refs/heads/stable-1.609
Home: https://github.com/jenkinsci/jenkins
Commit: c24c3236917cfac2ae7c536b5fd6ad737fa2253c
https://github.com/jenkinsci/jenkins/commit/c24c3236917cfac2ae7c536b5fd6ad737fa2253c
Author: Stephen Connolly <[email protected]>
Date: 2015-07-07 (Tue, 07 Jul 2015)
Changed paths:
M core/src/main/java/hudson/model/Executor.java
Log Message:
-----------
[FIXED JENKINS-28690] Deadlock in hudson.model.Executor
- Rather fun one here. The Lock code relies on assuming that
Thread.interrupted() is clear on entry
- If it then sees Thread.interrupted() set, it will interrupt the current
thread in order to set the
flag again.
- Executor is a thread that does funky things with an overridden interrupt
method
- Executor.abortResult() is used to track a build be interrupted or aborted in
some other way
- As a result the abortResult can cause a deadlockif there is a genuine
interruption
- This fix clears the interrupt flag in abortResult() and uses the write lock
in order to ensure:
- The same lock as used in interrupt() is helf
- The interrupt flag is clear
- Clearing the interrupt flag should be safe as the only time it is called is
immediately after
an interruption and the resulting exception is caught and rethrown/logged
anyway
(cherry picked from commit ddb0a472ad44fcbce31fb565d477901575e3c581)
Commit: 119fcbbf98c27f0257ac1be02104e0d87acc8728
https://github.com/jenkinsci/jenkins/commit/119fcbbf98c27f0257ac1be02104e0d87acc8728
Author: Stephen Connolly <[email protected]>
Date: 2015-07-07 (Tue, 07 Jul 2015)
Changed paths:
M core/src/main/java/hudson/model/Computer.java
M core/src/main/java/hudson/model/Queue.java
M core/src/main/java/jenkins/model/Jenkins.java
Log Message:
-----------
[FIXED JENKINS-28840] Deadlock between Queue.maintain and Executor.interrupt
More fun here:
- All this originates from Executor extending Thread.
- There is funky logic in the lock handling code of the JVM that makes
assumptions
about how it might proceed with the lock when the thread holding the lock has
its
interrupt flag set.
- Really it would be better if Executor did not extend Thread as that way we
wouldn't
have to deal with some of that complexity. But OTOH we are where we are and
backwards
compatibility may make such a change not possible without a lot of breakage.
- Fixing the issue at hand, firstly requires that interrupting a Computer
happens with the
Queue lock held (to speed up tests we have Jenkins.cleanup get the lock for
all Computers)
That prevents the Queue maintain thread from getting caught
- Secondly, when removing an executor from a computer we process the removal
while
holding the Queue lock, but we move the removal itself to a separate thread
if we cannot
get the Queue lock in order to avoid deadlock.
- Also add helper methods to wrap tasks to be performed while holding the lock
and a helper method for Runnables that exposes the tryLock functionality
(cherry picked from commit 6f343dc7c2f0c32e9eb1a0b5d588a2e7ad6f62ba)
Commit: 0fcb58813b78cf698726a4987e8edcedea130acd
https://github.com/jenkinsci/jenkins/commit/0fcb58813b78cf698726a4987e8edcedea130acd
Author: liorha <[email protected]>
Date: 2015-07-07 (Tue, 07 Jul 2015)
Changed paths:
M core/src/main/java/hudson/util/MaskingClassLoader.java
Log Message:
-----------
Contine the JENKINS-27289 ticket: update the getResources as well
(cherry picked from commit 40e75129f40675f8a71b489b38c5911b37cb8559)
Commit: c3dcaeb8d55fe8a8065fb60cecef23d23eb9b87c
https://github.com/jenkinsci/jenkins/commit/c3dcaeb8d55fe8a8065fb60cecef23d23eb9b87c
Author: Daniel Beck <[email protected]>
Date: 2015-07-07 (Tue, 07 Jul 2015)
Changed paths:
M core/src/main/java/hudson/model/Run.java
Log Message:
-----------
[FIX JENKINS-14899] Don't use truncating LargeText for /consoleText
(cherry picked from commit 20bd4e304976dc64fa6abc165823425ba524ccb2)
Commit: 4f4a64a522ec7bf31f24280827757214e6985f3d
https://github.com/jenkinsci/jenkins/commit/4f4a64a522ec7bf31f24280827757214e6985f3d
Author: Stephen Connolly <[email protected]>
Date: 2015-07-07 (Tue, 07 Jul 2015)
Changed paths:
M core/src/main/java/hudson/model/Queue.java
M core/src/main/java/hudson/model/queue/QueueSorter.java
Log Message:
-----------
[FIXED JENKINS-28926] Block while upstream/downstream building cycles never
complete
- One could argue that without this change the system is functioning correctly
and that previous behaviour
was a bug. On the other hand, people have come to rely on the previous
behaviour.
- The issue really centeres around state changes in the blocked tasks. Since
blocking on upstream/downstream
relies on checking the building projects and the queued (excluding blocked)
tasks we need any change in
the blocked task list to be visible immediately (i.e. update the snapshot)
- I was able to reliably reproduce this behaviour with a convoluted set of
manually configured projects
but turning this into a test case has not proved quite as easy. Manual
testing confirms that the issue is
fixed for my manual test case
- I have also added a sorting of the blocked list when probing for tasks to
unblock. This should prioritise
tasks as intended by the QueueSorter
(cherry picked from commit de87736795898e57f7aca140124c2b1a3d1daf40)
Commit: 8596004024e9d8a00a99c459b4d7c82c004d1724
https://github.com/jenkinsci/jenkins/commit/8596004024e9d8a00a99c459b4d7c82c004d1724
Author: Stephen Connolly <[email protected]>
Date: 2015-07-07 (Tue, 07 Jul 2015)
Changed paths:
M test/src/test/java/hudson/model/QueueTest.java
Log Message:
-----------
[JENKINS-28926] Adding test case
- I was forgetting the call to `rebuildDependencyGraph()` which was why the
test didn't work for me
(cherry picked from commit c44c088442e1821f8cd44f4fdaa146d94dd85910)
Commit: 260b0947cd10bae186fe9f5688d6f9bfa739087c
https://github.com/jenkinsci/jenkins/commit/260b0947cd10bae186fe9f5688d6f9bfa739087c
Author: Oliver Gondža <[email protected]>
Date: 2015-07-07 (Tue, 07 Jul 2015)
Changed paths:
M core/src/main/java/hudson/model/Queue.java
Log Message:
-----------
Avoid diamonds for now
Commit: 3005532a94561ac597c6debbb65f1c3dece442f8
https://github.com/jenkinsci/jenkins/commit/3005532a94561ac597c6debbb65f1c3dece442f8
Author: Oliver Gondža <[email protected]>
Date: 2015-07-07 (Tue, 07 Jul 2015)
Changed paths:
M core/src/main/java/hudson/model/queue/QueueSorter.java
Log Message:
-----------
Avoid Long#compare for now
Compare:
https://github.com/jenkinsci/jenkins/compare/905930f0b1ee...3005532a9456
--
You received this message because you are subscribed to the Google Groups
"Jenkins Commits" 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.