Bug 712178 - getaddrinfo() in glibc-2.14-2 leaks memory
Summary: getaddrinfo() in glibc-2.14-2 leaks memory
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: glibc
Version: 15
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Andreas Schwab
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-06-09 17:35 UTC by Sam Varshavchik
Modified: 2016-11-24 16:01 UTC (History)
4 users (show)

Fixed In Version: glibc-2.14-3
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-06-24 17:54:35 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Valgrind log file (2.55 KB, text/plain)
2011-06-09 17:35 UTC, Sam Varshavchik
no flags Details

Description Sam Varshavchik 2011-06-09 17:35:04 UTC
Description of problem:

valgrind reports a memory leak in getaddrinfo().

Version-Release number of selected component (if applicable):

2.14-2

How reproducible:

always

Steps to Reproduce:

1. Compile and link the following:
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <stdio.h>

int main()
{
	struct addrinfo *res;

	if (getaddrinfo("localhost", "http", NULL, &res) == 0)
	{
		freeaddrinfo(res);
	}

	return 0;
}

2. Run with valgrind --tool=memcheck --leak-check=yes
  
Actual results:

See attached

Expected results:

No memory leaks.

Comment 1 Sam Varshavchik 2011-06-09 17:35:39 UTC
Created attachment 503959 [details]
Valgrind log file

Comment 2 Trever Adams 2011-06-20 13:46:07 UTC
I am seeing this with many many programs which are properly written and do freeaddrinfo as well. One example is a program that has less than 45M in memory size when first started (actually about an hour afterward). With the new glibc in just a few days this will grow to over 100M. This wasn't the case before.

Comment 3 Fedora Update System 2011-06-22 15:44:57 UTC
glibc-2.14-3 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/glibc-2.14-3

Comment 4 Trever Adams 2011-06-22 17:55:40 UTC
I have two networks (virtual) in libvirt. One doesn't want to start automatically after this update. I am also seeing some other strange things even after reboot that I cannot describe.

Other than ssh doesn't work at least for a while.

Comment 5 Fedora Update System 2011-06-24 03:38:32 UTC
Package glibc-2.14-3:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing glibc-2.14-3'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/glibc-2.14-3
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2011-06-24 17:54:09 UTC
glibc-2.14-3 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.