|
From: Marcel R. <mr...@ma...> - 2003-12-16 16:58:12
|
Hi, first of all thanks for valgrind - it safed me already in some situations! Now i have this problem: vg_scheduler.c:2107 (do_pthread_mutex_lock): Assertion `mutex->__m_owner == ((ThreadId)(0))' failed. o I'm using SUSE 9.0 Linux with kernel 2.4.21-99-default #1 Wed Sep 24 13:30:51 UTC 2003 i686 i686 i386 GNU/Linux o valgrind-2.1.0 o g++ --version g++ (GCC) 3.3.1 (SuSE Linux) Copyright (C) 2003 Free Software Foundation, Inc. o GNU C Library stable release version 2.3.2 (20030827) o I want to test multithreaded C++ code Here is the complete output: ---------------------------------------------------- valgrind -v PublishDemo* ==18950== Memcheck, a memory error detector for x86-linux. ==18950== Copyright (C) 2002-2003, and GNU GPL'd, by Julian Seward. ==18950== Using valgrind-2.1.0, a program supervision framework for x86-linux. ==18950== Copyright (C) 2000-2003, and GNU GPL'd, by Julian Seward. ==18950== Command line ==18950== PublishDemo ==18950== Startup, with flags: ==18950== --suppressions=/opt/valgrind-2.1.0-bin/lib/valgrind/default.supp ==18950== -v ==18950== Reading syms from /home/xmlblast/xmlBlaster/demo/c++/bin/PublishDemo ==18950== Reading syms from /lib/ld-2.3.2.so ==18950== object doesn't have any debug info ==18950== Reading syms from /opt/valgrind-2.1.0-bin/lib/valgrind/vgskin_memcheck.so ==18950== Reading syms from /opt/valgrind-2.1.0-bin/lib/valgrind/valgrind.so ==18950== Reading syms from /opt/omniORB-4.0.3-bin-g++/lib/libomniORB4.so.0.3 ==18950== Reading syms from /opt/omniORB-4.0.3-bin-g++/lib/libomnithread.so.3.0 ==18950== Reading syms from /opt/xerces-c-src2_2_0-bin/lib/libxerces-c.so.22.0 ==18950== Reading syms from /home/xmlblast/xmlBlaster/lib/libxmlBlasterClient.so ==18950== Reading syms from /lib/libdl.so.2 ==18950== object doesn't have any debug info ==18950== Reading syms from /opt/valgrind-2.1.0-bin/lib/valgrind/libpthread.so ==18950== Reading syms from /lib/i686/libc.so.6 ==18950== object doesn't have any debug info ==18950== Reading syms from /usr/lib/libstdc++.so.5.0.5 ==18950== object doesn't have any debug info ==18950== Reading syms from /lib/i686/libm.so.6 ==18950== object doesn't have any debug info ==18950== Reading syms from /lib/libgcc_s.so.1 ==18950== object doesn't have any debug info ==18950== Reading suppressions file: /opt/valgrind-2.1.0-bin/lib/valgrind/default.supp ==18950== Estimated CPU clock rate is 1197 MHz ==18950== REPLACING libc(__GI___errno_location) with libpthread(__errno_location) ==18950== REPLACING libc(__GI___h_errno_location) with libpthread(__h_errno_location) ==18950== REPLACING libc(__GI___res_state) with libpthread(__res_state) ==18950== valgrind: vg_scheduler.c:2107 (do_pthread_mutex_lock): Assertion `mutex->__m_owner == ((ThreadId)(0))' failed. ==18950== at 0x4017402F: vgPlain_skin_assert_fail (vg_mylibc.c:1102) ==18950== by 0x4017402E: assert_fail (vg_mylibc.c:1098) ==18950== by 0x40174089: vgPlain_core_assert_fail (vg_mylibc.c:1109) ==18950== by 0x401586E5: do_pthread_mutex_lock (vg_scheduler.c:2107) sched status: Thread 1: status = Runnable, associated_mx = 0x0, associated_cv = 0x0 ==18950== at 0x40A64C2D: __pthread_mutex_lock (vg_libpthread.c:944) ==18950== by 0x40712007: omni_mutex::lock() (omnithread.h:210) ==18950== by 0x40711F17: org::xmlBlaster::util::thread::LockImpl::LockImpl(omni_mutex&) (ThreadImplOmniOrb.cc:110) ==18950== by 0x4070D24D: org::xmlBlaster::util::thread::Lock::Lock(org::xmlBlaster::util::thread::MutexClass const&, bool) (ThreadImplOmniOrb.cc:254) Note: see also the FAQ.txt in the source distribution. It contains workarounds to several common problems. If that doesn't help, please report this bug to: valgrind.kde.org In the bug report, send all the above text, the valgrind version, and what Linux distro you are using. Thanks. ---------------------------------------------------- Thanks for some help, best regads, Marcel -- http://www.xmlBlaster.org |
|
From: Jeremy F. <je...@go...> - 2003-12-16 18:01:12
|
On Tue, 2003-12-16 at 08:57, Marcel Ruff wrote: > Hi, > > first of all thanks for valgrind - it safed me already in some > situations! > > Now i have this problem: > > vg_scheduler.c:2107 (do_pthread_mutex_lock): > Assertion `mutex->__m_owner == ((ThreadId)(0))' failed. Valgrind stores some state in the mutex structure, and then asserts that it is intact. If your program overwrites or otherwise damages the mutex, it can cause Valgrind to have an assertion failure. This is a bug in your program, but it is a bug in Valgrind that this is the way you find out about it. J |