Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Sep 1997 18:44:22 +0200 (SAT)
From:      Graham Wheeler <gram@cdsec.com>
To:        freebsd-hackers@freebsd.org, freebsd-bugs@freebsd.org
Cc:        gram@gram.cdsec.com (Graham Wheeler)
Subject:   Memory leak in getservbyXXX?
Message-ID:  <199709111644.SAA18957@cdsec.com>

next in thread | raw e-mail | index | archive | help
Hi all

We have recently ported our Citadel firewall software from FreeBSD 2.1.0 to
FreeBSD 2.2.2. Some of our sites, particularly those whose firewall machines
have only 16Mb of RAM, are now experiencing problems.

We have a application-level gateway program which is occasionally freezing
up, in what seems to be a busy loop (if we run `top' the gateway process is
the most CPU-intensive, chewing up CPU cycles as fast as it can). We have
collected several core dumps from the gateway program when this happens. 
In each case, while the location in our own code varies, the stack trace
always ends in a call to getservbyname() or getservbyport(). These in turn
are calling either malloc() or free(), which in turn seem to be calling
fstat() (at least according to the stack backtrace). top also reports that
the virtual memory is exhausted. We have other sites that have been running
the gateway code on FreeBSD 2.1.0 for several months without a restart or
reboot; the FreeBSD 2.2.2 hosts are freezing up every few hours.

Is anyone aware of a problem with the implementation of the /etc/services
lookup routines in FreeBSD 2.2.2? I will go through the library source code
myself tomorrow, and compre it with FreeBSD 2.1.0, but I am hoping that this
problem is already known, and hopefully that a fix is available.

Thanks in advance
Graham
-- 
Dr Graham Wheeler                          E-mail: gram@cdsec.com
Citadel Data Security                      Phone:  +27(21)23-6065/6/7
Internet/Intranet Network Specialists      Mobile: +27(83)-253-9864
Firewalls/Virtual Private Networks         Fax:    +27(21)24-3656
Data Security Products                     WWW:    http://www.cdsec.com/






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199709111644.SAA18957>