[Boost-bugs] [Boost C++ Libraries] #11873: boost::filesystem does not work on windows when multiple processes access the same junction (directory)

Subject: [Boost-bugs] [Boost C++ Libraries] #11873: boost::filesystem does not work on windows when multiple processes access the same junction (directory)
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-12-26 05:24:32


#11873: boost::filesystem does not work on windows when multiple processes access
the same junction (directory)
----------------------------------------+------------------------
 Reporter: stsoe <stsoe@…> | Owner: bemandawes
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: filesystem
  Version: Boost 1.61.0 | Severity: Regression
 Keywords: symlink, junction, windows |
----------------------------------------+------------------------
 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

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/11873>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:19 UTC