xserver crash (repeatable, triggered by drawing circle/ellipse e.g. in xfig)

Bug #553647 reported by RichardNeill
58
This bug affects 10 people
Affects Status Importance Assigned to Milestone
xorg-server (Ubuntu)
Fix Released
High
Chris Halse Rogers
Lucid
Fix Released
High
Bryce Harrington
Maverick
Fix Released
High
Chris Halse Rogers

Bug Description

[Impact]
xfig is no longer as widely used an application as it once was, but regular application usage should not crash X. It may be an indication of a problem that other legacy apps have beyond xfig.

[Development]
The fix has been committed to the main ubuntu-x git branch, which will be used once Maverick Meerkat is open for development, thus this fix will automatically copy over into it. The patch is also included in Debian and upstream so we will get it automatically next time we merge this package from Debian.

[Patch]
Patch is taken directly from Debian. This is an upstream patch.
http://git.debian.org/?p=pkg-xorg/xserver/xorg-server.git;a=commit;h=94ccaae1ff45c11453141469f5659b6d2a16c4bf

[Test Case]
1. Update Lucid to the latest version. Reboot and log into Gnome
2. Open xfig
3. Left click in drawing area once (to dismiss the xfig banner)
4. Press the 'c' key
5. Left click in the drawing area
6. Xserver instantly crashes (and is restarted by display manager). It should not crash at this point.

[Regression Potential]
Low. This is a pretty substantial patch at 887 lines, which addresses an issue in a lesser-used application, and so for those reasons I opted to wait on including it in the Lucid release itself, in the interest in seeing it get further testing time under its belt. Because Debian and X.org are including the patch, I am assuming it is safe and thus valid for consideration as a regular SRU. But because of the size of the patch, 'Low' is the best rating I can give it.

Specific things I am concerned about: This patch drops several exa functions; are those functions in use by anything (like proprietary drivers, games, or other apps?) This patch changes fallback behavior which I gather does not get exercised except in certain cases; is it certain that sufficient testing has been done for those cases?

I notice that part of the patch involves adding a number of null-ptr checks. If testing does reveal this patch causes a regression somewhere, a suggested Plan B would be to extract these checks and see if those alone are sufficient to solve this issue.

[Original Report]
Here is how to reliably and repeatably crash the X server.

1. Update Lucid to the latest version, as of 2009-04-01. Reboot and log into Gnome

2. Open xfig

3. Left click in drawing area once (to dismiss the xfig banner)

4. Press the 'c' key

5. Left click in the drawing area

6. Xserver instantly crashes (and is restarted by display manager).

This process is reliably repeatable, and I have done so several times to gather the ltrace and straces attached.

Some more details:
 * 'c' starts the Circle tool. You can click the circle tool button instead, and have the same result.
 * The ellipse tool has the same effect. However all other tools within xfig work just fine.
 * xfig itself doesn't appear to be dying: it is managing to save a "SAVE.fig" file.
 * How the %(&£"%$ is an application failure able to nuke the Xserver?

Backtrace:
0: /usr/bin/X (xorg_backtrace+0x3b) [0x80e937b]
1: /usr/bin/X (0x8048000+0x61c7d) [0x80a9c7d]
2: (vdso) (__kernel_rt_sigreturn+0x0) [0x57e410]
3: /usr/lib/xorg/modules/libfb.so (fbPushFill+0xf9) [0x20b459]
4: /usr/lib/xorg/modules/libfb.so (fbPushImage+0xf2) [0x20b622]
5: /usr/lib/xorg/modules/libfb.so (fbPushPixels+0x78) [0x20b6b8]
6: /usr/bin/X (miPolyArc+0x159a) [0x8199aca]
7: /usr/lib/xorg/modules/libfb.so (fbPolyArc+0x8a) [0x1f90aa]
8: /usr/lib/xorg/modules/libexa.so (0x384000+0xf2dd) [0x3932dd]
9: /usr/bin/X (0x8048000+0xd9655) [0x8121655]
10: /usr/bin/X (0x8048000+0x282f9) [0x80702f9]
11: /usr/bin/X (0x8048000+0x2a477) [0x8072477]
12: /usr/bin/X (0x8048000+0x1ed7a) [0x8066d7a]
13: /lib/tls/i686/cmov/libc.so.6 (__libc_start_main+0xe6) [0x240bd6]
14: /usr/bin/X (0x8048000+0x1e961) [0x8066961]
Segmentation fault at address (nil)

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: xserver-xorg 1:7.5+3ubuntu1
ProcVersionSignature: Ubuntu 2.6.32-16.25-generic
Uname: Linux 2.6.32-16-generic i686
Architecture: i386
Date: Thu Apr 1 23:14:41 2010
DkmsStatus: Error: [Errno 2] No such file or directory
InstallationMedia: Ubuntu 10.04 "Lucid Lynx" - Beta i386 (20100318)
MachineType: LENOVO 200793G
PccardctlIdent:
 Socket 0:
   no product info available
PccardctlStatus:
 Socket 0:
   3.3V 32-bit PC Card
ProcCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.32-16-generic root=UUID=5dee2242-a2c7-4f67-9ad6-4265f1d22e12 ro quiet splash
ProcEnviron:
 PATH=(custom, user)
 LANG=en_GB.utf8
 SHELL=/bin/bash
SourcePackage: xorg
dmi.bios.date: 08/27/2009
dmi.bios.vendor: LENOVO
dmi.bios.version: 79ETE5WW (2.25 )
dmi.board.name: 200793G
dmi.board.vendor: LENOVO
dmi.board.version: Not Available
dmi.chassis.asset.tag: No Asset Information
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: Not Available
dmi.modalias: dmi:bvnLENOVO:bvr79ETE5WW(2.25):bd08/27/2009:svnLENOVO:pn200793G:pvrThinkPadT60p:rvnLENOVO:rn200793G:rvrNotAvailable:cvnLENOVO:ct10:cvrNotAvailable:
dmi.product.name: 200793G
dmi.product.version: ThinkPad T60p
dmi.sys.vendor: LENOVO
system:
 distro: Ubuntu
 codename: lucid
 architecture: i686
 kernel: 2.6.32-16-generic

Revision history for this message
RichardNeill (ubuntu-richardneill) wrote :
Revision history for this message
RichardNeill (ubuntu-richardneill) wrote :

Note: the Xorg log that apport has added is almost certainly irrelevant. Look at the one I manually attached.

Here is the output of:
    strace xfig > xfig.strace 2>&1

Revision history for this message
RichardNeill (ubuntu-richardneill) wrote :

Here is the output of
   ltrace xfig > xfig.ltrace 2>&1

Bryce Harrington (bryce)
tags: added: crash
Changed in xorg (Ubuntu):
status: New → Confirmed
Bryce Harrington (bryce)
affects: xorg (Ubuntu) → xserver-xorg-input-evdev (Ubuntu)
Revision history for this message
RichardNeill (ubuntu-richardneill) wrote :

Are you sure this is the input driver rather than the x-server? I've been happily using this machine in other ways for a week without trouble - and I'm sure that the mouse-click itself isn't the issue. What I think is happening is that clicking the mouse under those particular circumstances makes xfig ask a specific request of the x-server, which causes the server to crash.

I think that the strace file contains something useful, though I don't know how to interpret it, the last fragment looks relevant:

read(4, "! $Xorg: XErrorDB,v 1.3 2000/08/"..., 41481) = 41481
close(4) = 0
write(2, "xfig3.2.5b: X error trapped - er"..., 57xfig3.2.5b: X error trapped - error message follows:
187
) = 57
write(2, "Request code: X_GetSelectionOwne"..., 34Request code: X_GetSelectionOwner
) = 34
rt_sigaction(SIGHUP, {SIG_DFL, [HUP], SA_RESTART}, {0x809b8c0, [HUP], SA_RESTART}, 8) = 0
rt_sigaction(SIGFPE, {SIG_DFL, [FPE], SA_RESTART}, {0x809b8c0, [FPE], SA_RESTART}, 8) = 0
rt_sigaction(SIGBUS, {SIG_DFL, [BUS], SA_RESTART}, {0x809b8c0, [BUS], SA_RESTART}, 8) = 0
rt_sigaction(SIGSEGV, {SIG_DFL, [SEGV], SA_RESTART}, {0x809b8c0, [SEGV], SA_RESTART}, 8) = 0
write(2, "xfig: figure empty or not modifi"..., 45xfig: figure empty or not modified - exiting
) = 45
chdir("/home/rjn") = 0
rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0
gettid() = 5734
tgkill(5734, 5734, SIGABRT) = 0
--- SIGABRT (Aborted) @ 0 (0) ---
+++ killed by SIGABRT (core dumped) +++

Timo Aaltonen (tjaalton)
affects: xserver-xorg-input-evdev (Ubuntu) → xorg-server (Ubuntu)
Revision history for this message
RichardNeill (ubuntu-richardneill) wrote :

BTW, this bug seems to be specific to this laptop with the ATI card; if I try it on a different machine (an Acer Netbook) which has the Intel graphics, I cannot reproduce it.

Revision history for this message
Bryce Harrington (bryce) wrote :

Hmm, in theory apport should be collecting a backtrace for you but I gather in this case it is not. However we need a full backtrace before analysis can be done. Please collect a full backtrace - see http://wiki.ubuntu.com/X/Backtracing for directions on how to do this manually with gdb.

description: updated
Changed in xorg-server (Ubuntu):
importance: Undecided → High
status: Confirmed → Incomplete
Revision history for this message
Robert Hooker (sarvatt) wrote :
Changed in xorg-server (Ubuntu):
milestone: none → lucid-updates
status: Incomplete → Triaged
summary: - xserver crash (repeatable, triggered by mouse-click)
+ xserver crash (repeatable, triggered by drawing circle/ellipse e.g. in
+ xfig)
Revision history for this message
Nagy Ferenc László (nfl) wrote :

Sorry for editing to my taste, apparently I have too much rights. If you would like to know, I trigger this bug by pressing a ShapedButton (like the one with the Italy flag) in wxPython demo (wx2.8-examples package). (That widget also draws a black circle/ellipse.) The computer has ATI Technologies Inc RC410 [Radeon Xpress 200] video card, and radeon driver is used.

Is it a release critical bug?

Revision history for this message
RichardNeill (ubuntu-richardneill) wrote :

Re #6, sorry I haven't had a chance to do this yet. Given that a fix already exists in #7, do you still need the backtraces?
Re #8, I'd say that this is release-critical imho.

Revision history for this message
zvaral (z-varallyay) wrote :

This issue occurs for me without pressing any key before intending to draw a circle/ellipse as I described in Bug #560681 which became a duplicate of this bug.

Selecting to draw a circle in XFig and placing the pointer to the drawing area crashes X immediately in an amd64 computer with ATI radeon x700 graphics card. No any other drawing object causes this failure just the mentioned one. This issue is not presented on an x86 architecture using mga graphics card.

Revision history for this message
Bryce Harrington (bryce) wrote :

Committed to ubuntu-x git

Changed in xorg-server (Ubuntu Lucid):
status: Triaged → Fix Committed
assignee: nobody → Bryce Harrington (bryceharrington)
Bryce Harrington (bryce)
description: updated
Bryce Harrington (bryce)
description: updated
Revision history for this message
Jakob Schiøtz (schiotz) wrote :

As this bug makes xfig unusable, it would be nice if it could be fixed in Lucid and not wait for Maverick Meerkat. I am of course willing to test an update.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Seconded. I ended up using xfig under vnc which did work, but is a bit more
cumbersome. Otherwise (with a nvidia geforce 310m) xserver crashes.

Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Accepted xorg-server into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

tags: added: verification-needed
Revision history for this message
zvaral (z-varallyay) wrote :

Nice job!

The proposed Xorg package works well and xfig (particularly drawing circle) does not cause any xserver crash using this upgrade.

Revision history for this message
Thilo Mende (ubuntu-thilomende) wrote :

Same here, after updating, drawing a circle in xfig works fine

Martin Pitt (pitti)
tags: added: verification-done
removed: verification-needed
Revision history for this message
Jakob Schiøtz (schiotz) wrote :

This fixes the problem.

Thank you very much, indeed!

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xorg-server - 2:1.7.6-2ubuntu7.1

---------------
xorg-server (2:1.7.6-2ubuntu7.1) lucid-proposed; urgency=low

  [Bryce Harrington]
  * Add 123_exa_sys_ptr_nullpointer_check.patch: Patch from upstream to
    verify a pointer is not NULL before dereferencing it. Fixes X
    segfault in miCopyRegion which occurs while using firefox (e.g. typing
    into fields in AOL). Issue found by Jerry Lamos.
    (LP: #539772)
  * Add 19-exa-handle-pixmap-create-destroy-in-lower-layers.diff: Patch
    from Debian to fix X segfault on mouse click in xfig, when pixmaps
    are created in the course of software fallbacks.
    (LP: #553647)
  * debian/rules: Don't reference the package uploader for support; instead point
    users to the standard Ubuntu support page.
    (LP: #589811)

  [Martin Pitt]
  * debian/local/64-xorg-xkb.rules: Ignore XKBMODEL=="SKIP" and
    XKBVARIANT=="U.S. English", which happen to get into
    /etc/default/console-setup in some cases like the VMWare automatic
    installer.
    (LP: #548891)

  [ Christopher James Halse Rogers ]
  * Update 122_xext_fix_card32_overflow_in_xauth.patch to most recent version
    on patchwork tracker. This one actually fixes the crash with xauth
    generate (LP: #519049)
 -- Christopher James Halse Rogers <email address hidden> Mon, 07 Jun 2010 12:56:54 +1000

Changed in xorg-server (Ubuntu Lucid):
status: Fix Committed → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote :

Chris, please upload this ASAP to maverick (SRU policy).

Changed in xorg-server (Ubuntu Maverick):
assignee: Bryce Harrington (bryceharrington) → Chris Halse Rogers (raof)
milestone: lucid-updates → maverick-alpha-2
Robert Hooker (sarvatt)
Changed in xorg-server (Ubuntu Maverick):
status: Fix Committed → Fix Released
Revision history for this message
reia2k (barchies) wrote :

I have the same bug on Ubuntu 13.04. Xserver instantly crashes (and is restarted by display manager)
when I try to draw a circle with dash line with xfig. I also downgraded xfig to the ubuntu 12.10 version, but
the problem remains.

Revision history for this message
Romano Giannetti (romano-giannetti) wrote :

I have too this problem again. Opened a new bug: https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/1184085

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.