1. 16 6月, 2015 2 次提交
  2. 15 6月, 2015 1 次提交
    • S
      [FIXED JENKINS-28840] Deadlock between Queue.maintain and Executor.interrupt · 6f343dc7
      Stephen Connolly 提交于
      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
      6f343dc7
  3. 13 6月, 2015 1 次提交
  4. 10 6月, 2015 1 次提交
  5. 08 6月, 2015 2 次提交
    • S
      [FIXED JENKINS-28690] Deadlock in hudson.model.Executor · ddb0a472
      Stephen Connolly 提交于
      - 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
      ddb0a472
    • I
      65d78d5b
  6. 07 6月, 2015 1 次提交
  7. 06 6月, 2015 1 次提交
  8. 05 6月, 2015 4 次提交
  9. 02 6月, 2015 1 次提交
  10. 01 6月, 2015 1 次提交
  11. 31 5月, 2015 3 次提交
  12. 29 5月, 2015 1 次提交
    • J
      Null safety for removeExecutor. · 10401aa7
      Jesse Glick 提交于
      Sometimes observed at end of (passing) WorkflowTest.executorStepRestart in 1.596.1:
      Exception in thread "Executor #0 for slave0 : executing PlaceholderExecutable:job/demo/1/:null" java.lang.NullPointerException
      	at hudson.model.Computer.removeExecutor(Computer.java:869)
      	at hudson.model.Executor.run(Executor.java:272)
      10401aa7
  13. 27 5月, 2015 1 次提交
  14. 22 5月, 2015 1 次提交
  15. 21 5月, 2015 2 次提交
  16. 19 5月, 2015 4 次提交
  17. 18 5月, 2015 4 次提交
  18. 16 5月, 2015 2 次提交
  19. 15 5月, 2015 4 次提交
  20. 14 5月, 2015 2 次提交
  21. 11 5月, 2015 1 次提交