[ale] X Font Server (xfs) problem

Joe Steele joe at madewell.com
Wed Sep 28 11:42:08 EDT 2005


I'm no expert on xfs, but I share the following details in case it may
help.  The following is based on a CentOS 4.1 system (RHEL clone).

On Tue, 2005-09-27 at 16:37 -0400, Roger Hammons wrote:
> I've confirmed with "ps -ef | grep xfs" that it's not running
> after startup.  (Can anyone confirm it's running on their 
> system?)
> 

Yes.  'ps -ef | grep xfs':
xfs       2776     1  0 Sep23 ?        00:00:00 xfs -droppriv -daemon

> Here are typical entries from /var/log/messages:
> 
>  9/27  13:21:40  xfs: xfs startup succeeded
>  9/27  13:21:40  xfs: Fatal font server error:
>  9/27  13:21:40  xfs: Cannot establish any listening sockets
> 

I find xfs is listening on a socket in /tmp/.font-unix

'netstat -lp | grep xfs' (output is wrapped):
unix  2      [ ACC ]     STREAM     LISTENING     6861
2776/xfs            /tmp/.font-unix/fs7100

'ls -la /tmp/.font-unix':
total 28
drwxrwxrwt   2 root root  4096 Sep 23 19:53 .
drwxrwxrwt  18 root root 12288 Sep 28 10:44 ..
srwxrwxrwx   1 xfs  xfs      0 Sep 23 19:53 fs7100

> The xfs startup command in init.d has no options - and hasn't
> forever - so possibly there was "a file descriptor ...
> already set up" before I trashed /tmp.  Maybe IN /tmp?  (Which
> is NOT cleared out between sessions on my system.)  If so,
> how did it get there?  What was it's name?  Contents?
> 

>From my /etc/rc.d/init.d/xfs:
start() {
   FONT_UNIX_DIR=/tmp/.font-unix
   echo -n $"Starting $prog: "
   [ -x /usr/sbin/chkfontpath ] && buildfontlist
   # Clean out .font-unix dir, and recreate it with the proper ownership
   # and permissions.
   rm -rf $FONT_UNIX_DIR
   mkdir $FONT_UNIX_DIR
   chown root:root $FONT_UNIX_DIR
   chmod 1777 $FONT_UNIX_DIR
   # Fix needed for SELinux for bug (#130421,130969)
   [ -x /sbin/restorecon ] && /sbin/restorecon $FONT_UNIX_DIR

   daemon xfs -droppriv -daemon
   ret=$?
   [ $ret -eq 0 ] && touch /var/lock/subsys/xfs
   echo
   return $ret
}

As you can see, xfs apparently uses $FONT_UNIX_DIR as the path for
creating a socket to listen on, and this directory and its contents are
wiped out and recreated every time before xfs is started.

--Joe




More information about the Ale mailing list