Steinar H. Gunderson wrote:
On Thu, May 10, 2007 at 08:16:07PM +0200, rtheys wrote:
According to the valgrind output, the bug is in innetgr which is in libc6.

At least one of them, yes.

The file in attach is the valgrind+omega output of a run with a patched libc6 and the client.c file patches in two places. After running for half an hour, there's no increase in memory usage and the output lists one (small) leak.

I'm currently running the original etch version recompiled with -O0 and dh_strip removed under valgrind to see if the stock etch version is OK with the new libc6.

I've checked redhat bugzilla and they fixed a innetgr memory leak:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=169051

That looks very much like the same bug, yes.

I've checked the code of the debian libc6 package and it seems the redhat patch is not applied to the debian package. Recompiling the debian libc6 package with the redhat patch doesn't seem to be so simple :-(.

Any idea on how to apply this patch The Debian Way?
I would like to apply this patch to see if it fixes my problem.

I'm no glibc maintainer, but it looks like you can put the diff in
debian/patches/any/ and then add the filename to debian/patches/series.

I've recompiled libc6 with the patch mentioned in the redhat bug report and the large leak seems fixed. I guess this bug report has to be cloned/reassigned to libc6 (etch version)? Or do we wait for the valgrind output of the stock etch version? Maybe we can get both packages fixed (and hopefully approved for r1 :-))

Rik

--
Rik Theys
Systeemgroep
KU Leuven - Dept. ESAT
Kasteelpark Arenberg 10
B-3001 LEUVEN - HEVERLEE
Tel.: +32(0)16/32.11.07
----------------------------------------------------------------
<<Any errors in spelling, tact or fact are transmission errors>>


Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm

==20511== Omega-RC1, An instant memory leak detector.
==20511== Copyright (C) 2006, and GNU GPL'd, by Bryan Meredith.
==20511== Using LibVEX rev 1732, a library for dynamic binary translation.
==20511== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==20511== Using valgrind-3.2.3, a dynamic binary instrumentation framework.
==20511== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
==20511== For more details, rerun with: -v
==20511== 
==20511== My PID = 20511, parent PID = 13178.  Prog and args are:
==20511==    rpc.mountd
==20511==    -F
==20511==    -d
==20511==    all
==20511== 
==20511== 
==20511== 
==20511== 
==20511== Omega Leak Summary
==20511== ==================
==20511== Loss Record 1: Leaked 16 (0x10) bytes in 1 block
==20511==    at 0x410E8B2: tsearch (in /lib/tls/i686/cmov/libc-2.3.6.so)
==20511==    by 0x41214CE: __nss_lookup_function (in 
/lib/tls/i686/cmov/libc-2.3.6.so)
==20511==    by 0x41217FF: (within /lib/tls/i686/cmov/libc-2.3.6.so)
==20511==    by 0x412C7C4: innetgr (in /lib/tls/i686/cmov/libc-2.3.6.so)
==20511==    by 0x804E731: client_check (client.c:375)
==20511==    by 0x804E2DC: client_compose (client.c:260)
==20511==    by 0x804BCBE: auth_authenticate_internal (auth.c:85)
==20511==    by 0x804BFC9: auth_authenticate (auth.c:163)
==20511==    by 0x804AC84: get_rootfh (mountd.c:384)
==20511==    by 0x804ABC5: mount_mnt_3_svc (mountd.c:349)
==20511==    by 0x8054732: rpc_dispatch (rpcdispatch.c:55)
==20511==    by 0x804BBC2: mount_dispatch (mount_dispatch.c:83)
==20511==  Block allocated
==20511==    at 0x401CDA0: malloc (vg_replace_malloc.c:149)
==20511==    by 0x410E78B: tsearch (in /lib/tls/i686/cmov/libc-2.3.6.so)
==20511==    by 0x41214CE: __nss_lookup_function (in 
/lib/tls/i686/cmov/libc-2.3.6.so)
==20511==    by 0x41217FF: (within /lib/tls/i686/cmov/libc-2.3.6.so)
==20511==    by 0x4123665: (within /lib/tls/i686/cmov/libc-2.3.6.so)
==20511==    by 0x412C856: innetgr (in /lib/tls/i686/cmov/libc-2.3.6.so)
==20511==    by 0x804E731: client_check (client.c:375)
==20511==    by 0x804E2DC: client_compose (client.c:260)
==20511==    by 0x804BCBE: auth_authenticate_internal (auth.c:85)
==20511==    by 0x804BFC9: auth_authenticate (auth.c:163)
==20511==    by 0x804AC84: get_rootfh (mountd.c:384)
==20511==    by 0x804ABC5: mount_mnt_3_svc (mountd.c:349)
==20511== 

Reply via email to