On 02/21/15 01:08, Joe VanAndel wrote: > I am using valgrind 3.10.1 (I get the same results building valgrind > from SVN). > > My program uses boost 1_57_0, and Wt 3-3-4-rc1. I am compiling with gcc > 4.8.2 on CentOS 7.0.1406 > > When I run my program under valgrind —tool=drd, > > valgrind aborts with the attached message. > I have several questions: > > 1) If this is a real error in my code, Wt, or Boost, how would I find > and fix the error? > > 2) Does anyone routinely use the boost DRD tool with Wt and Boost, or > with Boost? > > > drd: drd_thread.c:630 (vgDrd_thread_entering_pthread_create): Assertion > 'DRD_(g_threadinfo)[tid].pt_threadid != INVALID_POSIX_THREADID' failed. > > host stacktrace: > ==21016== at 0x38046C68: show_sched_status_wrk (m_libcassert.c:319) > ==21016== by 0x38046D84: report_and_quit (m_libcassert.c:390) > ==21016== by 0x38046F11: vgPlain_assert_fail (m_libcassert.c:456) > ==21016== by 0x3803639B: vgDrd_thread_entering_pthread_create > (drd_thread.c:630) > ==21016== by 0x3802AC6B: handle_client_request (drd_clientreq.c:295) > ==21016== by 0x3805E1E0: wrap_tool_handle_client_request > (m_tooliface.c:280) > ==21016== by 0x38097C9F: do_client_request (scheduler.c:2074) > ==21016== by 0x38097C9F: vgPlain_scheduler (scheduler.c:1407) > ==21016== by 0x380A687C: thread_wrapper (syswrap-linux.c:103) > ==21016== by 0x380A687C: run_a_thread_NORETURN (syswrap-linux.c:156) > > sched status: > running_tid=1 > > Thread 1: status = VgTs_Runnable > ==21016== at 0x4C2F5B9: vgDrd_entering_pthread_create > (drd_pthread_intercepts.c:331) > ==21016== by 0x4C2F5B9: pthread_create_intercept > (drd_pthread_intercepts.c:484) > ==21016== by 0x4C2F5B9: pthread_create@* (drd_pthread_intercepts.c:501) > ==21016== by 0x5C14C38: boost::thread::start_thread_noexcept() (in > /usr/local/boost_1_57_0/lib/libboost_thread-mt.so.1.57.0) > ==21016== by 0x6A6975: boost::thread::start_thread() (thread.hpp:179)
This might be a bug in the Valgrind core. When a thread is created the Valgrind core invokes drd_pre_thread_create(). That function calls DRD_(thread_pre_create)() which sets up the valgrind-to-DRD thread ID translation. The assertion failure above means that such a translation had not been set up before the code in the newly created thread started to run. If you can provide a small test program with which I can reproduce the above behavior I will have a look into this. The boost regression test that is present in the Valgrind source tree seems to work fine on CentOS 7.0.1046: $ ./vg-in-place --tool=drd drd/tests/boost_thread ==24662== drd, a thread error detector ==24662== Copyright (C) 2006-2013, and GNU GPL'd, by Bart Van Assche. ==24662== Using Valgrind-3.11.0.SVN and LibVEX; rerun with -h for copyright info ==24662== Command: drd/tests/boost_thread ==24662== Thread 1. Thread 2. Finished. ==24662== ==24662== For counts of detected and suppressed errors, rerun with: -v ==24662== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 33 from 33) Bart. ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk _______________________________________________ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users