xcodebuild hangs with multiple concurrent invocations

Number:rdar://25449580 Date Originated:31-Mar-2016
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode 7.3 (7D175)
Classification:Bug Reproducible:Sometimes
Xcodebuild often hangs when multiple instances of the xcodebuild process are running concurrently with the following arguments:

xcodebuild -project PROJECT -alltargets -showBuildSettings

Steps to Reproduce:
1. Install Xcode 7.3
2. Extract the attached archive into a temporary folder
3. Open Terminal.app
4. CD into the folder where you extracted the archive
5. Execute `test.py` (it will try to reproduce the bug by running multiple instances of xcodebuild with the above mentioned arguments concurrently)
6. If `test.py` exists successfully and does not hang, try executing it again many times — at some point it should hang (this is a concurrency bug, after all)

Expected Results:
None of the xcodebuild processes should not hang

Actual Results:
Often some of the xcodebuild processes will hang

Xcode 7.3 (7D175)
OS X 10.11.1 (15B42)

Adding the arguments CODE_SIGNING_ALLOWED=NO and CODE_SIGNING_REQUIRED=NO seem to work around this issue, which indicates that the hang is due to some feature in xcodebuild related to code signing.

Occurs with Xcode 7.3, for Xcode projects that contain more than one target.

'XcodebuildConcurrentHangRepro.zip' was successfully uploaded.


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!