Solved Xorg Crash when Opening GUI Apps

Hello:

My x-server is crashing whenever I attempt to open a gui-based application (firefox, geany, etc.) except xterm and xpdf. This began spontaneously after a routine svn update /usr/ports on Sept. 12. The files updated were:

Code:
cairo
cups-filters
curl
ffmpeg
frei0r
nghttp2
pciids
poppler-glib
poppler-utils
python27
spdylay
texi2html
xf86-input-keyboard

(Stupidly, I did not have the portmaster log enabled at that time, so the above list was re-created from the /var/db/pkg).

My uname -a returns:

FreeBSD dutch.freebsd.net 10.0-RELEASE-p7 FreeBSD 10.0-RELEASE-p7 #0: Tue Jul 8 06:37:44 UTC 2014 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64

My Xorg.0.log contains:

Code:
Segmentation fault: 11 at address 0x10

Fatal server error:
Caught signal 11 (Segmentation fault: 11). Server aborting

Please consult the The X.Org Foundation support
    at http://wiki.x.org  for help.
Please also check the log file at "/var/log/Xorg.0.log" for additional information.

(II) UnloadModule: "kbd"
(II) UnloadModule: "mouse"
(II) UnloadModule: "kbd"
(II) intel(0): xf86UnbindGARTMemory: unbind key 16
(II) intel(0): xf86UnbindGARTMemory: unbind key 17
(II) intel(0): xf86UnbindGARTMemory: unbind key 18
(II) intel(0): xf86UnbindGARTMemory: unbind key 19
(II) intel(0): xf86UnbindGARTMemory: unbind key 20
(WW) intel(0): drmDropMaster failed: Unknown error: -1

I've found no useful information googling this general information.

I first attempted to re-build all xf86 drivers, and when that failed, I rebuilt all 576 ports. That has not solved the problem either.

A similar problem was discussed here: https://forums.freebsd.org/viewtopic.php?&t=35479 but there was nothing there that helps my situation.

It would appear, by comparing the list of updated files, the list of dependencies of the applications that cause a crash, and the dependencies of xpdf, which does not cause a crash, that this problem could be caused by either cairo or python27. Given the number of applications dependent upon both of them, I'm not sure downgrading them wouldn't cause significant other problems (even if I knew how to properly downgrade them).

I'd be grateful for any suggestions
 
Re: Xorg Crash when Opening GUI Apps

Thanks. I ran pkg_libchk -qo; it returned no output and a success code. Just as a double-check, I ran pkg check --shlibs --all --verbose which also showed no missing libraries. I would have hoped this was the result, as I had previously run portmaster -af which rebuilt all ports without intervention or error.

Anywhere to go from here?
 
Re: Xorg Crash when Opening GUI Apps

I've just upgraded packages on my system. pkg(8) changed the following:
Code:
New packages to be INSTALLED:
        gtk12: 1.2.10_24

Installed packages to be UPGRADED:
        xorg-server: 1.7.7_13,1 -> 1.7.7_14,1
        python27: 2.7.8_4 -> 2.7.8_5
        libGL: 7.6.1_4 -> 7.6.1_5
        dri: 7.6.1_4,2 -> 7.6.1_5,2
        pciids: 20140830 -> 20140911
        cyrus-sasl: 2.1.26_8 -> 2.1.26_9
        dillo: 3.0.4 -> 3.0.4_1
        fltk: 1.3.2 -> 1.3.2_1
        xf86-video-intel: 2.7.1_8 -> 2.7.1_9
        xorg-apps: 7.7 -> 7.7_1
        fox16: 1.6.49_3 -> 1.6.49_4
        qt5-webkit: 5.2.1_4 -> 5.2.1_5
        qt5-widgets: 5.2.1_1 -> 5.2.1_2
        qt5-gui: 5.2.1_4 -> 5.2.1_5
        cairo: 1.10.2_10,2 -> 1.12.16_1,2
        curl: 7.37.1_4 -> 7.38.0_1
        qt4-declarative: 4.8.6_1 -> 4.8.6_2
        qt4-opengl: 4.8.6_1 -> 4.8.6_2
        qupzilla: 1.6.6 -> 1.6.6_1
        qt4-webkit: 4.8.6_1 -> 4.8.6_2
        ffmpeg: 2.2.4_6,1 -> 2.3.3,1
        ImageMagick: 6.8.9.4_3,1 -> 6.8.9.4_4,1
        liblqr-1: 0.4.1_7 -> 0.4.1_8
        wx28-gtk2-common: 2.8.12_3 -> 2.8.12_4
        wx28-gtk2-unicode: 2.8.12_3 -> 2.8.12_4
        libGLU: 9.0.0_1 -> 9.0.0_2
        sdl: 1.2.15_4,2 -> 1.2.15_5,2
        aalib: 1.4.r5_10 -> 1.4.r5_11
        milkytracker: 0.90.86_1 -> 0.90.86_2
        audacity: 2.0.5_2 -> 2.0.5_3
        midori: 0.5.8_5 -> 0.5.8_6
        webkit-gtk2: 1.8.3_5 -> 1.8.3_6
        qt5-quick: 5.2.1_1 -> 5.2.1_2
        otter-browser: 0.9.02 -> 0.9.02_1
        qt5-printsupport: 5.2.1_1 -> 5.2.1_2
        qt5-opengl: 5.2.1_1 -> 5.2.1_2
        amule: 2.3.1_11 -> 2.3.1_12
        ruby: 1.9.3.547_2,1 -> 1.9.3.547_3,1
        opencv-core: 2.4.9 -> 2.4.9_1
        exiv2: 0.24_1,1 -> 0.24_2,1
        xorg: 7.7 -> 7.7_1
        xorg-drivers: 7.7_1 -> 7.7_2
        xf86-video-vesa: 2.3.3_3 -> 2.3.3_4
        xf86-video-r128: 6.9.2_3 -> 6.9.2_4
        xf86-video-openchrome: 0.3.3_3 -> 0.3.3_4
        xf86-video-nv: 2.1.20_4 -> 2.1.20_5
        xf86-video-mach64: 6.9.4_3 -> 6.9.4_4
        xf86-video-ati: 6.14.6_3 -> 6.14.6_4
        xf86-input-mouse: 1.9.0_3 -> 1.9.0_4
        xf86-input-keyboard: 1.8.0_3 -> 1.8.0_5
        glib12: 1.2.10_14 -> 1.2.10_15
        xdialog: 2.3.1_5 -> 2.3.1_6
        xfe: 1.37 -> 1.37_1
        xdriinfo: 1.0.4 -> 1.0.4_1

Now every single GTK2 application (and nothing else so far) crashes Xorg: Midori, NetSurf, (G)Vim, Leafpad, Galculator, etc.

/var/log/messages:
Code:
pid 2699 (Xorg), uid 0: exited on signal 6

/var/log/Xorg.0.log:
Code:
Segmentation fault: 11 at address 0x10

Fatal server error:
Caught signal 11 (Segmentation fault: 11). Server aborting

Like @stoa said, graphics/cairo does seem to be the culprit here as it's the only common dependency in all these GTK applications that is not present in any of the other installed applications.


UPDATE: okay I just downgraded graphics/cairo and everything works fine again:
pkg delete -f cairo-1.12.16_1,2
pkg add cairo-1.10.2_10,2.txz
 
Last edited by a moderator:
Re: Xorg Crash when Opening GUI Apps

Thanks, Beastie - that worked for me as well.

I'm kind of new to FreeBSD, so is this a bug-reportable offense? If so, to FreeBSD or upstream?
 
I had the same problem... had to downgrade.
Frustrating, with a hint of dejavu: viewtopic.php?t=32220
Wish there was a _real_ solution to this Cairo/FreeBSD problem. I suspect the Intel graphic drivers are to blame too.
 
I also faced the same problem after upgrade. The fluxbox is unable to connect to a display. Consquently I tried to downgrade cairo as per the method discussed in this thread. However for some reason I am unable to fetch the cairo-1.10 version from the steps suggested in this thread. Any suggestions please.
 
You need to fetch the older binary package manually to use pkg add.
You can also try something like this:
# pkg add [url=http://pkg.freebsd.org/freebsd:10:x86:64/release/0/All/cairo-1.10.2_6,2.txz]http://pkg.freebsd.org/freebsd:10:x86:6 ... .2_6,2.txz[/url]
 
@@bela, if you're using packages, don't forget that pkg(8) caches them in /var/cache/pkg (unless you set PKG_CACHEDIR to point somewhere else), provided you haven't run pkg clean.
 
Last edited by a moderator:
As suggested I fetched the older binary package from

http://pkg.freebsd.org/freebsd:10:x86:32/release/0/All/cairo-1.10.2_6,2.txz

This was followed by

Code:
#cd /usr/ports/graphics/cairo
#make deinstall clean
#pkg add http://pkg.freebsd.org/freebsd:10:x86:32/release/0/All/cairo-1.10.2_6,2.txz
#reboot
#exec fluxbox

fluxbox again failed to connect to any display. However, startx is giving me that Xclock and two terminals, hence Xserver is detecting my settings. Another observation, if I install slim I get the login window for slim and then that is it.

Any suggestions please.
 
That seems a bit severe, like tearing down and rebuilding a house if the roof is leaking. Start with the easier stuff: show the error message from fluxbox. Show the contents of .xinitrc. Stop mixing in login managers until startx works as it should.
 
Xorg.0.log had nothing to report except for a warning

Code:
drmDropmaster failed Unknown error

.xinitrc file has only the line

Code:
exec fluxbox

Even if I delete .xinitrc and run the command manually still I am unable to connect to the display.
 
Try narrowing down the list of possible problems by using vesa. Maybe it's the Intel driver. I've seem reports of cairo and and the Intel driver acting funny together.
 
Thanks but the problem is not getting resolved.

Maybe I should wait for the patch to come up and then rebuild the ports

This is the Xorg.0.log file last few lines

Code:
    (II) intel(0): xf86UnbindGARTMemory: unbind key 9
    Segmentation fault: 11 at address 0x10

    Fatal server error:
    Caught signal 11 (Segmentation fault: 11). Server aborting

    Please consult the The X.Org Foundation support
    at http://wiki.x.org
    for help.
    Please also check the log file at "/var/log/Xorg.0.log" for additional
    information.

    (II) UnloadModule: "mouse"
    (II) UnloadModule: "kbd"
    (II) intel(0): xf86UnbindGARTMemory: unbind key 1
    (II) intel(0): xf86UnbindGARTMemory: unbind key 2
    (II) intel(0): xf86UnbindGARTMemory: unbind key 3
    (II) intel(0): xf86UnbindGARTMemory: unbind key 4
    (II) intel(0): xf86UnbindGARTMemory: unbind key 5
    (II) intel(0): xf86UnbindGARTMemory: unbind key 6
    (II) intel(0): xf86UnbindGARTMemory: unbind key 7
    (II) intel(0): xf86UnbindGARTMemory: unbind key 8
    (WW) intel(0): drmDropMaster failed: Unknown error: -1

This thread https://forums.freebsd.org/viewtopic.php?f=38&t=48155 which is marked solved is also had the same problem. In my case I am not getting any missing library etc error also.

Code:
#startxfce4
xfsettingsd:  Fatal IO error 35 (Resource temporarily unavailable) on
X server :0.
xfce4-settings-helper:  Fatal IO error 35 (Resource temporarily
unavailable) on X server :0.
xfwm4:  Fatal IO error 35 (Resource temporarily unavailable) on X server :0.
Thunar:  Fatal IO error 35 (Resource temporarily unavailable) on X server :0.
wrapper:  Fatal IO error 35 (Resource temporarily unavailable) on X server :0.
xfce4-panel:  Fatal IO error 35 (Resource temporarily unavailable) on
X server :0. 
Fatal IO error 2

Any suggestions please
 
So twm(1) works but fluxbox does not. That suggests there is nothing wrong with X, or at least it is a part of X that twm(1) does not use.

If using ports, I would rebuild everything that x11-wm/fluxbox depends on: portmaster `pkg info -q -d fluxbox`.
 
So twm(1) works but fluxbox does not. That suggests there is nothing wrong with X, or at least it is a part of X that twm(1) does not use.

I agree. I tried using ratpoison, openbox and even xfce4. All ended up with the same result. I had rebuilt all ports.
 
UPDATE: Today's (20141001) push of WITH_NEW_XORG to 10.0-RELEASE and above has solved the problem and cairo-1.12.16_1,2 now plays nice. See /usr/ports/UPDATING.
 
I am already using

Code:
WITH_NEW_XORG=yes

in /etc/make.conf

I have already rebuilt and updated Xorg using this procedure.

As quoted above twm is working but other desktops fail to connect to Xdisplay.

Somehow nothing seems to work and the same thing is happening
 
Hi there.

I'm using FreeBSD 10.1-RELEASE amd64. I have installed it yesterday. Here is my list of packages:

list

I have installed only x11/xorg/, x11-wm/fluxbox/, editors/libreoffice/ and editors/vim/. Everything works fine until I installed editors/libreoffice/. After that I can run startx and Fluxbox works but if I want to open for example xterm i lost connection to my X server with
Code:
fatal IO error 35
If I run X under root account twm is working. As I wrote until I have installed editors/libreoffice/ everything was ok. There is nothing about this in /var/log/Xorg.0.log

What's wrong?
 
Back
Top