Boost logo

Boost :

Subject: Re: [boost] Static initialization of boost shared objects question
From: Beman Dawes (bdawes_at_[hidden])
Date: 2013-01-26 08:20:23


On Fri, Jan 25, 2013 at 2:19 PM, Juan Carlos Franzoy <jfranzoy_at_[hidden]> wrote:
> Hello. Thanks for reading my question.

Posts stand a better chance of being read by the right person if they
include the library name in square brackets at the beginning of the
subject line. For example, "[regex]" or "[filesystem]". The subject
line should not begin with "[boost]" as that is added automatically.

See http://www.boost.org/community/policy.html#subject-line

> I fell into a deadlock in static initialization of boost shared objects.
>
> The deadlock occurs in a reentrant call to a function which contains a
> definition of a static variable.
> Apparenlty gcc protects the initialization of such variables with a
> condition variable.
>
> Looking at the c++ code nothing at all make anybody suspect about reentrancy.
>
> My "interpretation of the fact" may be titled 'something in gcc, ld,
> ld.so, c++language made the call to be reentrant'

Are you saying that a data race occurs during static initialization,
and that causes a deadlock?

Does this always occur with programs that use Boost System, or only
when combined with Wave?

Have you tried to construct a simple test program that illustrates the problem?

--Beman


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk