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

Subject: [Boost-bugs] [Boost C++ Libraries] #11069: io_service hangs for 5 minutes
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-03-04 10:56:37

#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
 Keywords: |
 Everything said below is applicable to Linux, 64-bit, CentOS 6.6, compiled
 by g++ 4.4.

 I have an io_service object which is runned by several threads. According
 to the logic at the program finish all sockets which belong to this
 io_service are closed and these threads begin to exit one by one.

 Just before threads exits, it posts on the io_service a callback which
 joins this thread from another thread and cleans up some associated data.

 Everything runs perfect until only one thread is left. Occasionally this
 thread is not running any posted event for exactly 5 minutes. It is just
 waiting for something. After 5 minutes it wakes up, joins all the the
 threads which were posted, and successfully exits. It doesn't happen all
 the time, but approx. every 50 program executions I get this situations.

 According to asio sources, epoll reactor has some timeout which equals to
 exactly 5 minutes. It seems that there is a bug somewhere.

 P.S.: Meanwhile the main program thread waits for condition_variable which
 is set by the last thread running io_service, which signals that all the
 threads exited.

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