|
From: Stefan N. <ste...@in...> - 2003-07-31 20:21:16
|
Hi,
please see problem session and sample source code below.
OS is RedHat Linux 7.3. Valgrind is 20030725.
Any feedback appreciated and a big thanks for this wonderful
tool which saves me a lot of time debugging stuff!
Regards,
Stefan Norlin
[stenor@lina wait]$ gcc -g -o wait wait.c
[stenor@lina wait]$ valgrind --trace-children=3Dyes ./wait
=3D=3D21355=3D=3D Memcheck, a.k.a. Valgrind, a memory error detector for =
x86-linux.
=3D=3D21355=3D=3D Copyright (C) 2002-2003, and GNU GPL'd, by Julian =
Seward.
=3D=3D21355=3D=3D Using valgrind-20030725, a program supervision =
framework for x86-linux.
=3D=3D21355=3D=3D Copyright (C) 2000-2003, and GNU GPL'd, by Julian =
Seward.
=3D=3D21355=3D=3D Estimated CPU clock rate is 798 MHz
=3D=3D21355=3D=3D For more details, rerun with: -v
=3D=3D21355=3D=3D=20
=3D=3D21364=3D=3D Memcheck, a.k.a. Valgrind, a memory error detector for =
x86-linux.
=3D=3D21364=3D=3D Copyright (C) 2002-2003, and GNU GPL'd, by Julian =
Seward.
=3D=3D21364=3D=3D Using valgrind-20030725, a program supervision =
framework for x86-linux.
=3D=3D21364=3D=3D Copyright (C) 2000-2003, and GNU GPL'd, by Julian =
Seward.
=3D=3D21364=3D=3D Estimated CPU clock rate is 798 MHz
=3D=3D21364=3D=3D For more details, rerun with: -v
=3D=3D21364=3D=3D=20
sleep: relocation error: /lib/librt.so.1: symbol =
__pthread_clock_settime, version GLIBC_PRIVATE not defined in file =
libpthread.so.0 with link time reference
=3D=3D21364=3D=3D=20
=3D=3D21364=3D=3D ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 =
from 0)
=3D=3D21364=3D=3D malloc/free: in use at exit: 0 bytes in 0 blocks.
=3D=3D21364=3D=3D malloc/free: 0 allocs, 0 frees, 0 bytes allocated.
=3D=3D21364=3D=3D For a detailed leak analysis, rerun with: =
--leak-check=3Dyes
=3D=3D21364=3D=3D For counts of detected errors, rerun with: -v
=3D=3D21355=3D=3D=20
=3D=3D21355=3D=3D ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 =
from 0)
=3D=3D21355=3D=3D malloc/free: in use at exit: 0 bytes in 0 blocks.
=3D=3D21355=3D=3D malloc/free: 1 allocs, 1 frees, 24 bytes allocated.
=3D=3D21355=3D=3D For a detailed leak analysis, rerun with: =
--leak-check=3Dyes
=3D=3D21355=3D=3D For counts of detected errors, rerun with: -v
[stenor@lina test]$ cat wait.c
int
main(int argc, char **argv)
{
int status;
char buf[64];
sprintf(buf, "./wait.sh");
if(fork()=3D=3D0) {
execl(buf, buf, 0);
}
wait(&status);
return 0;
}
[stenor@lina test]$ cat wait.sh
#!/bin/sh
sleep 3
|
|
From: Olly B. <ol...@su...> - 2003-07-31 20:42:55
|
On Thu, Jul 31, 2003 at 10:21:12PM +0200, Stefan Norlin wrote: > sleep: relocation error: /lib/librt.so.1: symbol > __pthread_clock_settime, version GLIBC_PRIVATE not defined in file > libpthread.so.0 with link time reference This would appear to be FAQ #13. The answer's quite long, so rather than repeat it I'll just refer you to: http://developer.kde.org/~sewardj/docs-1.9.5/FAQ.txt Cheers, Olly |
|
From: Stefan N. <ste...@in...> - 2003-07-31 20:48:35
|
Thanks, just found it. Gotta get glasses... :) Worked with the same removal that another person indicated was successful. /S ----- Original Message ----- From: "Olly Betts" <ol...@su...> To: "Stefan Norlin" <ste...@in...> Cc: <val...@li...> Sent: Thursday, July 31, 2003 10:41 PM Subject: Re: [Valgrind-users] Problem with sleep in a forked process (relocation error) > On Thu, Jul 31, 2003 at 10:21:12PM +0200, Stefan Norlin wrote: > > sleep: relocation error: /lib/librt.so.1: symbol > > __pthread_clock_settime, version GLIBC_PRIVATE not defined in file > > libpthread.so.0 with link time reference > > This would appear to be FAQ #13. The answer's quite long, so rather > than repeat it I'll just refer you to: > > http://developer.kde.org/~sewardj/docs-1.9.5/FAQ.txt > > Cheers, > Olly > |