Closed Bug 649972 Opened 14 years ago Closed 14 years ago

Random failures with "hdiutil eject" during partner repacks on macosx64

Categories

(Release Engineering :: Release Requests, defect, P2)

x86_64
macOS
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: rail, Assigned: rail)

Details

Attachments

(3 files, 3 obsolete files)

During Firefox 4.0.1 build we hit random failures on different slaves and different partner configs. Log snippet: ################################################## ### Starting repack process for partner: yahoo-it_browser1 ### Found /builds/slave/rel-2.0-osx64-partner-rpk/partner-repacks/scripts/original_builds/4.0.1/build1/mac/it/Firefox 4.0.1.dmg on disk, not downloading ### Repacking mac build "Firefox 4.0.1.dmg" expected CRC32 $75645842 /dev/disk1 Apple_partition_scheme /dev/disk1s1 Apple_partition_map /dev/disk1s2 Apple_HFS /private/tmp/FirefoxInstaller hdiutil: couldn't unmount "disk1" - Resource busy Error: shellCommand had non-zero exit status: 1 command was: hdiutil eject /tmp/FirefoxInstaller program finished with exit code 1 Maybe we need to sleep or call sync after rsync here: http://hg.mozilla.org/build/partner-repacks/file/bcae25fd0a92/scripts/partner-repacks.py#l434 ?
Attached patch sync before ejecting (obsolete) — Splinter Review
r=coop (IRC)
Attachment #525984 - Flags: review+
Assignee: nobody → rail
Priority: -- → P1
For Firefox 4.0.1 it was fixed by a manual build with added "sleep 15" after mount and before eject. Probably it would be better to use http://mxr.mozilla.org/build/source/tools/buildfarm/utils/installdmg.sh here.
Priority: P1 → P2
release/common/unpack-diskimage.sh could be used to extract dmg contents. Not tested yet.
Attachment #525984 - Attachment is obsolete: true
Attachment #526689 - Flags: feedback?(coop)
Attachment #526690 - Flags: feedback?(coop)
Attachment #526689 - Flags: feedback?(coop) → feedback+
Attachment #526690 - Flags: feedback?(coop) → feedback+
cc-ing Kev so that he knows he'll need to pull the build/tools repo to get the installdmg.sh script.
Attachment #526689 - Attachment is obsolete: true
Attachment #528099 - Flags: review?(coop)
Comment on attachment 528099 [details] [diff] [review] use tools/release/common/unpack-diskimage.sh > def cleanup(self): > super(RepackMac, self).cleanup() > rmdirRecursive("stage") >- rmdirRecursive(self.mountpoint) unpack-diskimage.sh handles this already.
Attached patch tools (obsolete) — Splinter Review
Attachment #528100 - Flags: review?(coop)
Attachment #528099 - Flags: review?(coop) → review+
Attachment #528100 - Flags: review?(coop) → review+
Comment on attachment 528100 [details] [diff] [review] tools FTR. >-rsync -av $MOUNTPOINT/* $MOUNTPOINT/.DS_Store $MOUNTPOINT/.background $MOUNTPOINT/.VolumeIcon.icns $TARGETPATH/. > $LOGFILE >+rsync -av $MOUNTPOINT/* $MOUNTPOINT/.DS_Store $MOUNTPOINT/.background $MOUNTPOINT/.VolumeIcon.icns $TARGETPATH/ > $LOGFILE I removed the trailing dot to make rsync happy. It was complaining "no such file or directory" > hdiutil detach $MOUNTPOINT >-rm -rdf $MOUNTPOINT > # Sleep for a bit to let messages from diskimage-helper go away > sleep 5 >+rm -rdf $MOUNTPOINT Sometimes rm doesn't work as expected and complains about ro file system. It's not critical because the next call removes the directory (after final sleep 5). However it doesn't apply for the last repacks.
Attachment #526690 - Flags: review?(coop)
Test scenario: 1) downloaded production Firefox 4.0. build1 partner repacks to "orig" 2) downloaded new Firefox 4.0.1 build1 partner repacks to "mine" set -x UNDMG=$PWD/tools/release/common/unpack-diskimage.sh find orig -type f -name '*.dmg' | while read orig; do mine=$(echo $orig | sed 's|orig/|mine/|') $UNDMG "$orig" /tmp/mnt orig_dir $UNDMG "$mine" /tmp/mnt my_dir diff -Nr orig_dir my_dir >> diff.diff rm -rf orig_dir my_dir done $ wc diff.diff 0 0 0 diff.diff
Attachment #526690 - Flags: review?(coop) → review+
Need to be landed during the next reconfig.
Attached patch toolsSplinter Review
I think this patch should work much more better than previous. * Instead of dummy "sleep 5" at the end, I added a loop, which handles the situation with diskimage-helper safer and may finish faster (5 sec! :)) * Under some conditions hdiutil command exits non-zero complaining about "Resource is busy". In this case the loop I mentioned above doesn't help. I added "sleep 10" and forced eject for this case. I compared the previous and the current implementations. The previous one was failing in ~30-40% cases, while the latest one finished green for 12 runs in a row. I also tested l10n verify factory, which uses unpack-diskimage.sh and it worked fine. The output is the same as before. Update verify results will be ready later today.
Attachment #528100 - Attachment is obsolete: true
Attachment #528289 - Flags: review?(coop)
Comment on attachment 528289 [details] [diff] [review] tools Yay for more resiliency.
Attachment #528289 - Flags: review?(coop) → review+
All done here.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Component: Release Engineering: Custom Builds → Release Engineering: Releases
Product: mozilla.org → Release Engineering
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: