Subject: Re: [Boost-bugs] [Boost C++ Libraries] #8933: on the windows platform async reads with multiple threads can produce random EOF errors
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-09-03 15:06:29
#8933: on the windows platform async reads with multiple threads can produce
random EOF errors
-----------------------------------------+----------------------------
Reporter: Shane Powell <killerbee@â¦> | Owner: chris_kohlhoff
Type: Bugs | Status: new
Milestone: To Be Determined | Component: asio
Version: Boost 1.54.0 | Severity: Showstopper
Resolution: | Keywords:
-----------------------------------------+----------------------------
Comment (by danobrega@â¦):
Hi all,
We have recently started using boost::asio and have hit this problem.
Sometimes our completion handler is called after a boost::asio::async_read
(1.54) with 0 bytes_transferred and error == boost::asio::error::eof.
Although the bytes_transferred argument is zero, our buffer is correctly
read from the tcp socket. If we just ignore this error, our program works
like nothing is happening.
I've tried to debug the program and reached win_iocp_io_service.ipp,
win_iocp_io_service::do_one at line 341. Upon inspecting, the line:
{{{
bytes_transferred = op->OffsetHigh;
}}}
sets bytes_transferred to zero. I don't know why we're trying to get the
bytes read from op->OffsetHigh. Looking at the OVERLAPPED microsoft
documentation it seems we should be using the field InternalHigh instead.
In our case the OVERLAPPED InternalHigh field has the correct number of
bytes read, and they are actually read. Our read buffer has all the
information it should have.
With this information I looked for existing asio defects and found this
one. It sure looks like the same problem: async reads produce random EOF
errors.
I never used windows async IO before, so I'm not sure of what I'm saying.
I hope it helps though. I'm available if you want me to test/try any fix,
just send me an email.
Best Regards,
danobrega
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/8933#comment:16> 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:14 UTC