Boost logo

Boost Users :

From: Farberov, Inga (ifarberov_at_[hidden])
Date: 2007-06-29 16:39:41


> For some reason I am unable to reproduce this problem in a small
> program, but when try to suspend a hanging thread in debugger, I get
> following stack trace:
> 18 _dl_sysinfo_int80() 0x003317a2
> 17 __lll_mutex_lock_wait() 0x0062e30e
> 16 _L_mutex_lock_35() 0x0062af3b
> 15 <symbol is not available> 0x080c80e8
> 14 <symbol is not available> 0x00472ff4
> 13 <symbol is not available> 0x080c80e8
> 12 <symbol is not available> 0xbffff6b0
> 11 <symbol is not available> 0xbffff208
> 10 pthread_mutex_lock() 0x0042097e
> 9 pthread_mutex_lock() 0x0042097e
> 8 scoped_lock() /usr/include/boost/detail/lwm_pthreads.hpp:72
> 0x080598eb
> 7 boost::detail::sp_counted_base::add_ref_copy()
> /usr/include/boost/detail/shared_count.hpp:122 0x0805b679
> 6 shared_count()
> /usr/lib/boost/include/boost-1_34/boost/detail/shared_count.hpp:216
> 0x0805b65b
> 5 shared_ptr() /usr/include/c++/3.4.6/bits/stl_construct.h:81
> 0x0807a7c8
> 4
> boost::program_options::options_description_easy_init::operator()

This stacktrace suggest that you've built your application with
single-threading, and linked it to multi-threaded build of
program_options, or vice versa.

I don't think I can suggest more without the real code and specific
information how you build it.

- Volodya

My code is broken down into 2 projects - one compiles into a static
library and the other into an executable that is referring to the static
library.
I am using several boost libraries - multithreaded versions. When I
compile and link I use -pthread compiler flag.

By the way, I did an experiment where I commented out everything in my
main method and only left a call to the trouble-maker class. Everything
works fine then. In the same file I also have a helper function that
uses shared_ptr library. When I uncomment that function, but don't
envoke it, I still get the same problem.

Is there anything else I should be doing to get this to work correctly?

Inga


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