|
From: Bjoern K. <Bjo...@un...> - 2004-03-19 17:20:44
|
Hallo!
I am trying to valgrind (memcheck) a multithreaded QT-Application.
The program works well (more or less :-) ) without valgrind, but fails
horribly with valgrind, even with the "none" tool.
It looks like QMutex does not work when running under valgrind.
By "does not work" I mean, it is allways unlock, so a thread is never
stoped by a QMutex. I have confirmed this by placing sleeps() (the
unistd.h -version) in a loop, which should stop and go an other loop
in an other threadby locking and unlockiung a Mutex.
Unfortunately, this happens *not* in simple testcase, only in the
application I am trying to debug with valgrind.
I will try to find an other small testcase tomorrow.
I have no idea what I am doing wrong, so any hint wellcome!
Versions used:
--------------
valgrind version is: 2.1.1
Linux is: SuSE 8.2 with kernel 2.4.20
uname-a says:
Linux resy-kahl 2.4.20-4GB-athlon #1 Wed Aug 6 18:27:52 UTC 2003 i686 unknown unknown GNU/Linux
/lib/libc.s0.6 says:
GNU C Library stable release version 2.3.2, by Roland McGrath et al.
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 3.3 20030226 (prerelease) (SuSE Linux).
Compiled on a Linux 2.4.20 system on 2003-03-27.
Available extensions:
GNU libio by Per Bothner
crypt add-on version 2.1 by Michael Glad and others
linuxthreads-0.10 by Xavier Leroy
NoVersion patch for broken glibc 2.0 binaries
BIND-8.2.3-T5B
libthread_db work sponsored by Alpha Processor Inc
NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
gcc -v says:
Reading specs from /usr/lib/gcc-lib/i486-suse-linux/3.3/specs
Configured with: ../configure --enable-threads=posix --prefix=/usr --with-local-prefix=/usr/local --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib --enable-languages=c,c++,f77,objc,java,ada --disable-checking --enable-libgcj --with-gxx-include-dir=/usr/include/g++ --with-slibdir=/lib --with-system-zlib --enable-shared --enable-__cxa_atexit i486-suse-linux
Thread model: posix
gcc version 3.3 20030226 (prerelease) (SuSE Linux)
Have a nice day
Bjoern Kahl
--
+-----------------------------------------------------------------+
| Dipl.-Phys. Bjoern Kahl +++ Lehrstuhl Angewandte Informatik III |
| (Robotik und Eingebettete Systeme) +++ Universitaet Bayreuth |
| phone: +49-921-55-5164 +++ www: http://ai3.inf.uni-bayreuth.de |
+-----------------------------------------------------------------+
|
|
From: Melchior F. <mf...@kd...> - 2004-03-19 17:40:32
|
* Bjoern Kahl -- Friday 19 March 2004 18:20: > I am trying to valgrind (memcheck) a multithreaded QT-Application. > > The program works well (more or less :-) ) without valgrind, but fails > horribly with valgrind, even with the "none" tool. So *that* is my problem! (See the thread "2.1.1. and later: crash ..."). I got the crash with all Qt applications (libqt-mt is linked with libpthread) and with FlightGear ... when I had the latter compiled with pthread. After your message I recompiled FlightGear without threads, and viola: valgrind works again! Definitely a thread bug in valgrind then. > valgrind version is: 2.1.1 2.2.1, HEAD, and 1.9.4. > Linux is: SuSE 8.2 with kernel 2.4.20 9.1 with 2.6.4 and 2.4.22. > Linux resy-kahl 2.4.20-4GB-athlon #1 Wed Aug 6 18:27:52 UTC 2003 i686 unknown unknown GNU/Linux Linux server 2.6.4 #2 Thu Mar 11 09:56:26 CET 2004 i686 i686 i386 GNU/Linux > /lib/libc.s0.6 says: > GNU C Library stable release version 2.3.2, by Roland McGrath et al. 2.3.2 > gcc version 3.3 20030226 (prerelease) (SuSE Linux) gcc (GCC) 3.3.1 (SuSE Linux) m. |