Boost logo

Boost Users :

From: Matt Paindavoine. (matt_at_[hidden])
Date: 2004-08-30 11:57:03


Hello,

I have been using the spirit parser library, and other boost pieces (date,
test, variant, ...), along with Mozilla.
I recently merged in some parts of the application that were running
separately, and the program started hanging.
I did a bit of searching, but couldn't find anything significantly wrong,
especially since the individual parts are working correctly.
The problem seems to be related to threads, as the stack indicates (cf
stack at the end), and as the strace output shows here:

parsing:*****************************:
) = 240
time([1093872322]) = 1093872322
futex(0x4045b860, FUTEX_WAIT, 2, NULL) = -1 EAGAIN (Resource temporarily
unavailable)
futex(0x4045b860, FUTEX_WAIT, 2, NULL) = -1 EAGAIN (Resource temporarily
unavailable)
[... ad vitam eternam]

I compiled this program using
        gcc (GCC) 3.4.1 (Debian 3.4.1-7)

using
-DBOOST_MPL_NO_PREPROCESSED_HEADERS -DBOOST_SPIRIT_DEBUG -fPIC
-I/usr/X11R6/include -frtti -fexceptions -Wall -Wconversion -Wpointer-arith
-Wcast-align -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy
-Wno-non-virtual-dtor -Wno-long-long -pedantic -fshort-wchar -pthread -pipe
-DDEBUG -D_DEBUG -DDEBUG_root -DTRACING -g -fno-inline
-I/usr/X11R6/include -DMOZILLA_CLIENT -include

I don't know exactly what those threads are doing behind my back, but I'd
appreciate if someone could provide some suggestion for fixing this
problem. Thanks.

Matt

stack:

#0 0x4040c791 in pthread_setcanceltype () from /lib/tls/libc.so.6
#1 0x4045b860 in __after_morecore_hook () from /lib/tls/libc.so.6
#2 0x4045aedc in ?? () from /lib/tls/libc.so.6
#3 0x00000031 in ?? ()
#4 0x4039ad63 in posix_memalign () from /lib/tls/libc.so.6
#5 0x00000012 in ?? ()
#6 0x409c91fc in ~lightweight_mutex (this=0x819eb40) at lwm_pthreads.hpp:53
#7 0x409c9d24 in ~sp_counted_base_impl (this=0x819eb40)
    at nsCXExpRecord.cpp:219
#8 0x409c96e2 in boost::detail::sp_counted_base::destruct (this=0x819eb40)
    at shared_count.hpp:115
#9 0x409b2a7e in boost::detail::sp_counted_base::weak_release (this=0x819eb40)
    at shared_count.hpp:173
#10 0x409bd6de in boost::detail::weak_count::operator= (this=0x40b3bb3c,
    r=@0x41749188) at shared_count.hpp:492
#11 0x409bd68f in boost::weak_ptr<boost::spirit::impl::grammar_helper<boost::spirit::grammar<cx::FooFooRecordGrammar<cx::FooConfigFooRecordGrammar>, boost::spirit::closure_context<cx::FooFooRecordClosure<cx::FooConfigFooRecordGrammar> > >, cx::FooFooRecordGrammar<cx::FooConfigFooRecordGrammar>, boost::spirit::scanner<__gnu_cxx::__normal_iterator<char const*, std::string>, boost::spirit::scanner_policies<boost::spirit::iteration_policy, boost::spirit::match_policy, boost::spirit::action_policy> > > >::operator=<boost::spirit::impl::grammar_helper<boost::spirit::grammar<cx::FooFooRecordGrammar<cx::FooConfigFooRecordGrammar>, boost::spirit::closure_context<cx::FooFooRecordClosure<cx::FooConfigFooRecordGrammar> > >, cx::FooFooRecordGrammar<cx::FooConfigFooRecordGrammar>, boost::spirit::scanner<__gnu_cxx::__normal_iterator<char const*, std::string>, boost::spirit::scanner_policies<boost::spirit::iteration_policy, boost::spirit::match_policy, boost::spirit::action_policy> > > > (this=0x40b3bb38, r=@0x41749184)
    at weak_ptr.hpp:87
#12 0x409bc67a in grammar_helper (this=0x41749170, p=@0x40b3bb38)
    at grammar.ipp:156
[ goes further up, I don't know if it will help... ]


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