X2Go Bug report logs - #884
nxagent fails to run with "Could not open default font 'fixed'"

version graph

Package: nx-libs; Maintainer for nx-libs is X2Go Developers <x2go-dev@lists.x2go.org>;

Reported by: devsk <internet_everyone@yahoo.com>

Date: Sun, 31 May 2015 20:40:01 UTC

Severity: normal

Tags: fixed-upstream

Found in version

Fixed in version

Forwarded to https://github.com/ArcticaProject/nx-libs/issues/84

Full log

ūüĒó View this message in rfc822 format

X-Loop: owner@bugs.x2go.org
Subject: Bug#884: nxagent fails to run with "Could not open default font 'fixed'"
Reply-To: devsk <internet_everyone@yahoo.com>, 884@bugs.x2go.org
Resent-From: devsk <internet_everyone@yahoo.com>
Resent-To: x2go-dev@lists.x2go.org
Resent-CC: owner@bugs.x2go.org
X-Loop: owner@bugs.x2go.org
Resent-Date: Sun, 31 May 2015 20:40:01 +0000
Resent-Message-ID: <handler.884.B.143310476329252@bugs.x2go.org>
Resent-Sender: owner@bugs.x2go.org
X-X2Go-PR-Message: report 884
X-X2Go-PR-Package: nx-libsversion: gentoo ~amd64, fully updated.x2goclient: (package nx in gentoo): 2.1.3libxfont: 1.5.1xorg-server: 1.17.1all font packages for xorg-x11 are installed and fonts.dir and fonts.alias files are correctly present and readable.detailed troubleshooting:  https://forums.gentoo.org/viewtopic-p-7755384.html
Received: via spool by submit@bugs.x2go.org id=B.143310476329252
          (code B); Sun, 31 May 2015 20:40:01 +0000
Received: (at submit) by bugs.x2go.org; 31 May 2015 20:39:23 +0000
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM,
	HTML_MESSAGE,T_DKIM_INVALID autolearn=ham version=3.3.2
Received: from nm35-vm6.bullet.mail.ne1.yahoo.com (nm35-vm6.bullet.mail.ne1.yahoo.com [])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTPS id D6F895DA88
	for <submit@bugs.x2go.org>; Sun, 31 May 2015 22:39:20 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1433104759; bh=pAfjTHQL29Lpp8IynYKw5hXNqqILDvg0Ofe1faq3Fto=; h=Date:From:Reply-To:To:Subject:From:Subject; b=NigxgI/ivudOV6IE4OR5eEEoS9RV/BWpcsQFgESEXMQhz98tEUXrBMDJV/I65mf+w5RL+pXEv8MLtPnv/Yanvh0OeUmPhuRccxjUMNU9TwjnlU/UiTFPaOcWavETW0yb5PWyHTVfwRZS3yw9H0o9pIWiyv74wBqb7pgE12FONhDLqkzjVVUf1dKNnn6PJOYdCWsqui1KZAVnZdmEAIM1WpyEpTnVgDzujPjHhCsxq3Ggl/ngp8QUwV8+VomuL/CcmGnYdKcwuQRzI4Zgt3lPB6l1ohDH2c+tjw11azVLIxLhjAycBgULNph6nV5NqMZGujVrZbDGJhoYX2mRGIteDg==
Received: from [] by nm35.bullet.mail.ne1.yahoo.com with NNFMP; 31 May 2015 20:39:19 -0000
Received: from [] by nm35.bullet.mail.ne1.yahoo.com with NNFMP; 31 May 2015 20:36:38 -0000
Received: from [] by tm106.bullet.mail.ne1.yahoo.com with NNFMP; 31 May 2015 20:36:38 -0000
Received: from [] by omp1003.mail.ne1.yahoo.com with NNFMP; 31 May 2015 20:36:38 -0000
X-Yahoo-Newman-Property: ymail-4
X-Yahoo-Newman-Id: 589756.19217.bm@omp1003.mail.ne1.yahoo.com
X-YMail-OSG: Lb075RoVM1k8z23cTBtIEsC8ZP5GJRF3geNrfqp.bzMgYMpxpizzGfZfV_8TifH
Received: by; Sun, 31 May 2015 20:36:38 +0000 
Date: Sun, 31 May 2015 20:35:57 +0000 (UTC)
From: devsk <internet_everyone@yahoo.com>
To: "submit@bugs.x2go.org" <submit@bugs.x2go.org>
Message-ID: <708412767.2173649.1433104557085.JavaMail.yahoo@mail.yahoo.com>
MIME-Version: 1.0
Content-Type: multipart/alternative; 
[Message part 1 (text/plain, inline)]
Package: nx-libsVersion: Gentoo ~amd64, fully updated.x2goclient: (package nx in gentoo): 2.1.3libXfont: 1.5.1xorg-server: 1.17.1All font packages for xorg-x11 are installed and fonts.dir and fonts.alias files are correctly present and readable.Detailed troubleshooting:  https://forums.gentoo.org/viewtopic-p-7755384.html
The client connects and the server spawns the nxagent but then the session is unexpectedly terminated. Looking at the server side log, we see:
Info: Using shared memory parameters 1/1/0/0K. Info: Using alpha channel in render extension. Info: Not using local device configuration changes. keyboard file created Error: Aborting session with 'Could not open default font 'fixed''. Session: Aborting session at 'Tue May 26 23:22:22 2015'. Session: Session aborted at 'Tue May 26 23:22:22 2015'. 
I ran the nxagent through strace -ff -tt -v and its clear that it loads all fonts (at least it finds all font.alias and reads them fine) correctly. None of the children it spawns run into any issues with missing files or folders. The snippet below (you can read longer strace on gentoo forum post):
22:11:10.608011 open("/usr/share/fonts/100dpi/fonts.alias", O_RDONLY) = 4 22:11:10.608108 fstat(4, {st_mode=S_IFREG|0644, st_size=3154, ...}) = 0 22:11:10.608217 fstat(4, {st_mode=S_IFREG|0644, st_size=3154, ...}) = 0 22:11:10.608308 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f29ca5a9000 22:11:10.608398 read(4, "lucidasans-bolditalic-8 -b&h-luc"..., 4096) = 3154 22:11:10.608496 brk(0x1f01000)          = 0x1f01000 22:11:10.608688 read(4, "", 4096)       = 0 22:11:10.608781 close(4)                = 0 22:11:10.608868 munmap(0x7f29ca5a9000, 4096) = 0 22:11:10.609148 write(2, "Error: Aborting session with '", 30Error: Aborting session with ') = 30 22:11:10.609277 write(2, "Could not open default font 'fix"..., 35Could not open default font 'fixed') = 35 22:11:10.609395 write(2, "'.\n", 3'. )     = 3 
Looking at the code, the origin of the error is:
        InitFonts();         if (loadableFonts) {             SetFontPath(0, 0, (unsigned char *)defaultFontPath, &error);         } else {             if (SetDefaultFontPath(defaultFontPath) != Success)                 ErrorF("failed to set default font path '%s'",                         defaultFontPath);         }         if (!SetDefaultFont(defaultTextFont))             FatalError("could not open default font '%s'", defaultTextFont); 
SetDefaultFont() is failing. Looking at that function (text below from IRC channel):
[19:57] <devsk> SetDefaultFont(char *defaultfontname)[19:57] <devsk> {[19:57] <devsk>     int         err;[19:57] <devsk>     FontPtr     pf;[19:57] <devsk>     XID         fid;[19:57] <devsk>     fid = FakeClientID(0);[19:57] <devsk>     err = OpenFont(serverClient, fid, FontLoadAll | FontOpenSync,[19:57] <devsk>                    (unsigned) strlen(defaultfontname), defaultfontname);[19:57] <devsk>     if (err != Success)[19:57] <devsk>         return FALSE;[19:57] <devsk>     pf = (FontPtr) LookupIDByType(fid, RT_FONT);[19:57] <devsk>     if (pf == (FontPtr) NULL)[19:57] <devsk>         return FALSE;[19:57] <devsk>     defaultFont = pf;[19:57] <devsk>     return TRUE;[19:57] <devsk> I have a feeling that LookupIDByType() is the one failing[19:58] <devsk> OpenFont() has error paths for malloc failures and none of those looked like plausible[19:58] <devsk> LookupIDByType() was obsoleted quite a while ago in xorg code[19:59] <devsk> nx-X11 of course is hanging onto old code[19:59] <devsk> is it possible that there is some interaction there with newer libXfont which is making that function fail now[20:00] <devsk> unfortunately for me, its not possible to go back to libXfont-1.4. There is a bunch of crap which needs to be downgraded as well. And dependency hell breaks loose if I try that[20:00] <devsk> above snippet is in ./programs/Xserver/dix/dixfonts.c
I did this experiment for localhost connection to avoid differences in client and server packages (which is not the case anyway because for me both client and remote server are Gentoo ~amd64 updated systems).
Anybody got any ideas of why this is happening? Is it really about the newer fontsproto and libXfont not being compatible with nx-libs?
[Message part 2 (text/html, inline)]

Send a report that this bug log contains spam.

X2Go Developers <owner@bugs.x2go.org>. Last modified: Sat Jan 23 10:27:05 2021; Machine Name: ymir.das-netzwerkteam.de

X2Go Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.