Bug 2257

Summary: Confused font path listing of "xset q" when Xserver drops font paths
Product: xorg Reporter: Roland Mainz <roland.mainz>
Component: Server/GeneralAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED MOVED QA Contact: Xorg Project Team <xorg-team>
Severity: major    
Priority: high CC: alan.coopersmith, eich, roland.mainz, stuart.kreitman
Version: git   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Roland Mainz 2005-01-10 17:29:52 UTC
2005-01-10-trunk, I am getting weired output (well, the word "scary" may fit
better here) in the font path line of the "xset q" output when the Xserver drops
(invalid) font path elements:
-- snip --
xc/programs/xset% (DISPLAY=:35 LD_LIBRARY_PATH=$PWD/../../exports/lib/ ./xset q)
Keyboard Control:
  auto repeat:  on    key click percent:  0    LED mask:  00000000
Xlib:  extension "XFree86-Misc" missing on display ":35.0".
  auto repeating keys:  00ffffffffffffff
                        ffffffffffffffff
                        ff00000000000000
                        0000000000000000
  bell percent:  50    bell pitch:  400    bell duration:  100
Pointer Control:
  acceleration:  2/1    threshold:  4
Screen Saver:
  prefer blanking:  yes    allow exposures:  yes
  timeout:  0    cycle:  600
Colors:
  default colormap:  0x20    BlackPixel:  1    WhitePixel:  0
Font Path:
 
PRINTER:/home/gismobile/projects/xorg/xprint_pkgtest/xprint_pkgtest20050110/bintarball_unpack/xprint/install/etc/X11/xserver/en_US/print//models/PS2PDFspooldir-GS//fonts/£PRINTER:/home/gismobile/projects/xorg/xprint_pkgtest/xprint_pkgtest20050110/bintarball_unpack/xprint/install/etc/X11/xserver/en_US/print//models/PSspooldir//fonts/¢PRINTER:/home/gismobile/projects/xorg/xprint_pkgtest/xprint_pkgtest20050110/bintarball_unpack/xprint/install/etc/X11/xserver/en_US/print//models/PSdefault//fonts//usr/X11R6/lib/X11/fonts/Type1%/usr/X11R6/lib/X11/fonts/hellas/Type1%/usr/X11R6/lib/X11/fonts/latin2/Type1!/usr/X11R6/lib/X11/fonts/truetype/usr/X11R6/lib/X11/fonts/100dpi/usr/X11R6/lib/X11/fonts/75dpi/usr/X11R6/lib/X11/fonts/URW
/usr/X11R6/lib/X11/fonts/baekmuk!/usr/X11R6/lib/X11/fonts/cyrillic&/usr/X11R6/lib/X11/fonts/hellas/100dpi%/usr/X11R6/lib/X11/fonts/hellas/75dpi$/usr/X11R6/lib/X11/fonts/hellas/misc!/usr/X11R6/lib/X11/fonts/japanese$/usr/X11R6/lib/X11/fonts/latin2/misc&/usr/X11R6/lib/X11/fonts/latin5/100dpi%/usr/X11R6/lib/X11/fonts/latin5/75dpi$/usr/X11R6/lib/X11/fonts/latin5/misc%/usr/X11R6/lib/X11/fonts/latin7/75dpi/usr/X11R6/lib/X11/fonts/misc!/usr/X11R6/lib/X11/fonts/misc/sgi/usr/X11R6/lib/X11/fonts/uni,,,,,,,,,,,,,,,,,,,,,,,
Bug Mode: compatibility mode is disabled
DPMS (Energy Star):
  Server does not have the DPMS Extension
-- snip --

A quick look at the process table output (% ps -ef #) shows that the Xserver was
started with a valid font path:
-- snip --
ps -ef | fgrep Xprt
% gismobi  27212 27211  0 01:45 pts/11   00:00:01
/home/gismobile/projects/xorg/xprint_pkgtest/xprint_pkgtest20050110/bintarball_unpack/xprint/install/usr/X11R6/bin/Xprt
-ac -pn -nolisten tcp -audit 4 -fp
/usr/X11R6/lib/X11/fonts/Type1,/usr/X11R6/lib/X11/fonts/hellas/Type1,/usr/X11R6/lib/X11/fonts/latin2/Type1,/usr/X11R6/lib/X11/fonts/truetype,/usr/X11R6/lib/X11/fonts/100dpi,/usr/X11R6/lib/X11/fonts/75dpi,/usr/X11R6/lib/X11/fonts/URW,/usr/X11R6/lib/X11/fonts/baekmuk,/usr/X11R6/lib/X11/fonts/cyrillic,/usr/X11R6/lib/X11/fonts/encodings,/usr/X11R6/lib/X11/fonts/hellas/100dpi,/usr/X11R6/lib/X11/fonts/hellas/75dpi,/usr/X11R6/lib/X11/fonts/hellas/misc,/usr/X11R6/lib/X11/fonts/japanese,/usr/X11R6/lib/X11/fonts/kwintv,/usr/X11R6/lib/X11/fonts/latin2/misc,/usr/X11R6/lib/X11/fonts/latin5/100dpi,/usr/X11R6/lib/X11/fonts/latin5/75dpi,/usr/X11R6/lib/X11/fonts/latin5/misc,/usr/X11R6/lib/X11/fonts/latin7/75dpi,/usr/X11R6/lib/X11/fonts/local,/usr/X11R6/lib/X11/fonts/misc,/usr/X11R6/lib/X11/fonts/misc/sgi,/usr/X11R6/lib/X11/fonts/uni
:35
-- snip --


Steps to reproduce (I am using here a xprint test branch to make the testing
less compliciated - but the same can be reproduced in Xorg trunk, too):
1. Pull source from CVS:
  % export CVSROOT=:ext:foobar@cvs.freedesktop.org:/cvs/xorg
  % export CVS_RSH=ssh
  % cvs -z8 checkout -r xprint_packagertest_20041217 xc
2. Build it:
  % cd xc/
  % time nice -n 14 make World 2>&1 | tee -a buildlog.log
3. Build binary tarball:
  % cd packager/tarball/
  % make make_xprint_tarball
  % cd ..
  % mkdir bintarball_unpack
  % cd bintarball_unpack/
4. Fetch and unpack generated binary tarball from /tmp :
  % mv /tmp/xprint_server_050111013442.tar.gz .
  % gunzip -c xprint_server_050111013442.tar.gz | tar -xf -
5. Start Xprt server:
  % cd xprint/
  % ./run_xprint_from_tarball.sh start
6. Query the list of Xprint servers and tell "xset" to display the font path of
the first entry (display=:35):
  % ./run_xprint_from_tarball.sh get_xpserverlist
  % (DISPLAY=:35 xset q)

Result:
Weired font path listing.

Expected result:
Correct font path listing

It may be possible (or not) that this issue is related to the detail that the
Xserver drops some font path elements at startup. At startup the Xserver prints
the following warnings:
-- snip --
Could not init font path element /usr/X11R6/lib/X11/fonts/encodings, removing
from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/kwintv, removing from
list!
Could not init font path element /usr/X11R6/lib/X11/fonts/local, removing from
list!
-- snip --

Does anyone (Egbert, Alan, Stuart, Jay etc.) have a clue what may be going wrong
here ?
Comment 1 Roland Mainz 2005-01-10 17:32:53 UTC
(BTW: Test platform is SuSE 8.2/x86 with gcc 3.3 ("20030226 (prerelease) (SuSE
Linux)"))
Comment 2 Roland Mainz 2005-01-11 16:59:41 UTC
Trying to rehash the font path results in the following error:
-- snip --
% (DISPLAY=:35 LD_LIBRARY_PATH=$PWD/../../exports/lib/ ./xset fp rehash)
X Error of failed request:  BadLength (poly request too large or internal Xlib
length error)
  Major opcode of failed request:  51 (X_SetFontPath)
  Serial number of failed request:  7
  Current serial number in output stream:  9
-- snip --
Somehow this doesn't look good... ;-(

Did anyone checkin anything related to font path handling into Xorg trunk
recently ?
Comment 3 Daniel Stone 2007-02-27 01:25:03 UTC
Sorry about the phenomenal bug spam, guys.  Adding xorg-team@ to the QA contact so bugs don't get lost in future.
Comment 4 debguy 2014-11-28 05:57:19 UTC
Could not init font path element /usr/X11R6/lib/X11/fonts/encodings, removing
from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/kwintv, removing from
list!
Could not init font path element /usr/X11R6/lib/X11/fonts/local, removing from
list!


most likely it's correct.  check the easy things first.

as user, can you cd to ?  are they set to right permission ?  any softlinks ?

what distro are you running ?  debian, bsd, gentoo ?

is that a font manager controlling your fonts?  or are you relying on XPrint to do everything ?

assuming you didn't buy adobe fonts.  did you run a font manager to manage the fonts (ie, emkfontdir or mkfontdir, fc-cache).  defoma?

do i see the print server seems to add and remove fonts available over the internet on the fly ?  did you firewall your X priint and X font servers so your not getting fonts / requests from all over the internet ?

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.