Boost logo

Threads-Devel :

Subject: [Threads-devel] locking of boost::timed_mutex results in segmentation fault on linux x64
From: Andriy Tylychko (andriy.tylychko_at_[hidden])
Date: 2010-04-19 10:02:26


Linux version 2.6.24-27-generic (buildd_at_crested) (gcc version 4.2.4 (Ubuntu
4.2.4-1ubuntu3)) x64

intensive usage of boost::timed_mutex::scoped_lock from many threads with
the same timed_mutex results in segmentation fault. Sample code is attached.
It catches SIGSEGV signal in about 5-10 secs of normal operation and prints
stack traces.

Stack traces show:

.

#5 <signal handler called>

#6 0x00007f85f405e244 in __lll_timedlock_wait () from /lib/libpthread.so.0

#7 0x00007f85f405a9ac in _L_timedlock_161 () from /lib/libpthread.so.0

#8 0x00007f85f405a230 in pthread_mutex_timedlock () from
/lib/libpthread.so.0

#9 0x0000000000403fdf in thread_func ()

.

 

What's the problem and how to resolve it?

 

Thank you,

Andy

 








Threads-Devel list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk