<div dir="ltr"><br><div>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:</div><div><br></div><div><div>   CUSTOMBUILD : CMake error : Cannot restore timestamp W:\git2\vs2012-wdk80-build-monza\build\Windows_x86_64\snfs\obj\snfs\test\SnfsShareTest\CMakeFiles\generate.stamp</div>
</div><div><br></div><div>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.</div>
<div><br></div><div>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.</div><div><br></div><div>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.</div>
<div><br></div><div>Thanks,</div><div><br></div><div>Eric</div><div><br></div><div><br></div><div>For reference, the following are the events in the Process Monitor tracing showing the overlapping renames:</div><div><br></div>
<div><div>"5:10:34.1318968 PM","cmake.exe","4688","CreateFile","\\<a href="http://k2.mdh.quantum.com">k2.mdh.quantum.com</a>\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"</div>
<div>"5:10:34.1325760 PM","cmake.exe","5000","CreateFile","\\<a href="http://k2.mdh.quantum.com">k2.mdh.quantum.com</a>\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"</div>
<div>"5:10:34.1380157 PM","cmake.exe","4688","QueryAttributeTagFile","\\<a href="http://k2.mdh.quantum.com">k2.mdh.quantum.com</a>\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"</div>
<div>"5:10:34.1380751 PM","cmake.exe","4688","QueryBasicInformationFile","\\<a href="http://k2.mdh.quantum.com">k2.mdh.quantum.com</a>\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"</div>
<div>"5:10:34.1387283 PM","cmake.exe","5000","QueryAttributeTagFile","\\<a href="http://k2.mdh.quantum.com">k2.mdh.quantum.com</a>\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"</div>
<div>"5:10:34.1387851 PM","cmake.exe","5000","QueryBasicInformationFile","\\<a href="http://k2.mdh.quantum.com">k2.mdh.quantum.com</a>\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"</div>
<div>"5:10:34.1490336 PM","cmake.exe","4688","SetRenameInformationFile","\\<a href="http://k2.mdh.quantum.com">k2.mdh.quantum.com</a>\z1\eberge\git2\vs2012-wdk80-build-monza\build\Windows_x86_64\snfs\obj\snfs\test\SnfsShareTest\CMakeFiles\generate.stamp.tmp84940045","SUCCESS","ReplaceIfExists: True, FileName: \\<a href="http://k2.mdh.quantum.com">k2.mdh.quantum.com</a>\z1\eberge\git2\vs2012-wdk80-build-monza\build\Windows_x86_64\snfs\obj\snfs\test\SnfsShareTest\CMakeFiles\generate.stamp"</div>
<div>"5:10:34.1513128 PM","cmake.exe","5000","SetRenameInformationFile","\\<a href="http://k2.mdh.quantum.com">k2.mdh.quantum.com</a>\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: \\<a href="http://k2.mdh.quantum.com">k2.mdh.quantum.com</a>\z1\eberge\git2\vs2012-wdk80-build-monza\build\Windows_x86_64\snfs\obj\snfs\test\SnfsShareTest\CMakeFiles\generate.stamp"</div>
<div>"5:10:34.1514602 PM","cmake.exe","5000","CloseFile","\\;W:0000000031879054\<a href="http://k2.mdh.quantum.com">k2.mdh.quantum.com</a>\z1\eberge\git2\vs2012-wdk80-build-monza\build\Windows_x86_64\snfs\obj\snfs\test\SnfsShareTest\CMakeFiles\generate.stamp","SUCCESS",""</div>
<div>"5:10:34.1514988 PM","cmake.exe","4688","CloseFile","\\;W:0000000031879054\<a href="http://k2.mdh.quantum.com">k2.mdh.quantum.com</a>\z1\eberge\git2\vs2012-wdk80-build-monza\build\Windows_x86_64\snfs\obj\snfs\test\SnfsShareTest\CMakeFiles\generate.stamp","SUCCESS",""</div>
<div>"5:10:34.1515417 PM","cmake.exe","5000","CloseFile","\\<a href="http://k2.mdh.quantum.com">k2.mdh.quantum.com</a>\z1\eberge\git2\vs2012-wdk80-build-monza\build\Windows_x86_64\snfs\obj\snfs\test\SnfsShareTest\CMakeFiles\generate.stamp.tmp3633013290","SUCCESS",""</div>
<div>"5:10:34.1516375 PM","cmake.exe","4688","CloseFile","\\<a href="http://k2.mdh.quantum.com">k2.mdh.quantum.com</a>\z1\eberge\git2\vs2012-wdk80-build-monza\build\Windows_x86_64\snfs\obj\snfs\test\SnfsShareTest\CMakeFiles\generate.stamp.tmp84940045","SUCCESS",""</div>
<div>"5:10:34.1517807 PM","cmake.exe","4688","CloseFile","\\<a href="http://k2.mdh.quantum.com">k2.mdh.quantum.com</a>\z1\eberge\git2\vs2012-wdk80-build-monza\build\Windows_x86_64\snfs\obj\snfs\test\SnfsShareTest\CMakeFiles\generate.stamp.depend","SUCCESS",""</div>
</div><div><br></div></div>