MantisBT - CMake | |||||
| View Issue Details | |||||
| ID | Project | Category | View Status | Date Submitted | Last Update |
| 0009640 | CMake | CPack | public | 2009-10-02 05:30 | 2016-06-10 14:31 |
| Reporter | Claudio Bley | ||||
| Assigned To | Bill Hoffman | ||||
| Priority | normal | Severity | major | Reproducibility | random |
| Status | closed | Resolution | moved | ||
| Platform | OS | OS Version | |||
| Product Version | |||||
| Target Version | Fixed in Version | ||||
| Summary | 0009640: ERROR_SHARING_VIOLATION in CopyFileTime function | ||||
| Description | Trying to build & install Boost I ran into the following error when CPack was called: ,---- | CPack: - Install component: fusion_headers | CMake Error at libs/fusion/cmake_install.cmake:31 (FILE): | file Problem setting modification time on file | "C:/build/vc90nmake/boost_1_40_0/_CPack_Packages/win32/NSIS/Boost-1.40.0-vc9/fusion_headers/include/boost-1_40/boost/fusion/include/iterator_facade.hpp" | Call Stack (most recent call first): | libs/cmake_install.cmake:48 (INCLUDE) | cmake_install.cmake:37 (INCLUDE) | | CPack Error: Error when generating package: Boost | NMAKE : fatal error U1077: ""C:\Programme\CMake 2.6\bin\cpack.exe"": Return-Code "0x1" | Stop. `---- I debugged cpack.exe and realized that the error occured in Source/cmSystemTools.cxx:CopyFileTime() when trying to open the target file. GetLastError() returned ERROR_SHARING_VIOLATION. | ||||
| Steps To Reproduce | |||||
| Additional Information | Investigating, I found out that it was caused by my anti-virus software blocking access to the file until it has decided whether the file is malicious or not. That lead to a race-condition and at some point in the packaging process CPack always failed updateing the timestamps, because the AV software had not completed examining the file. According to http://support.microsoft.com/?scid=kb%3Ben-us%3B316609&x=17&y=20 [^] one should retry attempting to open the file until successfull. I implemented this approach (see the following patch) and succeeded in building an installer package for Boost. Of course, there a some other places where CreateFile is called and this problem might happen there also. It might be a good idea to generalize this into an utility function... | ||||
| Tags | No tags attached. | ||||
| Relationships | |||||
| Attached Files | https://public.kitware.com/Bug/file/2512/cmake_sharing_violation.diff | ||||
| Issue History | |||||
| Date Modified | Username | Field | Change | ||
| 2009-10-02 05:30 | Claudio Bley | New Issue | |||
| 2009-10-02 05:30 | Claudio Bley | File Added: cmake_sharing_violation.diff | |||
| 2009-10-02 11:59 | Bill Hoffman | Status | new => assigned | ||
| 2009-10-02 11:59 | Bill Hoffman | Assigned To | => David Cole | ||
| 2009-10-02 12:13 | Bill Hoffman | Note Added: 0017904 | |||
| 2009-12-11 17:51 | David Cole | Note Added: 0018832 | |||
| 2009-12-11 17:52 | David Cole | Note Added: 0018833 | |||
| 2009-12-11 17:52 | David Cole | Assigned To | David Cole => Bill Hoffman | ||
| 2010-05-07 08:29 | Claudio Bley | Note Added: 0020640 | |||
| 2010-07-28 09:35 | Claudio Bley | Note Edited: 0020640 | |||
| 2016-06-10 14:27 | Kitware Robot | Note Added: 0041600 | |||
| 2016-06-10 14:27 | Kitware Robot | Status | assigned => resolved | ||
| 2016-06-10 14:27 | Kitware Robot | Resolution | open => moved | ||
| 2016-06-10 14:31 | Kitware Robot | Status | resolved => closed | ||
| Notes | |||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||