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

Occasionnal hdiutil: create failed - Resource busy #143

Open
gaetschwartz opened this issue Jul 29, 2022 · 13 comments
Open

Occasionnal hdiutil: create failed - Resource busy #143

gaetschwartz opened this issue Jul 29, 2022 · 13 comments

Comments

@gaetschwartz
Copy link

gaetschwartz commented Jul 29, 2022

When creating a DMG in my CI (Bitrise), the tool occasionally fails with hdiutil: create failed - Resource busy.

I'm using the latest version (1.10).

Here is my usage of the tool:

+ create-dmg --volname 'Media Library' --window-pos 200 120 --window-size 800 529 --icon-size 130 --text-size 14 --icon 'Media Library.app' 260 250 --hide-extension 'Media Library.app' --app-drop-link 540 250 --skip-jenkins 'Media Library (7c0935e).dmg' 'Media Library.app'
Creating disk image...
hdiutil: create failed - Resource busy

This looks like some kind of race condition or a timing issue, as the tool only fails occasionally.

@gaetschwartz gaetschwartz changed the title hdiutil: create failed - Resource busy Occasionnal hdiutil: create failed - Resource busy Jul 29, 2022
@pzhlkj6612
Copy link
Contributor

Hmm, our old friend - "Resource busy (16)". Maybe we need to put all "hdiutil" calls into retry loops, like "hdiutil detach" in #139 .

@gaetschwartz
Copy link
Author

gaetschwartz commented Jul 31, 2022

That would make sense indeed. If you have an idea of where this takes place, can try to open a PR :)

@grzegorzkrukowski
Copy link

grzegorzkrukowski commented May 12, 2023

Any news on this problem? We are having the same issue on the newest macOS13 runners on GitHub and it's consistent - happening 100% of the time.

@VitoVan
Copy link

VitoVan commented Jun 22, 2023

Any news on this problem? We are having the same issue on the newest macOS13 runners on GitHub and it's consistent - happening 100% of the time.

Yes, indeed, I can't find a way to bypass this now. (even with --skip-jenkins)

@VitoVan
Copy link

VitoVan commented Jun 22, 2023

No, it seems there is more than 50% chance to success with --skip-jenkins on github actions macos-13.

@grzegorzkrukowski
Copy link

grzegorzkrukowski commented Jul 26, 2023

It's still a case, especially on macOS13-xl machines on GitHub. Here is related ticket on runners - they suspect it maybe related to XProtectBehaviorService that was introduced in macOS13

The walkaround seems to be killing the process and retrying - but it still doesn't help 100% of the time.

@afvieira
Copy link

Hi,
we are hitting on this as well, with more frequency in the last weeks. It doesn't happen 100% of the time, but it is not helping...
Is there any workaround? Are you considering applying the workaround shared by @grzegorzkrukowski mentioned above?

Thanks

@aonez
Copy link
Member

aonez commented Oct 16, 2023

@afvieira it seems neither the workaround fixes this for sure

The walkaround seems to be killing the process and retrying - but it still doesn't help 100% of the time.

Since I'm unable to replicate this issue I really can't help. But any of those that replicate and can try/test, feel free to send a pull request.

@KlemenDEV
Copy link

I can also confirm this happens sometimes

@VitoVan
Copy link

VitoVan commented Nov 24, 2023

I fixed my workflow with the following two modifications:

  1. kill XProtect before calling create-dmg
  2. use sudo to run create-dmg

This comment helped:

actions/runner-images#7522 (comment)


Edit 2 days later:

It didn't fix it, just gave me more luck.

The resource is still busy sometimes.

@abose
Copy link

abose commented Jan 24, 2024

Can confirm this happens consistantly on GitHub Actions Mac M1 Runners. The duild doesnt fail locally on M1 macs thought.

Details of the GitHub Actions run can be found here: https://github.com/phcode-dev/phoenix-desktop/actions/runs/7626006956/job/20771494599.

https://discord.com/channels/616186924390023171/1199341633435602984

Is there any fix planned for this? Not being able to build mac M1 DMGs sounds like a pretty big issue.

@RobZuazua
Copy link

RobZuazua commented Jan 26, 2024

I'm now seeing this on my M1 Mac every build. more info on discord: https://discord.com/channels/616186924390023171/1200314563690770515/1200314563690770515

@sanjacob
Copy link

I am not using this action but by running hdiutil create I still get this error sometimes in macos-12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants