Subject: Re: X11 logs fill disk
To: Holger Rasch <Holger.Rasch@Informatik.Uni-Oldenburg.DE>
From: Stoned Elipot <>
List: current-users
Date: 03/08/2006 18:45:14
The following may be related...

The freetype2 library when using the "generic" FT_Stream_Open() function
from xsrc/xfree/xc/extras/freetype2/src/base/ftsystem.c leaks
file descriptors.

When using xsrc/xfree/xc/extras/freetype2/builds/unix/ftsystem.c
it does not with the help of:
    (void)fcntl( file, F_SETFD, FD_CLOEXEC ); 
Also it uses mmap()...

I have only tried once to make xsrc/xfree/xc/lib/freetype2/Imakefile
and src/x11/lib/freetype2/Makefile using ftsystem.c from 
As I hadn't tried really hard it failed but it was only a build plumbing
problem not an actual compiling or liking problem. If anyone
knowledgeable enough could pick this up :)

On Wed, Mar 08, 2006 at 10:02:41AM +0100, Holger Rasch wrote:
> On Tue, 7 Mar 2006, Jan Schaumann wrote:
> [...]
> >visiting a website with firefox causes X to spin out of control and log
> >
> >_XSERVTransSocketUNIXAccept: accept() failed
> >
> >in the logfile.  It will continue to log thousands and thousands of
> >these until eventually the disk is full.
> >
> >Has anybody else seen this?  I have not yet found a way to reliably
> >reproduce this, but it is happening often enough to be a severe problem
> [...]
> When I had problems with the above error msgs filling my /var,
> I simply raised the 'nofiles' limit for the X server. I think
> the problem occurs with clients using lots of true-type fonts,
> since most of the open file descriptor of the X server were
> some of these fonts when the error occurred.  At least with
> the version of X used here, changing the 'nofiles' for a
> running X server with sysctl did not fix the problem -- only
> raising the limit before X started worked.
> Holger