You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 6bd309a
Browse filesBrowse the repository at this point in the historyBrowse files
hdiutil can fail transiently with "Resource busy" while macOS scans the
new image, which is common on CI runners. Retry each hdiutil command up
to 3 times before failing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# DMG generation fails intermittently with "Resource busy"
2
+
3
+
## Problem
4
+
5
+
DMG generation sometimes fails with `hdiutil: create failed - Resource busy`. The rest of the build succeeds, but no DMG is produced. Seen in 1 of 7 macOS smoke test jobs (run 37165552012, `macos-14 / ARM64`). Common on CI runners, where the system scans new disk images.
6
+
7
+
## Cause
8
+
9
+
`hdiutil` can fail transiently while macOS (Spotlight, XProtect) holds the image or volume. `GenerateDmg` ran each `hdiutil` command once and gave up on the first error.
10
+
11
+
## Solution
12
+
13
+
`GenerateDmg` runs every `hdiutil` command (`create`, `attach`, `detach`, `convert`) through a private `hdiutil(...)` helper. It retries up to 3 times, waiting 5 s and then 10 s, and logs a warning for each retry. After the last attempt the original error is thrown as before.
14
+
15
+
## Verification
16
+
17
+
- The failure is intermittent, so it can't be reproduced on demand.
18
+
- The macOS smoke tests must stay green. If the error shows up again, the build log must show the `hdiutil ... failed (attempt n of 3), retrying` warning, followed by a DMG.
0 commit comments