|
From: Edwin M. <em...@ho...> - 2004-04-11 21:32:46
|
Hi all, I have posted this question before, but i have not received any response = yet. Is this mailing-list the right spot for this question? Or is the = question not clear? Or ..... Start of initial question: Currently i am facing a problem concerning the use of a semaphore. valgrind: vg_libpthread.c:2581 (sem_wait): Assertion `res =3D=3D 0' = failed. =3D=3D5262=3D=3D Please report this bug at: valgrind.kde.org =3D=3D5262=3D=3D TRANSLATE: 0x3C33E610 redirected to 0x3C13CD28 =3D=3D5262=3D=3D =3D=3D5262=3D=3D ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 24 = from 2) =3D=3D5262=3D=3D =3D=3D5262=3D=3D 1 errors in context 1 of 1: =3D=3D5262=3D=3D Thread 29: =3D=3D5262=3D=3D pthread_cond_wait/timedwait: mutex is unlocked or is = locked but not=20 owned by thread =3D=3D5262=3D=3D at 0x3C13AD26: pthread_cond_wait = (vg_libpthread.c:1316) =3D=3D5262=3D=3D by 0x3C13DD2B: sem_wait (vg_libpthread.c:2579) =3D=3D5262=3D=3D by 0x80EBA13: cGosyCountSemImpl::Wait(unsigned)=20 (gosy_countsem.cpp:113) =3D=3D5262=3D=3D by 0x80EB781: cGosyCountSem::Wait(unsigned)=20 (gosy_countsem.cpp:32) --5262-- --5262-- supp: 23 Ugly strchr error in /lib/ld-2.3.2.so --5262-- supp: 1 pthread_mutex_unlock/_IO_funlockfile =3D=3D5262=3D=3D =3D=3D5262=3D=3D IN SUMMARY: 1 errors from 1 contexts (suppressed: 24 = from 2) My configuration: Suse 9.0 kernel 2.4.21-99 glibc 2.3.2 valgrind 2.1.1 In the faq i read: ** A10. Thread support on glibc 2.3.2+ with NPTL is not as ** good as on older LinuxThreads-based systems. We have Is this my problem? What is NPTL? Any workarounds for having valgrind=20 up-and-running? Edwin P.S. getpid() always returns the same id, no matter which thread is = actually=20 executing this call. Known issue? |
|
From: Joshua Moore-O. <jo...@ch...> - 2004-04-12 09:07:18
|
I can't answer anythign else, but I can answer this one. > P.S. getpid() always returns the same id, no matter which thread is actually > executing this call. Known issue? > you shoudl be using pthread_self for threads, NOT getpid. The only reason that getpid returns different values on a linux system is because of the special way that linux handles threads, different from all other O/S's that I know of. And the reason that getpid is returning the saem id is because valgrind is providing and arguably more standards compliant thread implementation by implementing all the threads as one process for debugging purposes. Joshua Moore-Oliva. |
|
From: Nicholas N. <nj...@ca...> - 2004-04-12 09:11:35
|
On Sun, 11 Apr 2004, Edwin Mulder wrote: > Start of initial question: > Currently i am facing a problem concerning the use of a semaphore. > > valgrind: vg_libpthread.c:2581 (sem_wait): Assertion `res == 0' failed. Can you please file a bug report, following the instructions at valgrind.kde.org/bugs.html? Thanks. N |