Bug 123291

Summary: Memprof reports leak in getaliasbyname_r in glibc
Product: [Fedora] Fedora Reporter: Need Real Name <gph-gw>
Component: memprofAssignee: Søren Sandmann Pedersen <sandmann>
Status: CLOSED WONTFIX QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: kem
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-09-08 02:16:57 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
memprof dump when running /usr/bin/X11/xclock none

Description Need Real Name 2004-05-16 02:17:12 UTC
Description of problem:
On many applications I run in Memprof(the one bundled in Fedora), it
reports memory leaks of various sizes originating in the
getaliasbyname_r function in glibc (glibc 2.3.3 for me)


Version-Release number of selected component (if applicable):
glibc 2.3.3, FC2test3, Memprof 0.5.1

How reproducible:
Always, with a variety of applications


Steps to Reproduce:
1. Open  Memprof
2. Click 'Run' and enter '/usr/bin/X11/xclock'
3. Press the 'Leaks' button at the top
4. Switch to the 'leaks' tab
  
Actual results:
reports many bytes of memory leaked from the specified function


Expected results:
No memory leaks inside glibc


Additional info:
xclock was just an example. xcalc also reports leaks, and even running
memprof on /bin/usleep reports a leak of 450 bytes on my system
I will attach the memprof dump as well. Possibly memprof is reporting
false positive, or is being run wrong?

Comment 1 Need Real Name 2004-05-16 02:20:52 UTC
Created attachment 100251 [details]
memprof dump when running /usr/bin/X11/xclock

gzipped to reduce size from 500k->12k

Comment 2 Jakub Jelinek 2004-05-25 09:13:13 UTC
That must be memprof bug.  Try
for i in $(ldd `which xclock` | awk '$3 ~ /^\// {print $3}') `which xclock`; do
  nm -D $i | grep getaliasbyname && echo $i
done
Only libc.so.6 will be shown, and that library calls getaliasbyname_r
only from getaliasbyname function and getaliasbyname is never called
by libc.so itself.  But the above command showed that neither xclock
itself nor any of its dependencies but libc.so ever use this symbol.
You can also run LD_DEBUG=all xclock 2>&1 | grep getaliasbyname
to see that this function is not even looked up using dlsym.
Similarly usleep, 

Comment 3 Søren Sandmann Pedersen 2006-09-08 02:16:57 UTC
memprof was dropped from fc5