[Boost-bugs] [Boost C++ Libraries] #8669: boost::asio::windows::random_access_handle is seriously broken

Subject: [Boost-bugs] [Boost C++ Libraries] #8669: boost::asio::windows::random_access_handle is seriously broken
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-06-07 16:59:57

#8669: boost::asio::windows::random_access_handle is seriously broken
 Reporter: ned14 | Owner: chris_kohlhoff
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: asio
  Version: Boost Development Trunk | Severity: Showstopper
 Keywords: |
 This year a new library called Boost.AFIO extending Boost.ASIO with async
 file i/o was given funding for Google Summer of Code. This library has
 found some serious problems with Boost.ASIO's Windows IOCP
 boost::asio::windows::random_access_handle implementation:

 1. It appears to limit buffer sizes to 64Kb which corrupts output. This
 may be appropriate for non-random access e.g. network use (see
 http://comments.gmane.org/gmane.comp.lib.boost.asio.user/3676), but it is
 a showstopper for file i/o. The windows::random_access_handle should have
 no such limitation.

 2. It appears to corrupt output when many buffers are passed, even when
 each of these is under 64Kb.

 3. It also doesn't appear to like doing scatter/gather file i/o from
 multiple threads.

 You will note that the POSIX (Linux) implementation doesn't have any of
 these problems (see https://travis-
 ci.org/BoostGSoC/boost.afio/builds/7882496). This is something wrong with
 the Windows IOCP implementation in Boost.ASIO.

 To illustrate the problem, I have created a special branch for this bug
 report at https://github.com/ned14/TripleGit/tree/boost_asio_bug1. If you
 you'll see that I've created a macro BOOST_ASIO_BUG_WORKAROUND which when
 defined gets the torture test to pass. If you run through main.cpp looking
 for BOOST_ASIO_BUG_WORKAROUND you'll see the changes I had to make to get
 things working - these are a good indicator of what's going wrong in
 Boost.ASIO I think.

 To run just the failing unit test which exhibits the problem, use
 "x64/Debug/tests async_io/torture". You'll need the experimental VS2012
 Nov 2012 CTP compiler supporting variadic templates to compile the code
 successfully in Visual Studio 2012.

 My thanks in advance for your time.


Ticket URL: <https://svn.boost.org/trac/boost/ticket/8669>
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:13 UTC