GNOME Bugzilla – Bug 116162
Memory leak somewhere in gnet_inetaddr_new
Last modified: 2009-08-15 18:40:50 UTC
For information on how to reproduce this bug: http://www.gnetlibrary.org/pipermail/gnet-dev/2003-May/000244.html Also, if using the above example you might want to change getc() to sleep (1) and let it run for a few minutes to see the impact this can have on a program with hundreds/thousands of short-term connections, I had to paste in about 1000-2000 characters to really be sure this was it. Personally, I don't use the same function as in the above example, but by using gnet_tcp_socket_connect_async() the same problem arises (because somewhere along the lines they both run the same peice of code.) I'll be tracking this down over the weekend myself, but I think somebody thorougly familiar with the gnet code should take a long hard look at it.
There is a bug in gnet_inetaddr_unref, where it does not get deleted properly. This has been fixed in HEAD. What version of GNet are you using?
FreeBSD: gnet-2.0.3, from source Linux: 2.0.3 (debian package (rev 1))
What is HEAD, and where do I get it. I need this fixed asap.
HEAD = cvs I looked at this last month when it was first reported (see response on email list). I would guess that either: 1. this is a problem in getaddrinfo() 2. this has been fixed by fixing gnet_inetaddr_unref. Please try the CVS version. I will make try to make a new release this week too. David
*** Bug 118095 has been marked as a duplicate of this bug. ***