RFR: 8259570: (macos) tools/jpackage tests fails with 'hdiutil: couldn't eject "disk2" - Resource busy'
We did not able to run "hdiutil convert" due to hdiutil did not able to acquire lock on DMG image file. In this condition we got "Resource busy" from "hdiutil detach" and on repeated attempt we was getting "File Not Found" error. According to some research "Resource Busy" is normal error message for "hdiutil detach" and can happen, but it should go away soon assuming nothing else is broken. I think due to we using "-force" flag we still ejected DMG image and left system in bad stage. After re-fixing repeated detach with force this issue is not longer reproducible. I still left code for forced detach if we did not able to detach it. Also, I added work around (in case we had to do forced detach) is to convert copy of original DMG image. This work around seems to solves problem as well when hdiutil cannot acquire lock on file. I also fixed in same way detach in our test helper. ------------- Commit messages: - 8259570: (macos) tools/jpackage tests fails with 'hdiutil: couldn't eject disk2 - Resource busy' Changes: https://git.openjdk.java.net/jdk/pull/2345/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=2345&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8259570 Stats: 162 lines in 3 files changed: 151 ins; 1 del; 10 mod Patch: https://git.openjdk.java.net/jdk/pull/2345.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/2345/head:pull/2345 PR: https://git.openjdk.java.net/jdk/pull/2345
On Mon, 1 Feb 2021 23:41:38 GMT, Alexander Matveev <almatvee@openjdk.org> wrote:
We did not able to run "hdiutil convert" due to hdiutil did not able to acquire lock on DMG image file. In this condition we got "Resource busy" from "hdiutil detach" and on repeated attempt we was getting "File Not Found" error. According to some research "Resource Busy" is normal error message for "hdiutil detach" and can happen, but it should go away soon assuming nothing else is broken. I think due to we using "-force" flag we still ejected DMG image and left system in bad stage. After re-fixing repeated detach with force this issue is not longer reproducible. I still left code for forced detach if we did not able to detach it. Also, I added work around (in case we had to do forced detach) is to convert copy of original DMG image. This work around seems to solves problem as well when hdiutil cannot acquire lock on file. I also fixed in same way detach in our test helper.
All classes from `jdk.jpackage.internal` are accessible in jpackage tests, so there is no need to copy/paste `jdk.jpackage.internal.RetryExecutor`. You can simply import it. ------------- PR: https://git.openjdk.java.net/jdk/pull/2345
On Tue, 2 Feb 2021 00:29:39 GMT, Alexey Semenyuk <asemenyuk@openjdk.org> wrote:
We did not able to run "hdiutil convert" due to hdiutil did not able to acquire lock on DMG image file. In this condition we got "Resource busy" from "hdiutil detach" and on repeated attempt we was getting "File Not Found" error. According to some research "Resource Busy" is normal error message for "hdiutil detach" and can happen, but it should go away soon assuming nothing else is broken. I think due to we using "-force" flag we still ejected DMG image and left system in bad stage. After re-fixing repeated detach with force this issue is not longer reproducible. I still left code for forced detach if we did not able to detach it. Also, I added work around (in case we had to do forced detach) is to convert copy of original DMG image. This work around seems to solves problem as well when hdiutil cannot acquire lock on file. I also fixed in same way detach in our test helper.
All classes from `jdk.jpackage.internal` are accessible in jpackage tests, so there is no need to copy/paste `jdk.jpackage.internal.RetryExecutor`. You can simply import it.
I removed RetryExecutor.java and jdk.jpackage.internal.RetryExecutor will be used instead. ------------- PR: https://git.openjdk.java.net/jdk/pull/2345
We did not able to run "hdiutil convert" due to hdiutil did not able to acquire lock on DMG image file. In this condition we got "Resource busy" from "hdiutil detach" and on repeated attempt we was getting "File Not Found" error. According to some research "Resource Busy" is normal error message for "hdiutil detach" and can happen, but it should go away soon assuming nothing else is broken. I think due to we using "-force" flag we still ejected DMG image and left system in bad stage. After re-fixing repeated detach with force this issue is not longer reproducible. I still left code for forced detach if we did not able to detach it. Also, I added work around (in case we had to do forced detach) is to convert copy of original DMG image. This work around seems to solves problem as well when hdiutil cannot acquire lock on file. I also fixed in same way detach in our test helper.
Alexander Matveev has updated the pull request incrementally with one additional commit since the last revision: 8259570: (macos) tools/jpackage tests fails with 'hdiutil: couldn't eject disk2 - Resource busy' [v2] ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/2345/files - new: https://git.openjdk.java.net/jdk/pull/2345/files/36021a22..5ffde267 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=2345&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=2345&range=00-01 Stats: 108 lines in 3 files changed: 1 ins; 98 del; 9 mod Patch: https://git.openjdk.java.net/jdk/pull/2345.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/2345/head:pull/2345 PR: https://git.openjdk.java.net/jdk/pull/2345
On Tue, 2 Feb 2021 03:59:00 GMT, Alexander Matveev <almatvee@openjdk.org> wrote:
We did not able to run "hdiutil convert" due to hdiutil did not able to acquire lock on DMG image file. In this condition we got "Resource busy" from "hdiutil detach" and on repeated attempt we was getting "File Not Found" error. According to some research "Resource Busy" is normal error message for "hdiutil detach" and can happen, but it should go away soon assuming nothing else is broken. I think due to we using "-force" flag we still ejected DMG image and left system in bad stage. After re-fixing repeated detach with force this issue is not longer reproducible. I still left code for forced detach if we did not able to detach it. Also, I added work around (in case we had to do forced detach) is to convert copy of original DMG image. This work around seems to solves problem as well when hdiutil cannot acquire lock on file. I also fixed in same way detach in our test helper.
Alexander Matveev has updated the pull request incrementally with one additional commit since the last revision:
8259570: (macos) tools/jpackage tests fails with 'hdiutil: couldn't eject disk2 - Resource busy' [v2]
Marked as reviewed by herrick (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/2345
On Tue, 2 Feb 2021 03:59:00 GMT, Alexander Matveev <almatvee@openjdk.org> wrote:
We did not able to run "hdiutil convert" due to hdiutil did not able to acquire lock on DMG image file. In this condition we got "Resource busy" from "hdiutil detach" and on repeated attempt we was getting "File Not Found" error. According to some research "Resource Busy" is normal error message for "hdiutil detach" and can happen, but it should go away soon assuming nothing else is broken. I think due to we using "-force" flag we still ejected DMG image and left system in bad stage. After re-fixing repeated detach with force this issue is not longer reproducible. I still left code for forced detach if we did not able to detach it. Also, I added work around (in case we had to do forced detach) is to convert copy of original DMG image. This work around seems to solves problem as well when hdiutil cannot acquire lock on file. I also fixed in same way detach in our test helper.
Alexander Matveev has updated the pull request incrementally with one additional commit since the last revision:
8259570: (macos) tools/jpackage tests fails with 'hdiutil: couldn't eject disk2 - Resource busy' [v2]
Marked as reviewed by asemenyuk (Committer). ------------- PR: https://git.openjdk.java.net/jdk/pull/2345
On Mon, 1 Feb 2021 23:41:38 GMT, Alexander Matveev <almatvee@openjdk.org> wrote:
We did not able to run "hdiutil convert" due to hdiutil did not able to acquire lock on DMG image file. In this condition we got "Resource busy" from "hdiutil detach" and on repeated attempt we was getting "File Not Found" error. According to some research "Resource Busy" is normal error message for "hdiutil detach" and can happen, but it should go away soon assuming nothing else is broken. I think due to we using "-force" flag we still ejected DMG image and left system in bad stage. After re-fixing repeated detach with force this issue is not longer reproducible. I still left code for forced detach if we did not able to detach it. Also, I added work around (in case we had to do forced detach) is to convert copy of original DMG image. This work around seems to solves problem as well when hdiutil cannot acquire lock on file. I also fixed in same way detach in our test helper.
This pull request has now been integrated. Changeset: bec60432 Author: Alexander Matveev <almatvee@openjdk.org> URL: https://git.openjdk.java.net/jdk/commit/bec60432 Stats: 74 lines in 3 files changed: 54 ins; 1 del; 19 mod 8259570: (macos) tools/jpackage tests fails with 'hdiutil: couldn't eject "disk2" - Resource busy' Reviewed-by: herrick, asemenyuk ------------- PR: https://git.openjdk.java.net/jdk/pull/2345
participants (3)
-
Alexander Matveev
-
Alexey Semenyuk
-
Andy Herrick