Subject: [Boost-bugs] [Boost C++ Libraries] #10814: Boost asio socket keeps established connection forever even after endpoint is closed.
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-11-24 20:40:33
#10814: Boost asio socket keeps established connection forever even after endpoint
is closed.
-----------------------------------------------+---------------------------
Reporter: Iván <versuchen@â¦> | Owner:
Type: Bugs | chris_kohlhoff
Milestone: To Be Determined | Status: new
Version: Boost 1.57.0 | Component: asio
Keywords: asio established forever blocking | Severity: Problem
-----------------------------------------------+---------------------------
Context:
Server side:
Accept socket
loop blocking read from accepted socket
Client side:
Connect
loop blocking write to connected socket
Sporadically the client endpoint is ended but the server is not notified
of that event. After that, the client can connect again to the server
(even tho gdb says the thread is on recv) but the server never returns
from the blocking read due to, probably, the new endpoint sending data
doesn't match the last one:
Server side:
{{{
Local Address Foreign Address
192.168.1.1:1234 192.168.1.2:50000
}}}
Client side after connection was dropped:
{{{
Local Address Foreign Address
192.168.1.2:50001 192.168.1.2:1234
}}}
As I said, the issue is sporadic but I can reproduce the same blocking
behaviour as follows:
1. Run the server and client normally. Client sends data and server reads
it.
2. Enable a traffic filter with a firewall blocking/dropping packages at
the client.
3. After step 2, I can kill the client process and the server will never
realize that the client is no longer there, so it will block at recv
forever.
Regards,
Iván
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/10814> 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:17 UTC