It seems that sometimes the critical section in pipeline is entered without lock. Please see the job configs below, which are "a bit" simplified from our real ones. The problem happens in the following scenario: JOB1 is running a build and has locked the resource:"lab1" via "CI_LAB"-label. I trigger JOB2, the build for JOB2 correctly starts waiting for the lock on "lab1". When JOB1 ends, JOB2 enters the critical section, and the lock tells that it got the lock for "lab1" - but when I look at the "Lockable Resources" UI in Jenkins, the resource has no lock, and other jobs can lock the resource even though JOB2 is still in the critical section!
It seems that sometimes the critical section in pipeline is entered without lock. Please see the job configs below, which are "a bit" simplified from our real ones. The problem happens in the following scenario: JOB1 is running a build and has locked the resource:"lab1" via "CI_LAB"-label. I trigger JOB2, the build for JOB2 correctly starts waiting for the lock on "lab1". When JOB1 ends, JOB2 enters the critical section, and the lock tells that it got the lock for "lab1" - but when I look at the "Lockable Resources" UI in Jenkins, the resource has no lock, and other jobs can lock the resource even though JOB2 is still in the critical section!
lockable resources plugin: 1.11.2 jenkins: 1.644 pipeline:2.4
JOB1 does:
JOB2 does:
We have the following lockable resources(simplified listing for the problem scenario):
Ideas: