gnome-display-properties crashed with SIGSEGV in _start() [when running xgl]

Bug #215396 reported by John S. Gruber
78
Affects Status Importance Assigned to Milestone
gnome-control-center (Ubuntu)
Fix Released
Medium
Unassigned
Hardy
Fix Released
Undecided
Unassigned
xserver-xgl (Ubuntu)
Fix Released
Medium
Bryce Harrington
Hardy
Won't Fix
Medium
Unassigned

Bug Description

Binary package hint: gnome-control-center

Up-to-date Hardy beta as of today, 4/10/08

gnome-display-properties; gnome control center 1:2.22.1-0ubuntu2

This crash happens before anything is displayed. I just get the apport screen while expecting the screen resolution panel to open. Uninstalling xgl and restarting gdm will allow it to run. It has been repeatable; I can't run gnome-display-properties while xgl is active. If I set a different resolution will not running xgl, it is forgotten when xgl is reinstalled and then used.

Due to the similarity in the assertion it prints I have to wonder if this is anything like bug#199960. If so, perhaps the kind of magic applied to gnome-setting-daemon that fixed that (for me anyway) might fix this? I believe this may also be related to bug#164125.

ProblemType: Crash
Architecture: i386
Date: Thu Apr 10 17:19:34 2008
DistroRelease: Ubuntu 8.04
ExecutablePath: /usr/bin/gnome-display-properties
NonfreeKernelModules: nvidia
Package: gnome-control-center 1:2.22.1-0ubuntu2
PackageArchitecture: i386
ProcCmdline: gnome-display-properties
ProcEnviron:
 SHELL=/bin/bash
 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
 LANG=en_US.UTF-8
Signal: 11
SourcePackage: gnome-control-center
Stacktrace: #0 0x0804ecbd in _start ()
StacktraceTop: _start ()
ThreadStacktrace:
 .
 Thread 1 (process 6334):
 #0 0x0804ecbd in _start ()
Title: gnome-display-properties crashed with SIGSEGV in _start()
Uname: Linux 2.6.24-15-generic i686
UserGroups: adm admin audio cdrom dialout dip floppy fuse lpadmin plugdev video

Revision history for this message
John S. Gruber (jsjgruber) wrote :
Revision history for this message
Apport retracing service (apport) wrote : Symbolic stack trace

StacktraceTop:run_application (app=0x8079b00) at xrandr-capplet.c:1755
main (argc=1, argv=0xbf946f34) at xrandr-capplet.c:1799

Revision history for this message
Apport retracing service (apport) wrote : Symbolic threaded stack trace
Revision history for this message
Apport retracing service (apport) wrote : Stack trace with source code
Changed in gnome-control-center:
importance: Undecided → Medium
description: updated
Revision history for this message
James Westby (james-w) wrote :

Hi,

Could somebody please confirm the version of libgnome-desktop-2
you have installed?

Also, it would be very useful to have a valgrind log of the crash, could
someone provide that? https://wiki.ubuntu.com/Valgrind has information
on how to do this. The program name in this case is "gnome-display-properties"
and no program arguments are required.

Thanks,

James

Revision history for this message
James Westby (james-w) wrote :

Hi,

My apologies, I managed to confuse myself, so I don't think
I'll need that information after all.

I have a patch that I think will fix this problem, it will be uploaded
shortly. Could you please test the new version and report back
as to whether it works correctly or not.

Thanks,

James

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

This bug was fixed in the package gnome-control-center - 1:2.22.1-0ubuntu3

---------------
gnome-control-center (1:2.22.1-0ubuntu3) hardy; urgency=low

  * Handle the case when the screen info can't be retrieved from
    XRandR. If this happens there is little we can do except inform
    the user and close. It may indicate a bug in the driver, or in
    this case Xgl, as it reports that it is XRandR 1.2 capable, but
    it fails to provide the necessary information. (LP: #215396)
    This is debian/patches/114_cc-randr12-handle_rw_screen_new_failure.patch
  * Handle the case where clone mode is detected, but no screens
    are reported as connected. This would cause uninitalised memory
    to be used. (LP: #216676)
    This is debian/patches/115_cc-randr12-fix-rebuild-gui.patch
  * Handle failure to get a new screen configuration when the screen has
    changed. (LP: #215396)
    This is
    debian/patches/116_cc-randr12-handle-screen-NULL-in-on_screen_changed.patch
  * Remove the "Help" button from the display capplet, as it is not
    functional currently, and there is no help to provide at the moment.
    (LP: #210383)
    This is debian/patches/117_cc-randr12-disable-help-button.patch
  * Rename debian/patches/01_debian_ubuntu.patch to
    debian/patches/01_remove_debian_default_applications.patch and change
    it to remove the entries, rather than changing the names.
  * Make the firefox entry in default applications use the firefox-3.0 icon.

 -- James Westby <email address hidden> Mon, 14 Apr 2008 16:01:41 +0100

Changed in gnome-control-center:
status: New → Fix Released
Revision history for this message
John S. Gruber (jsjgruber) wrote :

What would be the best way for me to submit a proposal for a patch I'm working on so that xserver-xgl admits that it only does randr 1.1? My research says that it fibs.

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

Hi John,

Attaching the patch to a bug report (maybe this one?) would be a good start. I don't review xserver-xgl bugs too frequently, so you might want to find me or tjaalton on #ubuntu-x or the ubuntu-x@ mailing list once it's ready for upload.

Revision history for this message
John S. Gruber (jsjgruber) wrote :

@Bryce
Thanks. I'll try to have it ready soon, with an explanation of the problem. When it's done I'll let you know.

@James
The fix worked as expected. I now get a polite dialog box rather than the rude crash. Thank you.

Revision history for this message
John S. Gruber (jsjgruber) wrote : Re: xserver-xgl patch for root cause--wrong randr protocol version reported

Three line patch to Xgl so that it reports the version of the randr protocol it implements, rather than the protocol that the build system defines. xserver-xgl only implements RRQueryVersion, RRSetScreenConfig, RRSelectInput, and RRGetScreenInfo, the transaction types defined for version 1.1. Version 1.2 added many more transaction types. Both my research and my testing indicate that this discrepancy between reported version and implemented version is the underlying cause of this crash.

The protocol is described in http://gitweb.freedesktop.org/?p=xorg/proto/randrproto.git;f=randrproto.txt;a=blob . The protocol is implemented in randr.c in the randr directory of the source package. http://sophie.zarb.org/srpm/current,x86_64/x11-server-xgl mentions a Mandrake patch of xgl-fix-report-randr-version.patch but I couldn't find it or its license online.

This is my first Ubuntu c patch so please look it over carefully before release (ie. when you have the time). Of course I have tested it on my own system.

If successful gnome-display-properties will return a screen indicating an insufficient version of randr for it to set properties. xrandr -v will return version 1.1. xrandr alone will return the available screen resolutions rather than an error message. This should therefore also address bug164125.

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

Hi John,

Thanks for investigating this. It lines up with what I suspected as well.

jcristau suggested alternatively something more like what the xserver does:
http://cgit.freedesktop.org/xorg/xserver/diff/randr/rrdispatch.c?id=3b71b0f89f1db837da91650baa0ef4bb7ef2e98f

except with SERVER_RANDR_MINOR set to 1.

Would you mind re-rolling the patch to do this? I think it would be good for this to go into 8.04.1 (too late really for 8.04), and of course it should go upstream to Debian and Xorg as well.

Changed in xserver-xgl:
importance: Undecided → Medium
milestone: none → ubuntu-8.04.1
status: New → In Progress
Revision history for this message
John S. Gruber (jsjgruber) wrote :

Hello Bryce,

Thanks for getting back to me. I've redone the patch to change the names to SERVER_RANDR_MAJOR and SERVER_RANDR_MINOR (in both places). Not only is that more consistent with xserver, different things should have different names to prevent (more) conceptual confusion.

The patch tested out on my hardy system.

I'm assuming the format of the patch isn't important and again put together a dpatch format patch to match what was already in debian/patches.

If this still isn't good please let me know. I'm a beginner on packaging and patching systems and I have a lot to learn.

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

Thanks, looks good. I'll take it from here.

Changed in xserver-xgl:
assignee: nobody → bryceharrington
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xserver-xgl - 1:1.1.99.1~git20080115-0ubuntu2

---------------
xserver-xgl (1:1.1.99.1~git20080115-0ubuntu2) intrepid; urgency=low

  [John S. Gruber]
  * debian/patches/03-randr-correct-version.dpatch:
    + Make XGL correctly report the version of XRandR it supports (1.1, not 1.2)
      (LP: #215396)

 -- Bryce Harrington <email address hidden> Mon, 12 May 2008 16:45:16 -0700

Changed in xserver-xgl:
status: In Progress → Fix Released
Revision history for this message
Bryce Harrington (bryce) wrote :

I've uploaded this to Intrepid.

If you'd like to see it included for Hardy, please follow the SRU process as outlined at https://wiki.ubuntu.com/StableReleaseUpdates. I think this patch would qualify if you're interested.

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

No changes to g-c-c are needed.

Changed in gnome-control-center:
status: New → Fix Released
Changed in xserver-xgl:
importance: Undecided → Medium
milestone: none → ubuntu-8.04.1
Revision history for this message
Martin Pitt (pitti) wrote :

xserver-xgl is universe, and thus not affected by Hardy point release CD milestones.

Changed in xserver-xgl:
milestone: ubuntu-8.04.1 → none
Steve Langasek (vorlon)
Changed in xserver-xgl:
milestone: ubuntu-8.04.1 → none
Bryce Harrington (bryce)
Changed in xserver-xgl (Ubuntu Hardy):
status: New → Won't Fix
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.