Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Jan 2004 08:01:26 -0600
From:      Jonathan Fosburgh <jonathan@fosburgh.org>
To:        Eric Anholt <eta@lclark.edu>
Cc:        kde@freebsd.org
Subject:   Re: Possible memory leak in XFree86
Message-ID:  <200401210801.31483.jonathan@fosburgh.org>
In-Reply-To: <1074277065.725.4.camel@leguin>
References:  <200401160820.19794.jonathan@fosburgh.org> <1074277065.725.4.camel@leguin>

next in thread | previous in thread | raw e-mail | index | archive | help
=2D----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Adding kde@ and following up below.

On Friday 16 January 2004 12:17 pm, Eric Anholt wrote:
> On Fri, 2004-01-16 at 06:20, Jonathan Fosburgh wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > I am cross-posting this to -current, since the problem is occuring in
> > that environment.
> >
> > I first noticed this as far back as 5.0-RELEASE, but I had chalked it up
> > to being hardware-related, for reasons I shall get into shortly.  The
> > problem has persisted throught XFree86 4.3.x (and through the most
> > current snapshot available in the ports).  I am also running KDE 3.x
> > (3.1.x and now 3.2 BETA2).  I am running -CURRENT (updated within the
> > past couple of weeks) on a Pentium III-600mHz with 383MB (from dmesg)
> > RAM.  Originally, I had an nvidia Riva TNT2 video card.  For a brief ti=
me
> > I used the nvidia drivers, but those were so unstable I never found out
> > if this particular problem was reproduceable with them. I now have an A=
TI
> > Radeon 9200 and I see the same things.
> >
> > What is happening is that the X server slowly allocates more memory unt=
il
> > all physical RAM and page space are allocated, and the pager starts
> > killing off processes, eventually killing the X server.  This seems to
> > screw up syscons as well, and  I wind up having to reboot to get my text
> > consoles back. Things have gotten slightly better of late, sometimes the
> > memory is freed and the XFree86 process might go from say 400+MB
> > (according to top) down to a little less then 200MB, which appears to be
> > normal for the Radeon using DRI. But this is not always the case.  When=
 I
> > come in in the mornings I either find my system very low on page space,
> > or if I am gone for a couple of days I will generally find that X has
> > been killed.  I run screensavers and have DPMS set up to send the monit=
or
> > to power-save mode. I have reduced my screensaver to just blanking the
> > screen, but still to no avail.  This morning, I came in (after having
> > been out yesterday) to find that X had been killed after running out of
> > page space.
> >
> > Now, here is why I initially thought it was hardware related (that is, =
in
> > the nvidia driver for XFree86): at home I have a Pentium III-600 with
> > about the same amount of memory, running XFree86 4.3.x, KDE 3.1.x,
> > screensavers, DPMS, etc.  The differences are that at home I have an SiS
> > ViRGE video card (incidentally, PCI versus AGP for work), and I am
> > tracking -STABLE there. Only every once in awhile do I run out of page
> > space at home, but my paging space is undersized there, whereas at work
> > it is set to the recommended size from when I did the install, 753MB.
> >
> > Where I am at now is trying to figure out where the memory is going, and
> > how to prevent it. :) Can anyone help me diagnose this?
>
> Every month or so I see someone saying they think XFree86  is leaking
> memory.  Of course, with this release of XFree86 having been out for
> about a year now, there are probably no major memory leaks, especially
> with such a commonly used driver like ATI.
>
> The X Server allocates memory on behalf of clients.  What you are
> seeing, I'm willing to bet, is some application you run is leaking
> pixmaps, so the X Server continues allocating memory for it until OOM
> killer starts killing things off.  You could try, when the memory usage
> is very large, killing your apps off one by one and seeing when the
> memory usage in the server goes back down.

I observed my work system over the weekend, and around the time that the=20
XFree86 process reached 425M I killed konqueror.  At this point memory usag=
e=20
for X stopped increasing, but no memory was ever freed, even after logging=
=20
out of KDE.  The kdeinit process for konqueror showed ~150M (give or take=20
about 15M), which is what it (and every other instance of kdeinit) always=20
shows.  Following a reboot yesterday, I started using opera, and now my=20
XFree86 process is topping out around 195M.  Sometimes a little more memory=
=20
is allocated but it is freed fairly quickly.

Now, contrast this to my setup at home where I use konqueror and keep it=20
running all the time.  As I state above, there are relatively few differenc=
es=20
aside from -CURRENT at work and -STABLE at home and hardware, which it seem=
s=20
should not be an issue.  Now who knows, maybe this will magically stop when=
=20
3.2-RELEASE comes out, but given this has been happening for awhile (and=20
across several releases), I'm not too confident of that happening.  I also=
=20
find it odd that I would be the only one seeing this. Is there anything=20
further I can do to try to figure out what is going on?

=2D --=20
Jonathan Fosburgh
AIX and Storage Administrator
UT MD Anderson Cancer Center
Houston, TX
=2D----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)

iD8DBQFADoY7qUvQmqp7omYRAnvqAKDAK8D8IAhPX1XsV0QLqfxC0XpM+QCg0niP
RPFbn0BCsLuR4ds+5quVlCA=3D
=3D56CE
=2D----END PGP SIGNATURE-----



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