Opened 7 years ago
Last modified 4 years ago
#11873 new Bugs
boost::filesystem does not work on windows when multiple processes access the same junction (directory)
Reported by: | Owned by: | Beman Dawes | |
---|---|---|---|
Milestone: | To Be Determined | Component: | filesystem |
Version: | Boost 1.64.0 | Severity: | Regression |
Keywords: | symlink, junction, windows | Cc: |
Description
Hi,
I just upgraded to boost_1_60_0 ran into a regression on windows only, which I think is related to issue 9016. My windows tests are failing sporadically with the error:
boost::filesystem::read_symlink: The process cannot access the file because it is being used by another process: "r:/data"
Debugging this by comparing 1_60_0 to the earlier 1_56_0 I finally narrowed the difference to operations.cpp: bool is_reparse_point_a_symlink
, which returns true in 1_60_0 but false in 1_56_0. The return value triggers canonical
to call detail::read_symlink
, which in turn ends up calling ::CreateFileW
with dwShareMode
set to 0 so that the file/directory is locked and cannot be opened by another process.
I am running my tests on LSF and many many processes end up accessing the same file / directory at the same time, thus leading the the above error message.
I have not debugged enough to be able to suggest a fix or a work-around, but this bug currently prevents me from upgrading to boost_1_60_0. I am thinking that I can maybe revert the change to is_reparse_point_a_symlink
in my installation so I can proceed with the upgrade, but I am worried that other changes have been made that depend on the current behavior.
Thanks,
Soren Soe
Change History (4)
comment:1 by , 7 years ago
Version: | Boost 1.61.0 → Boost 1.60.0 |
---|
comment:2 by , 4 years ago
comment:3 by , 4 years ago
Version: | Boost 1.60.0 → Boost 1.64.0 |
---|
This problem still exists in 1.64. Make a link in Windows, and pass a path that includes the link to testBoost in the following:
I did 5 runs and had between 8 and 14 failures each time.