Re: [Boost-bugs] [Boost C++ Libraries] #11069: io_service hangs for 5 minutes

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #11069: io_service hangs for 5 minutes
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-03-06 14:43:31


#11069: io_service hangs for 5 minutes
-------------------------------+----------------------------
  Reporter: dmitrmax@… | Owner: chris_kohlhoff
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: asio
   Version: Boost 1.55.0 | Severity: Problem
Resolution: | Keywords:
-------------------------------+----------------------------

Comment (by dmitrmax@…):

 The bug was fixed. It is a race condition. It happens in following
 conditions:
 1) io_service::run_one() is used to execute works;
 2) only two threads calling run_one() left;
 3) one of these threads is executing handler completion;
 4) handler posts another operation into the op_queue and after it the
 first thread doesn't call run_one() anymore.
 5) meanwhile after the first thread started handler completion but before
 handler posted the new op, the second thread is running reactor
 (epoll_reactor in my case).

 After the first thread has executed the handler completion, it should
 check for new works, and if there are some new works, wake up a thread or
 interrupt reactor running. I put this logic into work_cleanup object.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/11069#comment:1>
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:18 UTC