Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

swift-version.sh hanging on Spotlight call #4534

Closed
larkost opened this issue Jan 11, 2017 · 1 comment
Closed

swift-version.sh hanging on Spotlight call #4534

larkost opened this issue Jan 11, 2017 · 1 comment
Assignees

Comments

@larkost
Copy link
Contributor

larkost commented Jan 11, 2017

There have been a couple of jobs recently that have failed with timeouts (35 minutes in this case), and the message No version of Xcode found that supports Swift 2.2 in their logs (version of Swift does change). The line that is causing the problem is:
mdfind "kMDItemCFBundleIdentifier == 'com.apple.dt.Xcode'"
... and that will hang when you run it manually in an VM that gets into this state. There is no real reason that this situation occurs, and nothing obvious in the log about what is going on. In one case I was able to recover by re-indexing the /Applications folder, but in other cases a reboot has been required.

In the latter case all calls to mdfind or mdimporthung the same way, and calls to mdutil reported a communications error and then told me that

The most straightforward way of handling this is to first use a glob to find Xcode versions by name in /Applications, and then if what we are looking for is not there, then fall-back to Spotlight. In the case of CI, then we are always putting them there, and the fallback will work for other users if they choose to put versions elsewhere.

larkost added a commit that referenced this issue Jan 12, 2017
This avoids using spotlight to find Xcode if it can, avoiding some times when Spotlight has been unreliable on the CO machines. It also solves #4503 by making the selection of Xcode on CI machines deterministic (given identical installs of Xcode).
jpsim added a commit that referenced this issue Jan 18, 2017
…potlight

fix for #4534, find xcode without spotlight
jpsim added a commit that referenced this issue Jan 18, 2017
…de-without-spotlight

Revert "fix for #4534, find xcode without spotlight"
@austinzheng austinzheng assigned larkost and unassigned austinzheng Feb 3, 2017
@larkost larkost closed this as completed in 942fd88 Feb 9, 2017
@larkost larkost removed the S:Review label Feb 9, 2017
@larkost
Copy link
Contributor Author

larkost commented Feb 9, 2017

Fixed in 942fd88.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants