Deadlock prevention
| Chapter 7. Remote and parallel build support |

## Deadlock prevention

Certain mis-configuration of remote builds may cause deadlock. They are listed here so that you can avoid of doing so (It is highly recommended that you read these use cases first to get thorough understanding of QuickBuild's remote build support before try to understand deadlock scenarios listed here):

1. If configuration1 and configuration2 shares the same working directory, and you set up configuration1 to be dependent on configuration2. When configuration1 is triggered, it triggers execution of configuration2 and tries to wait for completion of that execution, but configuration2 will wait on configuration1 to release shared working directory lock. Thus deadlock occurs.

2. If configuration1 depends on configuration2, and configuration2 depends on configuration1 (see this use case). If you actively trigger configuration1 and configuration2 at the same time, deadlock may occur. The reason is that, if you actively trigger configuration1, it will hold working directory lock of configuration1 and dependently triggers configuration2, and wait until that triggering has been finished. Dependent triggering of configuration2 tries to get working directory lock of configuration2, which may now be hold by an active triggering of configuration2. Just like active triggering of configuration1 does, this active triggering of configuration2 will also cause dependent triggering of configuration1, which will wait on working directory lock of configuration1. Thus, working directory lock of both configurations can never be released, and deadlock occurs.

Chapter 7. Remote and parallel build support |  | Chapter 8. Data management