Re: [Boost-bugs] [Boost C++ Libraries] #7611: segfault in epoll_reactor.ipp

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #7611: segfault in epoll_reactor.ipp
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-12-29 18:21:39


#7611: segfault in epoll_reactor.ipp
-------------------------------------------------+-------------------------
  Reporter: Fredrik Jansson | Owner:
  <fredrik.jansson.se@…> | chris_kohlhoff
      Type: Bugs | Status: closed
 Milestone: To Be Determined | Component: asio
   Version: Boost 1.52.0 | Severity: Problem
Resolution: invalid | Keywords:
-------------------------------------------------+-------------------------

Comment (by jyu@…):

 Replying to [comment:2 chris_kohlhoff]:
> The descriptor_data variable is only set to NULL when the corresponding
 socket is deregistered (see epoll_reactor::deregister_descriptor, which is
 in turn called from reactive_socket_service_base::destroy/close). This
 means that your program has closed the socket or destroyed the socket
 object.
>
> Most likely you have a threading issue in your program where you close a
 socket from one thread while simultaneously starting another async
 operation on the same socket from another thread. If you are sure this is
 not the case, please attach a small, complete program that exhibits the
 problem. Thanks.

 In my case, the crash is due to two threads simultaneously closing the
 socket. can you make the socket close or shutdown function thread-safe,
 just as Fredrik Jansson suggested?

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/7611#comment:4>
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:20 UTC