On Mon, Jun 7, 2010 at 1:02 PM, Bart Van Assche <bvanass...@acm.org> wrote: > On Mon, Jun 7, 2010 at 9:47 PM, Jorge Moraleda <jorge.moral...@gmail.com> > wrote: >> >> On Sat, Jun 5, 2010 at 5:47 AM, Bart Van Assche <bvanass...@acm.org> wrote: >> > On Sat, Jun 5, 2010 at 2:52 AM, Jorge Moraleda <jorge.moral...@gmail.com> >> > wrote: >> >> >> >> I got a drd error in one of my programs, and searching on the web I >> >> found the following boost bug report, including a test sample >> >> reporting the same error found with drd. >> >> https://svn.boost.org/trac/boost/ticket/3526 with a similar error. >> >> >> >> There they seem to conclude that this is not a real problem, but I >> >> wanted to get your opinion. I can reproduce the error. I am running >> >> boost 1.43 and valgrind 11150M (with Bart's linker fix, thank you!!!). >> > >> > You are welcome to test Valgrind r11146 or later (unmodified) -- >> > Julian has fixed the "mmap(...) failed in UME with error 22 (Invalid >> > argument)" error message. >> > >> >> This is the test code they provide in the link above. >> >> [ ... ] >> >> This is my valgrind output when compiled with "g++ -l boost_thread >> >> main.cpp" >> >> valgrind --tool=drd ./a.out >> >> ==7014== drd, a thread error detector >> >> ==7014== Copyright (C) 2006-2010, and GNU GPL'd, by Bart Van Assche. >> >> ==7014== Using Valgrind-3.6.0.SVN and LibVEX; rerun with -h for copyright >> >> info >> >> ==7014== Command: ./a.out >> >> ==7014== >> >> ==7014== Thread 3: >> >> ==7014== Conflicting store by thread 3 at 0x0504c750 size 8 >> >> ==7014== at 0x4E41A23: T.1292 (in >> >> /usr/local/lib/libboost_thread.so.1.43.0) >> >> [ ... ] >> > >> > Looks like a false positive on current_thread_tls_key to me, so I have >> > added a suppression pattern in r11152. >> > >> > Bart. >> > >> >> Thank you Bart. I still get an error using r11158: >> >> ==19714== drd, a thread error detector >> ==19714== Copyright (C) 2006-2010, and GNU GPL'd, by Bart Van Assche. >> ==19714== Using Valgrind-3.6.0.SVN and LibVEX; rerun with -h for copyright >> info >> ==19714== Command: ./a.out >> ==19714== >> ==19714== Thread 3: >> ==19714== Conflicting load by thread 3 at 0x0504c750 size 8 >> ==19714== at 0x4E41994: T.1292 (in >> /usr/local/lib/libboost_thread.so.1.43.0) >> [ ... ] > > DRD still reports this on your system because no debug information was > loaded for libboost_thread. Installing a package called > boost-debuginfo or similar should fix this. >
Bart, Thank you again! I recompiled boost from source using: bjam variant=debug define=BOOST_LOG_USE_CHAR install and all the above warnings are gone. When I run the program, half of the time I get a clean output, the other 10% of the time I get the following: ==14837== drd, a thread error detector ==14837== Copyright (C) 2006-2010, and GNU GPL'd, by Bart Van Assche. ==14837== Using Valgrind-3.6.0.SVN and LibVEX; rerun with -h for copyright info ==14837== Command: ./a.out ==14837== ==14837== Thread 3: ==14837== Conflicting load by thread 3 at 0x05d8a288 size 8 ==14837== at 0x5B78ECE: __nptl_deallocate_tsd (pthread_create.c:153) ==14837== Allocation context: BSS section of /lib/libpthread-2.11.1.so ==14837== Other segment start (thread 2) ==14837== at 0x58E1001: clone (clone.S:84) ==14837== Other segment end (thread 2) ==14837== at 0x4C2F283: pthread_mutex_lock (drd_pthread_intercepts.c:578) ==14837== by 0x4E53985: boost::pthread::pthread_mutex_scoped_lock::pthread_mutex_scoped_lock(pthread_mutex_t*) (pthread_mutex_scoped_lock.hpp:25) ==14837== by 0x4E556A4: void boost::call_once<void (*)()>(boost::once_flag&, void (*)()) (once.hpp:55) ==14837== by 0x4E50938: boost::detail::set_current_thread_data(boost::detail::thread_data_base*) (thread.cpp:105) ==14837== by 0x4E509C3: thread_proxy (thread.cpp:118) ==14837== by 0x4C2EA60: vgDrd_thread_wrapper (drd_pthread_intercepts.c:272) ==14837== by 0x5B798B9: start_thread (pthread_create.c:300) ==14837== by 0x58E103C: clone (clone.S:112) ==14837== ==14837== ==14837== For counts of detected and suppressed errors, rerun with: -v ==14837== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 130 from 130) ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users