|
From: Jhair T. T. <jha...@gm...> - 2005-03-03 12:58:57
|
I am testing valgrind-2.2.0 with a multithreaded program, which I start like this: $ valgrind -v --log-file=valgrind_program.log --tool=memcheck --leak-check=yes ./program In the log valgrind_program.log.pid27777 I do get: ,---- | ==27777== by 0x804F456: startup() (R.cpp:242) | ==27777== | ==27777== Valgrind detected that your program requires | ==27777== the following unimplemented functionality: | ==27777== clone(): not supported by Valgrind. | We do now support programs linked against | libpthread.so, though. Re-run with -v and ensure that | you are picking up Valgrind's implementation of libpthread.so. | ==27777== This may be because the functionality is hard to implement, | ==27777== or because no reasonable program would behave this way, | ==27777== or because nobody has yet needed it. In any case, let us know at | ==27777== valgrind.kde.org and/or try to work around the problem, if you can. | ==27777== | ==27777== Valgrind has to exit now. Sorry. Bye! | ==27777== | | sched status: | | Thread 1: status = Runnable, associated_mx = 0x0, associated_cv = 0x0 | ==27777== at 0x8368ABA: clone (in program_path) | ==27777== by 0x82F411F: __pthread_create_2_1 (pthread.c:648) | ==27777== by 0x82EB2AA: Thread::start() (in program_path) | ==27777== by 0x804FF39: R::go() (R.cpp:382) `---- Then the logging finishes. I do have some questions: 1. Should I expect clone() to work if I use Valgrind from the CVS? 2. The program I am testing is a statically linked executable. Should I compile it using the valgrind-provided libpthread.so library? 3. The message above tells me to use -v to ensure I am picking up the Valgrind's implementation of the libpthread.so library. In the valgrind-logfile I do get the entries below. Does this mean the libpthread.so from Glibc is being used instead, doesn't? ,---- | ==18760== Reading suppressions file: /home/jtocancipa//lib/valgrind/default.supp | ==18760== REDIRECT soname:libc.so.6(__GI___errno_location) to soname:libpthread.so.0(__errno_location) | ==18760== REDIRECT soname:libc.so.6(__errno_location) to soname:libpthread.so.0(__errno_location) | ==18760== REDIRECT soname:libc.so.6(__GI___h_errno_location) to soname:libpthread.so.0(__h_errno_location) | ==18760== REDIRECT soname:libc.so.6(__h_errno_location) to soname:libpthread.so.0(__h_errno_location) | ==18760== REDIRECT soname:libc.so.6(__GI___res_state) to soname:libpthread.so.0(__res_state) | ==18760== REDIRECT soname:libc.so.6(__res_state) to soname:libpthread.so.0(__res_state) `---- I am testing this with a _very_ old kernel 2.4.19 :(. Pointers to where to find more information to answer the questions are also welcome! Regards, -- --Jhair PGP key available from public servers - ID: 0xBAA600D0 |
|
From: Jhair T. T. <jha...@gm...> - 2005-03-03 20:22:33
|
> Then the logging finishes. I do have some questions: Well, the FAQ answered all my questions :) Thanks! -- --Jhair PGP key available from public servers - ID: 0xBAA600D0 |
|
From: Tom H. <to...@co...> - 2005-03-04 14:37:12
|
In message <nx9...@ma...>
Jhair Tocancipa Triana <jha...@gm...> wrote:
> Then the logging finishes. I do have some questions:
>
> 1. Should I expect clone() to work if I use Valgrind from the CVS?
Yes. We now use the native pthread library and implement clone.
> 2. The program I am testing is a statically linked executable. Should
> I compile it using the valgrind-provided libpthread.so library?
That would also work. The version you are using does not support
static linking about libpthread - you have to dynamically link against
it so we can override it.
> I am testing this with a _very_ old kernel 2.4.19 :(.
That's not a problem.
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|