Fixes hdiutil error #4104

pull iangcarroll wants to merge 1 commits into bitcoin:master from iangcarroll:patch-1 changing 1 files +2 −1
  1. iangcarroll commented at 11:37 PM on April 28, 2014: contributor

    When running make deploy, sometimes hdiutil errors: hdiutil: convert failed - Resource temporarily unavailable. The following patch pauses for five seconds and seems to fix the error.

  2. Fixes error 68aa01e51f
  3. laanwj commented at 7:16 AM on April 29, 2014: member

    Waiting doesn't seem to be a very robust solution when there is some system load. Isn't there another way to wait for hdiutil to be ready?

  4. laanwj added the label Build system on Apr 29, 2014
  5. iangcarroll commented at 12:09 PM on April 29, 2014: contributor

    My best guess was that it hadn't finished mounting and needed to pause. If anyone can shine a better light on it, great.

    On Apr 29, 2014, at 3:16 AM, "Wladimir J. van der Laan" notifications@github.com wrote:

    Waiting doesn't seem to be a very robust solution when there is some system load. Isn't there another way to wait for hdiutil to be ready?

    — Reply to this email directly or view it on GitHub.

  6. sipa commented at 8:08 PM on April 29, 2014: member

    @iangcarroll That seems like a reasonable guess, but what @laanwj means is that waiting some arbitrary amount of time is rarely a good solution - for someone else it may take longer. Isn't there a way to check whether the mounting has completed, and just wait until that is done?

  7. laanwj commented at 10:20 AM on April 30, 2014: member

    Yes, to clarify, I'm not against waiting, but against waiting a fixed amount of time.

    Even waiting a fixed amount of time would be OK if you can detect the specific error and repeat the operation in that case.

  8. BitcoinPullTester commented at 11:11 AM on June 23, 2014: none

    Automatic sanity-testing: FAILED BUILD/TEST, see http://jenkins.bluematt.me/pull-tester/p4104_68aa01e51fb9673ff2739825529a3fee36df79b4/ for binaries and test log.

    This could happen for one of several reasons:

    1. It chanages paths in makefile.linux-mingw or otherwise changes build scripts in a way that made them incompatible with the automated testing scripts (please tweak those patches in qa/pull-tester)
    2. It adds/modifies tests which test network rules (thanks for doing that), which conflicts with a patch applied at test time
    3. It does not build on either Linux i386 or Win32 (via MinGW cross compile)
    4. The test suite fails on either Linux i386 or Win32
    5. The block test-cases failed (lookup the first bNN identifier which failed in https://github.com/TheBlueMatt/test-scripts/blob/master/FullBlockTestGenerator.java)

    If you believe this to be in error, please ping BlueMatt on freenode or TheBlueMatt here.

    This test script verifies pulls every time they are updated. It, however, dies sometimes and fails to test properly. If you are waiting on a test, please check timestamps to verify that the test.log is moving at http://jenkins.bluematt.me/pull-tester/current/ Contact BlueMatt on freenode if something looks broken.

  9. laanwj commented at 3:18 PM on June 24, 2014: member

    @theuni Have you ever encountered this problem?

  10. theuni commented at 6:07 PM on June 24, 2014: member

    I've never seen it, no.

    The applescript should be sync, afaik. I'm not sure how it would return before the image is unmounted.

    Though I agree that it's a bad fix, I'm not opposed to it if it actually fixes the problem. The net is littered with scripts to handle mounting/unmounting, and random waits seem to be commonplace.

  11. iangcarroll commented at 6:21 PM on June 24, 2014: contributor

    I just don't know how to find out if it's ready or not. If anyone could shine some light related to this... I'll try reproducing later today.

    On Jun 24, 2014, at 2:08 PM, Cory Fields notifications@github.com wrote:

    I've never seen it, no.

    The applescript should be sync, afaik. I'm not sure how it would return before the image is unmounted.

    Though I agree that it's a bad fix, I'm not opposed to it if it actually fixes the problem. The net is littered with scripts to handle mounting/unmounting, and random waits seem to be commonplace.

    — Reply to this email directly or view it on GitHub.

  12. theuni commented at 6:58 PM on June 24, 2014: member

    @iangcarroll About the only thing I can think of to try would be to remove the 'eject' from the applescript, and run 'hdiutil eject...' manually afterwards instead. At least that way you could debug the timing somewhat. For me, 'hdiutil eject /mount/point' seems to return pretty much instantly, and presumably it's actually ejected before exiting.

  13. theuni commented at 7:01 PM on June 24, 2014: member

    Data point: https://chromium.googlesource.com/external/dart/bleeding_edge/+/refs/heads/master/dart/tools/mac_build_editor_dmg.sh

    Google adds in a wait as well. I suspect that under whatever circumstances that trigger the race, there's probably not a way to detect hdiutil's finish.

    How about we just borrow google's solution?

    # Wait until the script above has umounted the image
    while [ -e "$VOLUME_MOUNTPOINT" ]; do
    echo "Waiting for Finder to eject $VOLUME_MOUNTPOINT"
    sleep 2
    done
    

    (adjust variable name as necessary ofc)

  14. laanwj commented at 4:52 AM on June 25, 2014: member

    The loop for existence of the mount point is acceptable. At least it detects that the operation was finished instead of adding an arbitrary wait which still may not be enough under heavy system loads.

  15. laanwj commented at 7:24 AM on July 4, 2014: member

    @iangcarroll Are you going to update this?

  16. iangcarroll commented at 1:21 PM on July 4, 2014: contributor

    Yeah, I'll do it when I get back to my house on Monday.

    Sent from my iPhone

    On Jul 4, 2014, at 3:24 AM, Wladimir J. van der Laan notifications@github.com wrote:

    @iangcarroll Are you going to update this?

    — Reply to this email directly or view it on GitHub.

  17. laanwj commented at 9:09 AM on July 25, 2014: member
  18. laanwj commented at 9:45 AM on July 30, 2014: member

    Just going to merge this as-is, having a solution is better than no solution at all.

  19. laanwj merged this on Jul 30, 2014
  20. laanwj closed this on Jul 30, 2014

  21. laanwj referenced this in commit 1de2992e07 on Jul 30, 2014
  22. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-01 15:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me