-
Bug
-
Resolution: Unresolved
-
Blocker
-
None
I have a job which takes a lock {} inside of a timeout {} block.
If the timeout expires, then the lock {} is not freed, which results in future taking of the lock becoming a deadlock.
It seems like timeout {} should properly free the lock when forcing an exit from the lock() step? Is this just a bad pipeline/workflow pattern?
This is with Lockable Resource Plugin 2.0
I'm not 100% sure if the issue is a timeout() killing the lock() or not. I looked at the pipeline graph, and I see a timeout set to 15 minutes and the lock is blocked for 13 minutes, so it's possible this isn't the issue. I also had 2 other branches of parallel pipeline that ended up blocking for 4 days before we killed the job.
Specifically, the lock is only used inside a single build to limit parallelism of a section that cannot be run concurrently during a parallel{} chunk. Since the lockable resource name includes the BUILD_TAG, it should be a resource unique to the individual build, and thus the only places it should become locked are in other parallel threads.
Any other ideas what might cause the deadlock?