|
From: Michael B A. <io...@gm...> - 2008-07-09 01:27:52
|
Hi, I have a leak in my Apache module but I can't tell where it is because there are no symbols in the backtraces. I've done this before successfully but I don't know why it's not working anymore and I would appreciate some tips. Specifically I'm doing: # valgrind -v --tool=memcheck --num-callers=20 --leak-check=yes --leak-resolution=high /usr/sbin/httpd -X Interesting parts of the output are: <snip> --15717-- Discarding syms at 0x1158E000-0x1199E000 in /usr/lib64/libplexcel.so.2.7.10 due to munmap() <snip> ==15717== 9 bytes in 9 blocks are definitely lost in loss record 8 of 60 ==15717== at 0x4A05809: malloc (vg_replace_malloc.c:149) ==15717== by 0x11627041: ??? ==15717== by 0x11628609: ??? ==15717== by 0x11628E7B: ??? ==15717== by 0x116292AE: ??? ==15717== by 0x115F419D: ??? ==15717== by 0x115E33D7: ??? ==15717== by 0x11387AB4: ??? ==15717== by 0xC863CD1: ??? ==15717== by 0xC853E1B: ??? ==15717== by 0xC863731: ??? ==15717== by 0xC853E1B: ??? ==15717== by 0xC863731: ??? ==15717== by 0xC853E1B: ??? ==15717== by 0xC836F3D: ??? ==15717== by 0xC7FBFB6: ??? ==15717== by 0xC8B4405: ??? ==15717== by 0x297F9: ap_run_handler (in /usr/sbin/httpd) ==15717== by 0x2CC71: ap_invoke_handler (in /usr/sbin/httpd) ==15717== by 0x375E7: ap_process_request (in /usr/sbin/httpd) Complete output is here: http://www.ioplex.com/~miallen/vg.txt I know the leak is coming from krb5_get_init_creds_password in libplexcel.so. That library has the desired symbols and backtraces earlier in the leak report are resolved from this library successfully. # objdump -Tt /usr/lib64/libplexcel.so.2.7 | egrep 'krb5_get_init_creds_pass' 000000000009b029 g F .text 00000000000002bc krb5_get_init_creds_password 000000000009b029 g DF .text 00000000000002bc Base krb5_get_init_creds_password >From looking at the leak report it seems the symbols are discarded before the backtraces are emitted. Is that the problem? I have to hit Ctrl-C to stop Apache so maybe that's triggering valgrind to prematurely discard the symbols? How can I track down this problem? I'm using valgrind-3.2.1-6.el5 on CentOS 5. Mike |