Xorg Program received signal SIGSEGV, Segmentation fault, xubuntu 8.04 and wine 0.9.59-0ubuntu5 crashs the xserver

Bug #237993 reported by bofh.bug
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
X.Org X server
Fix Released
High
xorg-server (Ubuntu)
Fix Released
High
Unassigned

Bug Description

Binary package hint: xorg

xubuntu 8.04 and wine 0.9.59-0ubuntu5 crashs the xserver, Xorg Program received signal SIGSEGV, Segmentation fault.

bofh@xbox:# wine
preloader: Warning: failed to reserve range 00000000-60000000
preloader: Warning: failed to reserve range 00000000-60000000
err:dosmem:setup_dos_mem Cannot use first megabyte for DOS address space, please report
preloader: Warning: failed to reserve range 00000000-60000000
err:dosmem:setup_dos_mem Cannot use first megabyte for DOS address space, please report
err:dosmem:setup_dos_mem Cannot use first megabyte for DOS address space, please report
XIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":0.0"
      after 76 requests (74 known processed) with 0 events remaining.

root@xbox:/var/log# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=8.04
DISTRIB_CODENAME=hardy
DISTRIB_DESCRIPTION="Ubuntu 8.04"
root@xbox:/var/log#

root@xbox:/var/log# uname -a
Linux xbox 2.6.24-18-generic #1 SMP Wed May 28 19:28:38 UTC 2008 x86_64 GNU/Linux
root@xbox:/var/log#

root@xbox:/var/log# grep -i WARNING daemon.log | tail -1
Jun 6 22:27:15 xbox gdm[7215]: WARNING: gdm_slave_xioerror_handler: Schwerwiegender X-Fehler - :0 wird neu gestartet
root@xbox:/var/log#

Attachmt files backtrace full form xorg, Xorg.0.log, and dmesg

Memtest86 and burnK7 done with out errors.

Revision history for this message
bofh.bug (bofh-bug) wrote :
Revision history for this message
bofh.bug (bofh-bug) wrote :
Revision history for this message
bofh.bug (bofh-bug) wrote :
Revision history for this message
bofh.bug (bofh-bug) wrote :
Revision history for this message
Bryce Harrington (bryce) wrote :

Thanks for the backtrace, this seems to indicate that the fault is something like this:

    pScrn = xf86Screens[scrnIndex]; // does bad data get in here?
    pVidMode = VMPTR(pScrn->pScreen);
    pVidMode->First = pScrn->modes; // First set to Invalid pointer?
    pVidMode->Next = pVidMode->First->next; // Crash

My guess is that adding a check for pVidMode->First would eliminate the crash.

Changed in xorg:
assignee: nobody → bryceharrington
importance: Undecided → High
status: New → Triaged
Revision history for this message
bofh.bug (bofh-bug) wrote : Re: [Bug 237993] Re: Xorg Program received signal SIGSEGV, Segmentation fault, xubuntu 8.04 and wine 0.9.59-0ubuntu5 crashs the xserver

Hi Bryce,

thanks for look in to it,
is somehing what i cann help you to work on it?

best wisches
bofh

-------- Original-Nachricht --------
> Datum: Thu, 03 Jul 2008 19:20:43 -0000
> Von: Bryce Harrington <email address hidden>
> An: <email address hidden>
> Betreff: [Bug 237993] Re: Xorg Program received signal SIGSEGV, Segmentation fault, xubuntu 8.04 and wine 0.9.59-0ubuntu5 crashs the xserver

> Thanks for the backtrace, this seems to indicate that the fault is
> something like this:
>
> pScrn = xf86Screens[scrnIndex]; // does bad data get in here?
> pVidMode = VMPTR(pScrn->pScreen);
> pVidMode->First = pScrn->modes; // First set to Invalid pointer?
> pVidMode->Next = pVidMode->First->next; // Crash
>
> My guess is that adding a check for pVidMode->First would eliminate the
> crash.
>
> ** Changed in: xorg (Ubuntu)
> Importance: Undecided => High
> Assignee: (unassigned) => Bryce Harrington (bryceharrington)
> Status: New => Triaged
>
> --
> Xorg Program received signal SIGSEGV, Segmentation fault, xubuntu 8.04 and
> wine 0.9.59-0ubuntu5 crashs the xserver
> https://bugs.launchpad.net/bugs/237993
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in “xorg” source package in Ubuntu: Triaged
>
> Bug description:
> Binary package hint: xorg
>
> xubuntu 8.04 and wine 0.9.59-0ubuntu5 crashs the xserver, Xorg Program
> received signal SIGSEGV, Segmentation fault.
>
> bofh@xbox:# wine
> preloader: Warning: failed to reserve range 00000000-60000000
> preloader: Warning: failed to reserve range 00000000-60000000
> err:dosmem:setup_dos_mem Cannot use first megabyte for DOS address space,
> please report
> preloader: Warning: failed to reserve range 00000000-60000000
> err:dosmem:setup_dos_mem Cannot use first megabyte for DOS address space,
> please report
> err:dosmem:setup_dos_mem Cannot use first megabyte for DOS address space,
> please report
> XIO: fatal IO error 11 (Resource temporarily unavailable) on X server
> ":0.0"
> after 76 requests (74 known processed) with 0 events remaining.
>
>
> root@xbox:/var/log# cat /etc/lsb-release
> DISTRIB_ID=Ubuntu
> DISTRIB_RELEASE=8.04
> DISTRIB_CODENAME=hardy
> DISTRIB_DESCRIPTION="Ubuntu 8.04"
> root@xbox:/var/log#
>
> root@xbox:/var/log# uname -a
> Linux xbox 2.6.24-18-generic #1 SMP Wed May 28 19:28:38 UTC 2008 x86_64
> GNU/Linux
> root@xbox:/var/log#
>
> root@xbox:/var/log# grep -i WARNING daemon.log | tail -1
> Jun 6 22:27:15 xbox gdm[7215]: WARNING: gdm_slave_xioerror_handler:
> Schwerwiegender X-Fehler - :0 wird neu gestartet
> root@xbox:/var/log#
>
> Attachmt files backtrace full form xorg, Xorg.0.log, and dmesg
>
> Memtest86 and burnK7 done with out errors.

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

Sorry, I've been busy and out of town most of July.
The next step for this bug probably is to report it upstream, or to rig up a patch to check for the invalid value. If you're feeling ambitious, feel free to do either; if not, I'll hopefully get time to work on it within the next couple weeks.

Revision history for this message
In , Andreas Moog (ampelbein) wrote :

Created an attachment (id=18672)
Backtrace from the crash

xubuntu 8.04 and wine 0.9.59-0ubuntu5 crashs the xserver, Xorg Program received signal SIGSEGV, Segmentation fault.

bofh@xbox:# wine
preloader: Warning: failed to reserve range 00000000-60000000
preloader: Warning: failed to reserve range 00000000-60000000
err:dosmem:setup_dos_mem Cannot use first megabyte for DOS address space, please report
preloader: Warning: failed to reserve range 00000000-60000000
err:dosmem:setup_dos_mem Cannot use first megabyte for DOS address space, please report
err:dosmem:setup_dos_mem Cannot use first megabyte for DOS address space, please report
XIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":0.0"
      after 76 requests (74 known processed) with 0 events remaining.

See also the attached backtrace.

The fault seems to be related to this:

    pScrn = xf86Screens[scrnIndex]; // does bad data get in here?
    pVidMode = VMPTR(pScrn->pScreen);
    pVidMode->First = pScrn->modes; // First set to Invalid pointer?
    pVidMode->Next = pVidMode->First->next; // Crash

A guess is that adding a check for pVidMode->First would eliminate the crash.

Revision history for this message
Andreas Moog (ampelbein) wrote :

I took the freedom to report this upstream here: http://bugs.freedesktop.org/show_bug.cgi?id=17431

Changed in xorg-server:
status: Unknown → Confirmed
Revision history for this message
Bryce Harrington (bryce) wrote :

Great, thanks for taking the initiative on that.

Changed in xorg:
assignee: bryceharrington → nobody
Revision history for this message
In , Dan Kegel (dank) wrote :

I'm running into this, too.
In my case, it's with Ubuntu 8.10, with its stock X server 1.5.2,
on an intel graphics card. To reproduce, run any Wine
program that uses the screen (say, wine-git/dlls/user32/tests's "make static.ok")
with the monitor unplugged. 100% reproducible crash, backtrace points
to exactly this problem; perhaps VidModeAvailable needs to
do the additional checking Andreas Moog suggested.

Seems to be a dup of bug 13952?

Revision history for this message
In , Dan Kegel (dank) wrote :

I'm getting this with an nvidia card now, too, so it's generic, not video-card specific.

The "Ubuntu is running in low-graphics mode" says
 (EE) NV(0): No valid initial configuration found

Foo. Now I have to go buy monitors for all my build slaves. This can't be optimal.

Revision history for this message
In , Diego Elio Pettenò (flameeyes) wrote :

I'm also having this problem as soon as an SDL program starts up when it inquiries VidModes, this is on radeon driver.

Revision history for this message
In , Diego Elio Pettenò (flameeyes) wrote :

For what it's worth, it seems like SDL comes with its own internal copy of Xxf86vm ... which I guess is not very good... there is where the XF86VidModeGetAllModeLines symbol is present.

I guess ABI might have changed somehow, and SDL now makes Xorg crash.

Revision history for this message
In , Gordon Jin (gordon-jin) wrote :

*** Bug 13952 has been marked as a duplicate of this bug. ***

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

Looks like I fixed this one already for bug 300310, uploaded as version 2:1.5.99.902-0ubuntu2

    pScrn = xf86Screens[scrnIndex];
    pVidMode = VMPTR(pScrn->pScreen);
    if (pScrn->modes == NULL)
        return FALSE;

    pVidMode->First = pScrn->modes;
    pVidMode->Next = pVidMode->First->next;

Changed in xorg-server (Ubuntu):
status: Triaged → Fix Released
Changed in xorg-server:
importance: Unknown → High
Revision history for this message
In , Chris Wilson (ickle) wrote :

*** Bug 27758 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Chris Wilson (ickle) wrote :

Created attachment 42358
Prevent the crash

Changed in xorg-server:
importance: High → Unknown
Changed in xorg-server:
importance: Unknown → High
Revision history for this message
In , Jeremy Sequoia (jeremyhu) wrote :

Chris, please send this workaround (along with your others) to xorg-devel for
review.

Revision history for this message
In , Jeremy Sequoia (jeremyhu) wrote :

reviewed and pulled into my tree for eventual merge to master. In the future, please send to xorg-devel.

Revision history for this message
In , Jeremy Sequoia (jeremyhu) wrote :

commit 6105fcaa3592cb6d0d5f22d9b850986d0bc4d241
Author: Chris Wilson <email address hidden>
Date: Mon Jan 24 11:17:03 2011 +0000

    VidMode: prevent crash with no modes

    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=17431

    Signed-off-by: Chris Wilson <email address hidden>
    Reviewed-by: Jeremy Huddleston <email address hidden>
    (cherry picked from commit eeb21a133b982f71de739baf62e53c8a68f5d495)

Changed in xorg-server:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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