MantisBT - CMake
View Issue Details
0013017CMakeCPackpublic2012-03-05 19:182016-06-10 14:31
Torsten Rohlfing 
Kitware Robot 
lowmajorsometimes
closedmoved 
AppleDarwin10.6
CMake 2.8.6 
 
0013017: PackageMaker generator sometimes fails when virus scanner active
CPack using the PackageManager generator sometimes (most of the time, really) fails on MacOS when a virus scanner is installed.

IMPORTANT - This is not so much a CPack bug report as a hint that others may potentially find useful when they encounter the same situation (right now Google is useless for this issue). That said, it might be possible for CPack to implement a workaround, e.g., repeating hdiutil one or two times if this condition is encountered.

The exact problem is that when the package file is created, the virus scanner (mine is Symantec) tries to scan the mounted temporary volume. If the scan is still running when "hdiutil" tries to unmount the volume, then unmounting will fail and as a result, package generation will too.

Workaround - re-run the "hdiutil" command a couple of times. Eventually the virus scan will complete within the three unmount retries the hdiutil performs, and then package creation succeeds.
Run

cpack -G PackageMaker


Sometimes (> 50%) the following results:

Pack Error: Problem running hdiutil command: "/usr/bin/hdiutil" create -ov -format UDZO -srcfolder "/Users/torsten/cmtk/release/OSX-10.6/_CPack_Packages/Darwin/PackageMaker/CMTK-2.1.3-MacOSX-10.6-x86_64.mpkg" "/Users/torsten/cmtk/release/OSX-10.6/_CPack_Packages/Darwin/PackageMaker/CMTK-2.1.3-MacOSX-10.6-x86_64.dmg"
Please check /Users/torsten/cmtk/release/OSX-10.6/_CPack_Packages/Darwin/PackageMaker/hdiutilOutput.log for errors
CPack Error: Problem compressing the directory
CPack Error: Error when generating package: CMTK


The error log file contains the following:

detachTempimageFile: synchronous unmount /dev/disk2s1 returned 49153
retrying unmount (#1)...
detachTempImageFile: synchronous retry (#1) unmount /Volumes/CMTK-2.1.3-MacOSX-10.6-x86_64 (/dev/disk2s1) returned 49153
retrying unmount (0000002)...
detachTempImageFile: synchronous retry (#1) unmount /Volumes/CMTK-2.1.3-MacOSX-10.6-x86_64 (/dev/disk2s1) returned 49153
retrying unmount (0000003)...
detachTempImageFile: synchronous retry (#1) unmount /Volumes/CMTK-2.1.3-MacOSX-10.6-x86_64 (/dev/disk2s1) returned 49153
hdiutil: create failed - Resource busy
No tags attached.
Issue History
2012-03-05 19:18Torsten RohlfingNew Issue
2012-08-11 21:09David ColeStatusnew => backlog
2012-08-11 21:09David ColeNote Added: 0030373
2016-06-10 14:28Kitware RobotNote Added: 0041996
2016-06-10 14:28Kitware RobotStatusbacklog => resolved
2016-06-10 14:28Kitware RobotResolutionopen => moved
2016-06-10 14:28Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0030373)
David Cole   
2012-08-11 21:09   
Sending old, never assigned issues to the backlog.

(The age of the bug, plus the fact that it's never been assigned to anyone means that nobody is actively working on it...)

If an issue you care about is sent to the backlog when you feel it should have been addressed in a different manner, please bring it up on the CMake mailing list for discussion. Sign up for the mailing list here, if you're not already on it: http://www.cmake.org/mailman/listinfo/cmake [^]

It's easy to re-activate a bug here if you can find a CMake developer who has the bandwidth to take it on, and ferry a fix through to our 'next' branch for dashboard testing.
(0041996)
Kitware Robot   
2016-06-10 14:28   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.