Boost logo

Boost Users :

Subject: Re: [Boost-users] [Thread] Timed join returning true before thread terminated
From: Nathan Crookston (nathan.crookston_at_[hidden])
Date: 2012-03-16 14:41:09


Hi John,

On Fri, Mar 16, 2012 at 12:00 PM, John Rocha <jrr_at_[hidden]> wrote:
> I followed your advice to verify where the threads where blocked. I analyzed
> the GDB data and I found that the LU thread was blocked on a join() for
> worker
> thread #7 (having sent it an interrupt) and that worker thread #7 was block
> on
> a boost::condition_variable_any.
This bug: https://svn.boost.org/trac/boost/ticket/4978 bit us at my
work -- it was merged in 1.47. SInce you're using 1.43, perhaps it's
the same issue?

>
> I then carefully looked at my boost thread source code, for version 1.43 of
> boost, and I believe there is a race condition between the boost thread's
> interrupt() and convar::wait() methods. Its a very small window, but I've
> been
> able to reproduce the issue with logs.
>
> Can you please read the following to find any flaws with my logic, or
> confirm
> my suspicion? Also, if this is a defect with the library, what should I do
> next? Do I raise a defect somewhere?

The patch was pretty trivial for us to apply, for what that's worth.

HTH,
Nate


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net