# Shared resource lock

**URL:** https://www.finalbuilder.com/forums/t/shared-resource-lock/6050
**Category:** Bugs
**Created:** [July 21, 2016, 1:57am UTC](https://www.finalbuilder.com/forums/t/shared-resource-lock/6050 "2016-07-21T01:57:02Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![marcel.oertig](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/m/b5a626/32.png) [@marcel.oertig](https://www.finalbuilder.com/forums/u/marcel.oertig)
#### Post date: [July 21, 2016, 1:57am UTC](https://www.finalbuilder.com/forums/t/shared-resource-lock/6050/1 "2016-07-21T01:57:02Z")

</div>

Hi Support Team,

A Shared resource lock acquired in a configuration condition is released after the first stage of this configuration is finished.  
But the description say:  
**Shared Resources**   
The build will stay on the queue until these shared resources can be acquired. Resource locks acquired in configuration conditions are released when the build completes.

Continua CI1.8.1.1

Best regards

Marcel

---

<div class="post-metadata">

### Author: ![Sparky](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/sparky/32/10_2.png) [@Sparky](https://www.finalbuilder.com/forums/u/Sparky)
#### Post date: [July 22, 2016, 2:10am UTC](https://www.finalbuilder.com/forums/t/shared-resource-lock/6050/2 "2016-07-22T02:10:44Z")

</div>

Hi Marcel,  
  
The only way I can reproduce this is if the first stage is set to wait for manual promotion. In this case, the shared resource lock is released unless the option “Hold resource lock if a build stage waits for manual promotion” is ticked.  
  
Otherwise can you provide more information, including details of fields or screenshots of the conditions dialog, shared resource dialog and stage options dialog. Ideally this would include a [server debug log](http://wiki.finalbuilder.com/display/continua/Debug+Logging). Send to [support@finalbuilder.com](mailto:support@finalbuilder.com) if this includes information that you do not want to make public.

---

<div class="post-metadata">

### Author: ![marcel.oertig](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/m/b5a626/32.png) [@marcel.oertig](https://www.finalbuilder.com/forums/u/marcel.oertig)
#### Post date: [October 26, 2016, 3:12am UTC](https://www.finalbuilder.com/forums/t/shared-resource-lock/6050/3 "2016-10-26T03:12:56Z")

</div>

Hi Dave,   
  
 Sorry for the delay, I had problems to reproduce it with a simple configuration. But now I’ve found a way to reproduce it.   
 I can reproduce it if the states of on configuration run on different agents. In this case, at the first change from one agent to an other agent the shared resource lock is released.   
  
 I hope you can also reproduce it this way.   
  
 Regards   
 Marcel Oertig

---

<div class="post-metadata">

### Author: ![Sparky](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/sparky/32/10_2.png) [@Sparky](https://www.finalbuilder.com/forums/u/Sparky)
#### Post date: [October 27, 2016, 1:58am UTC](https://www.finalbuilder.com/forums/t/shared-resource-lock/6050/4 "2016-10-27T01:58:53Z")

</div>

Hi Marcel,  
  
This does not happen in our tests. If you can send more details of your settings, either a diagnostics log or screenshots as requested below, we’ll look into this further.

---

<div class="post-metadata">

### Author: ![marcel.oertig](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/m/b5a626/32.png) [@marcel.oertig](https://www.finalbuilder.com/forums/u/marcel.oertig)
#### Post date: [November 18, 2016, 10:06am UTC](https://www.finalbuilder.com/forums/t/shared-resource-lock/6050/5 "2016-11-18T10:06:25Z")

</div>

Dear Sir/Madam   
  
 We have further investigated this matter and the situation is still not satisfying. However there are some findings which maybe help to clarify this matter.   
  
  
 Our original setup:   
 - - - - - - - - - - - - - - - -   
  
 Shared Resources:   
 Test.Test Infinite ∞   
 Test.TestStage Single 1   
  
 Configuration: [Stage 1] -\> [Gate 1] -\> [Stage 2] -\> [Gate 2]   
 Condition for Configuration: Queue, Any, Shared resource lock, All, Acquire: read lock for ‘“Server.Test.Test”,“Infinite”’   
  
 Stage 1 Options:   
 Shared Resource Locks: Server.Test.TestStage, Acquire, Full (this is the Single type)   
 Agent Requirements: $Agent.Hostname$ Equals machine01   
  
 Stage 2 Options:   
 Agent Requirements: $Agent.Hostname$ Equals machine02   
  
 Expection: Test.Test should be locked for the full build process. Test.TestStage should be locked only during Stage 1.   
 Results: Test.Test and TestStage are locked during Stage 1 and released in transition from Stage 1 to Stage 2   
  
  
 Different Setup:   
 - - - - - - - - - - - - - - - -   
  
 Shared Resources:   
 Test.Test Infinite ∞   
 Test.TestStage Single 1   
  
 Configuration: [Stage 1] -\> [Gate 1] -\> [Stage 2] -\> [Gate 2]   
 Condition for Configuration: Queue, Any, Shared resource lock, All, Acquire: read lock for ‘“Server.Test.Test”,“Infinite”’   
  
 Stage 1 Options:   
 Agent Requirements: $Agent.Hostname$ Equals machine01   
  
 Stage 2 Options:   
 Agent Requirements: $Agent.Hostname$ Equals machine02   
  
 Difference to original setup: No Single lock during Stage 1.   
 Expection: Test.Test should be locked for the full build process.   
 Results: Test.Test is locked for the full build process. -\> works as expected   
  
  
 Our findings: It seems that all locks are released after Stage 1 in the original setup even though this was not the intention. However we need to work with different type of Shared Resource Locks.   
  
  
 We hope that this findings can help you to clarify this matter. By the way, how can we export and send you the exact configuration?   
  
 Thanks a lot for your help and best regards,   
 Marcel Oertig

---

<div class="post-metadata">

### Author: ![Sparky](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/sparky/32/10_2.png) [@Sparky](https://www.finalbuilder.com/forums/u/Sparky)
#### Post date: [November 21, 2016, 6:06am UTC](https://www.finalbuilder.com/forums/t/shared-resource-lock/6050/6 "2016-11-21T06:06:56Z")

</div>

Hi Marcel,  
  
Thank you for the extra details. We have now reproduced the issue and found that the build shared resource locks are being released when stage shared resource locks are released. We are now working on a fix which will be ready in the next couple of days.&nbsp;

---

<div class="post-metadata">

### Author: ![marcel.oertig](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/m/b5a626/32.png) [@marcel.oertig](https://www.finalbuilder.com/forums/u/marcel.oertig)
#### Post date: [November 22, 2016, 2:08am UTC](https://www.finalbuilder.com/forums/t/shared-resource-lock/6050/7 "2016-11-22T02:08:48Z")

</div>

Hi Dave,   
  
 With the Version 1.8.1.178 I can’t reproduce it any more.   
  
 Thank you for the immediate bug-fix.   
 Best regards,   
 Marcel Oertig
