I was seeing an error with the 2.8.2.12 code, so I did some testing with
last week's latest 3.0 code and am still seeing it, which are errors of the
form:

   CUSTOMBUILD : CMake error : Cannot restore timestamp
W:\git2\vs2012-wdk80-build-monza\build\Windows_x86_64\snfs\obj\snfs\test\SnfsShareTest\CMakeFiles\generate.stamp

I used the Sysinternals Process Monitor command and saw that this was
likely due to two processes creating a generate.stamp.tmpXXXXXX file and
then both of them renaming these to generate.stamp at about the same time.
 I've been looking around in descriptions of the Windows rename to see what
might cause this.  The thing that's clear is that both of the temp files
are open with a share mode for SHARE_READ, SHARE_WRITE, and SHARE_DELETE
(so, everything possible).  I suppose there's still an issue regarding the
share mode on the directory as well between the competing renames.

My first question is whether the cmake code was expecting to avoid this
type of race by other means or it was just expecting that the last one
would succeed.

Note that this is not from a Windows CIFS server, but rather a Samba server
so it isn't out of the question that the Samba server is misbehaving (I'll
need to do some experiments on that to see if a Windows CIFS server would
have the same behavior.  But I first wanted to check with the group as to
whether locking or some other think was supposed to keep this type of race
from occurring or note.

Thanks,

Eric


For reference, the following are the events in the Process Monitor tracing
showing the overlapping renames:

"5:10:34.1318968
PM","cmake.exe","4688","CreateFile","\\k2.mdh.quantum.com\z1\eberge\git2\vs2012-wdk80-build-monza\build\Windows_x86_64\snfs\obj\snfs\test\SnfsShareTest\CMakeFiles\generate.stamp.tmp84940045","SUCCESS","Desired
Access: Read Attributes, Delete, Synchronize, Disposition: Open, Options:
Synchronous IO Non-Alert, Open Reparse Point, Attributes: n/a, ShareMode:
Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened"
"5:10:34.1325760
PM","cmake.exe","5000","CreateFile","\\k2.mdh.quantum.com\z1\eberge\git2\vs2012-wdk80-build-monza\build\Windows_x86_64\snfs\obj\snfs\test\SnfsShareTest\CMakeFiles\generate.stamp.tmp3633013290","SUCCESS","Desired
Access: Read Attributes, Delete, Synchronize, Disposition: Open, Options:
Synchronous IO Non-Alert, Open Reparse Point, Attributes: n/a, ShareMode:
Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened"
"5:10:34.1380157 PM","cmake.exe","4688","QueryAttributeTagFile","\\
k2.mdh.quantum.com\z1\eberge\git2\vs2012-wdk80-build-monza\build\Windows_x86_64\snfs\obj\snfs\test\SnfsShareTest\CMakeFiles\generate.stamp.tmp84940045","SUCCESS","Attributes:
A, ReparseTag: 0x0"
"5:10:34.1380751 PM","cmake.exe","4688","QueryBasicInformationFile","\\
k2.mdh.quantum.com\z1\eberge\git2\vs2012-wdk80-build-monza\build\Windows_x86_64\snfs\obj\snfs\test\SnfsShareTest\CMakeFiles\generate.stamp.tmp84940045","SUCCESS","CreationTime:
5/9/2014 5:10:34 PM, LastAccessTime: 5/9/2014 5:10:34 PM, LastWriteTime:
5/9/2014 5:10:34 PM, ChangeTime: 5/9/2014 5:10:34 PM, FileAttributes: A"
"5:10:34.1387283 PM","cmake.exe","5000","QueryAttributeTagFile","\\
k2.mdh.quantum.com\z1\eberge\git2\vs2012-wdk80-build-monza\build\Windows_x86_64\snfs\obj\snfs\test\SnfsShareTest\CMakeFiles\generate.stamp.tmp3633013290","SUCCESS","Attributes:
A, ReparseTag: 0x0"
"5:10:34.1387851 PM","cmake.exe","5000","QueryBasicInformationFile","\\
k2.mdh.quantum.com\z1\eberge\git2\vs2012-wdk80-build-monza\build\Windows_x86_64\snfs\obj\snfs\test\SnfsShareTest\CMakeFiles\generate.stamp.tmp3633013290","SUCCESS","CreationTime:
5/9/2014 5:10:34 PM, LastAccessTime: 5/9/2014 5:10:34 PM, LastWriteTime:
5/9/2014 5:10:34 PM, ChangeTime: 5/9/2014 5:10:34 PM, FileAttributes: A"
"5:10:34.1490336 PM","cmake.exe","4688","SetRenameInformationFile","\\
k2.mdh.quantum.com\z1\eberge\git2\vs2012-wdk80-build-monza\build\Windows_x86_64\snfs\obj\snfs\test\SnfsShareTest\CMakeFiles\generate.stamp.tmp84940045","SUCCESS","ReplaceIfExists:
True, FileName: \\k2.mdh.quantum.com
\z1\eberge\git2\vs2012-wdk80-build-monza\build\Windows_x86_64\snfs\obj\snfs\test\SnfsShareTest\CMakeFiles\generate.stamp"
"5:10:34.1513128 PM","cmake.exe","5000","SetRenameInformationFile","\\
k2.mdh.quantum.com\z1\eberge\git2\vs2012-wdk80-build-monza\build\Windows_x86_64\snfs\obj\snfs\test\SnfsShareTest\CMakeFiles\generate.stamp.tmp3633013290","SHARING
VIOLATION","ReplaceIfExists: True, FileName: \\k2.mdh.quantum.com
\z1\eberge\git2\vs2012-wdk80-build-monza\build\Windows_x86_64\snfs\obj\snfs\test\SnfsShareTest\CMakeFiles\generate.stamp"
"5:10:34.1514602 PM","cmake.exe","5000","CloseFile","\\;W:0000000031879054\
k2.mdh.quantum.com
\z1\eberge\git2\vs2012-wdk80-build-monza\build\Windows_x86_64\snfs\obj\snfs\test\SnfsShareTest\CMakeFiles\generate.stamp","SUCCESS",""
"5:10:34.1514988 PM","cmake.exe","4688","CloseFile","\\;W:0000000031879054\
k2.mdh.quantum.com
\z1\eberge\git2\vs2012-wdk80-build-monza\build\Windows_x86_64\snfs\obj\snfs\test\SnfsShareTest\CMakeFiles\generate.stamp","SUCCESS",""
"5:10:34.1515417 PM","cmake.exe","5000","CloseFile","\\k2.mdh.quantum.com
\z1\eberge\git2\vs2012-wdk80-build-monza\build\Windows_x86_64\snfs\obj\snfs\test\SnfsShareTest\CMakeFiles\generate.stamp.tmp3633013290","SUCCESS",""
"5:10:34.1516375 PM","cmake.exe","4688","CloseFile","\\k2.mdh.quantum.com
\z1\eberge\git2\vs2012-wdk80-build-monza\build\Windows_x86_64\snfs\obj\snfs\test\SnfsShareTest\CMakeFiles\generate.stamp.tmp84940045","SUCCESS",""
"5:10:34.1517807 PM","cmake.exe","4688","CloseFile","\\k2.mdh.quantum.com
\z1\eberge\git2\vs2012-wdk80-build-monza\build\Windows_x86_64\snfs\obj\snfs\test\SnfsShareTest\CMakeFiles\generate.stamp.depend","SUCCESS",""
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to