|
From: sandhya s. <san...@ya...> - 2003-11-15 11:04:42
|
I am facing problem in detecting memory leaks using valgrind for a multithreaded application.When i run the multithreaded applcn with valgrind valgrind doensnt detect any errors and neither does it shows the leak summary. The last line shown by valgrind is "valgrind's libpthread.so: KLUDGED call to: phread_cond_destroy" What may be the problem -Sandhya __________________________________ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard http://antispam.yahoo.com/whatsnewfree |
|
From: Nicholas N. <nj...@ca...> - 2003-11-15 12:59:13
|
On Sat, 15 Nov 2003, sandhya satyanarayan wrote: > I am facing problem in detecting memory leaks using > valgrind for a multithreaded application.When i run > the multithreaded applcn with valgrind valgrind > doensnt detect any errors and neither does it shows > the leak > summary. The last line shown by valgrind is > "valgrind's libpthread.so: KLUDGED call to: > phread_cond_destroy" > What may be the problem What may be the problem, indeed? It's difficult to say, from the scant information you have presented. Perhaps if you could tell us some useful information, such as the version you are running, what command-line you are using, and what the output of "valgrind -v" looks like, we might be able to help you. N |
|
From: sandhya s. <san...@ya...> - 2003-11-17 04:07:06
|
I am using valgrind-2.0.0 , i have worked with valgrind-1.0.3.But In both the versions i face the same problem . I am using the following command line arguments ./valgrind -v --leak-check=yes --show-reachable=yes --leak-resolution=high --workaround-gcc296-bugs=yes ./processName 2>ValgrindLog & The Output of valgrind -v looks like this ==26675== Memcheck, a.k.a. Valgrind, a memory error detector for x86-linux. ==26675== Copyright (C) 2002-2003, and GNU GPL'd, by Julian Seward. ==26675== Using valgrind-2.0.0, a program supervision framework for x86-linux. ==26675== Copyright (C) 2000-2003, and GNU GPL'd, by Julian Seward. ==26675== Command line: ==26675== ./processName ==26675== Startup, with flags: ==26675== --suppressions=/home/mms/valgrind-2.0.0/lib/valgrind/default.supp ==26675== -v ==26675== --leak-check=yes ==26675== --show-reachable=yes ==26675== --leak-resolution=high ==26675== --workaround-gcc296-bugs=yes ==26675== --gdb-attach=yes ==26675== Reading syms from /home/mms/valgrind-2.0.0/bin/processName ==26675== Reading syms from /lib/ld-2.2.4.so ==26675== Reading syms from /home/mms/valgrind-2.0.0/lib/valgrind/vgskin_memcheck.so ==26675== Reading syms from /home/mms/valgrind-2.0.0/lib/valgrind/valgrind.so ==26675== Reading syms from /lib/libssl.so.0.9.6b ==26675== object doesn't have any debug info ==26675== Reading syms from /home/mms/valgrind-2.0.0/lib/valgrind/libpthread.so ==26675== Reading syms from /lib/libresolv-2.2.4.so ==26675== Reading syms from /lib/libnsl-2.2.4.so ==26675== Reading syms from /usr/lib/libxml2.so.2.4.2 ==26675== object doesn't have any debug info ==26675== Reading syms from /usr/lib/libz.so.1.1.3 ==26675== object doesn't have any debug info ==26675== Reading syms from /lib/i686/libm-2.2.4.so ==26675== Reading syms from /lib/libcrypto.so.0.9.6b ==26675== object doesn't have any debug info ==26675== Reading syms from /usr/lib/libstdc++-3-libc6.2-2-2.10.0.so ==26675== Reading syms from /lib/i686/libc-2.2.4.so ==26675== Reading syms from /lib/libdl-2.2.4.so ==26675== Reading suppressions file: /home/mms/valgrind-2.0.0/lib/valgrind/default.supp ==26675== Estimated CPU clock rate is 869 MHz ==26675== ==26675== Syscall param open(pathname) contains uninitialised or unaddressable byte(s) ==26675== at 0x4056B474: __libc_open (in /lib/i686/libc-2.2.4.so) ==26675== by 0x4027C989: __open (vg_libpthread.c:2089) ==26675== by 0x40505FD7: _IO_file_fopen@@GLIBC_2.1 (fileops.c:220) ==26675== by 0x404FC5C2: _IO_fopen@@GLIBC_2.1 (iofopen.c:67) ==26675== Address 0x0 is not stack'd, malloc'd or free'd ==26675== ==26675== ---- Attach to GDB ? --- [Return/N/n/Y/y/C/c] ---- ==26675== Reading syms from /lib/libnss_files-2.2.4.so ==26675== ==26675== pthread_mutex_destroy: mutex is still in use ==26675== at 0x4027A163: pthread_error (vg_libpthread.c:286) ==26675== by 0x4027B0E3: __pthread_mutex_destroy (vg_libpthread.c:1015) ==26675== by 0x80B93AA: mutex_destroy(Mutex *) (thread.c:60) ==26675== by 0x80B057F: list_destroy(List *, void (*)(void *)) (list.c:96) ==26675== valgrind's libpthread.so: KLUDGED call to: pthread_cond_destroy ==26675== valgrind's libpthread.so: KLUDGED call to: pthread_cond_destroy ==26675== valgrind's libpthread.so: KLUDGED call to: pthread_cond_destroy After this i am not getting any output. Though the process is linking the system library pthread statically. But i have read in the valgrind documentation of 2.0.0 that it will automatically take its pthread library. And even with the above output one can make out that it is executing the valgrind pthread library code and not the system library code. Hope that this information is sufficient for you to throw some light. Thanks -sandhya Nicholas Nethercote <nj...@ca...> wrote: On Sat, 15 Nov 2003, sandhya satyanarayan wrote: > I am facing problem in detecting memory leaks using > valgrind for a multithreaded application.When i run > the multithreaded applcn with valgrind valgrind > doensnt detect any errors and neither does it shows > the leak > summary. The last line shown by valgrind is > "valgrind's libpthread.so: KLUDGED call to: > phread_cond_destroy" > What may be the problem What may be the problem, indeed? It's difficult to say, from the scant information you have presented. Perhaps if you could tell us some useful information, such as the version you are running, what command-line you are using, and what the output of "valgrind -v" looks like, we might be able to help you. N --------------------------------- Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard |
|
From: Dirk M. <dm...@gm...> - 2003-11-17 11:19:41
|
On Monday 17 November 2003 05:06, sandhya satyanarayan wrote: > After this i am not getting any output. Though the process is linking the > system library pthread statically. If the pthread library is indeed linked statically into your programm, then thats the problem. It has to be linked dynamically. |
|
From: Sean O. <ow...@hy...> - 2003-11-15 23:12:49
|
sandhya satyanarayan writes: > I am facing problem in detecting memory leaks using > valgrind for a multithreaded application.When i run > the multithreaded applcn with valgrind valgrind > doensnt detect any errors and neither does it shows > the leak > summary. The last line shown by valgrind is > "valgrind's libpthread.so: KLUDGED call to: > phread_cond_destroy" > What may be the problem > -Sandhya Just a check - make sure that your program isn't statically linking the system pthreads library. This is something that bit me hard when I first tried to use valgrind. I was statically linking pthreads and valgrind was giving me nothing in the way of output. Sean -- Sean R. Owens ow...@cs... 412-268-3194 (office number) 1604c Newell Simon Hall | "The Soldier's Medal is awarded to Mr. Hugh C. Thompson, Jr. for | heroism above and beyond the call of duty on 16 March, 1968 ... at | My Lai, Quang Ngai Province, South Vietnam. ... landed his | helicopter in the line of fire between fleeing Vietnamese civilians | and pursuing American ground troops to prevent their murder. ... | exemplifies the highest standards of personal courage and ethical | conduct ..." - Signed, Togo D. West, Jr., Secretary of the Army. | http://www.acadianhouse.com/hughthompson/story.htm |