From: Tony Kay (tkay_at_[hidden])
Date: 2007-08-15 13:21:37
I am the primary developer of AlphaMail (alphamail.sourceforge.net),
which uses Boost libraries for thread support. One of my classes (a
thread pool) was using recursive_mutex. I was playing with Intel's
thread checker, and it gave me a number of errors related to the
thread pool. I carefully examined my code, and could not find a
problem. I looked at the errors in more detail, and noted a serious
problem with Boost: some of the pthread calls were being done with
uninitialized mutex values.
I have not traced down the actual problem in the boost libraries, but
I am attaching the ThreadPool.h class, and the thread checker report
(which has the file/line numbers where problems occurred).
I rebuilt the thing with non-recursive mutexes, and everything is fine
(no problems reported by the thread checker).
Boost: 1.34.1 gcc40-mt-d libraries.
Platform is FC4 Linux (uname -a: Linux whizzo.uoregon.edu
2.6.17-1.2142_FC4smp #1 SMP Tue Jul 11 22:57:02 EDT 2006 i686 i686
$ gcc -v
Using built-in specs.
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--enable-checking=release --with-system-zlib --enable-__cxa_atexit
Thread model: posix
gcc version 4.0.2 20051125 (Red Hat 4.0.2-8)
-- We are continually faced with a series of great opportunities brilliantly disguised as insoluble problems. - John W. Gardner