gnome-display-properties crashed on opening with SIGSEGV in rw_mode_get_width()

Bug #216676 reported by Yuki Izumi
20
Affects Status Importance Assigned to Milestone
gnome-control-center (Ubuntu)
Fix Released
Medium
Ubuntu Desktop Bugs

Bug Description

Binary package hint: gnome-control-center

I recently upgraded to the latest hardy - beforehand all was working well; using `radeon' kernel module for my ATI card. Post-upgrade, the screen resolution changed to 1280x768 (from 1680x1024 or thereabouts - widescreen monitor). So, I went to gnome-display-properties.. but it segfaulted. At first, I imagined this to be quite similar to https://bugs.launchpad.net/ubuntu/+source/gnome-desktop/+bug/204872, but I am using the latest as was suggested to be the fix (1:2.22.1-0ubuntu5 is the version I'm running). Also, I'm using an ATI card as opposed to NVidia. compiz was enabled when I started out; disabling does not fix.

gnome-control-center 1:2.22.1-0ubuntu2
libgnome-desktop-2 1:2.22.1-0ubuntu5

Anything else? This seems to be quite a problem.

ProblemType: Crash
Architecture: i386
CrashCounter: 1
Date: Sun Apr 13 07:58:37 2008
DistroRelease: Ubuntu 8.04
ExecutablePath: /usr/bin/gnome-display-properties
Package: gnome-control-center 1:2.22.1-0ubuntu2
PackageArchitecture: i386
ProcCmdline: gnome-display-properties
ProcCwd: /home/celtic
ProcEnviron:
 SHELL=/bin/bash
 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
 LANG=fr_FR.UTF-8
Signal: 11
SourcePackage: gnome-control-center
Stacktrace:
 #0 0xb7f06229 in rw_mode_get_width () from /usr/lib/libgnome-desktop-2.so.2
 #1 0x0804d62b in _start ()
StacktraceTop:
 rw_mode_get_width () from /usr/lib/libgnome-desktop-2.so.2
 _start ()
ThreadStacktrace:
 .
 Thread 1 (process 6771):
 #0 0xb7f06229 in rw_mode_get_width () from /usr/lib/libgnome-desktop-2.so.2
 #1 0x0804d62b in _start ()
Title: gnome-display-properties crashed with SIGSEGV in rw_mode_get_width()
Uname: Linux 2.6.24-16-generic i686
UserGroups: adm admin audio cdrom dialout dip floppy lpadmin netdev plugdev powerdev sambashare scanner video

Tags: apport-crash
Revision history for this message
Yuki Izumi (kivikakk) wrote :
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks for your bug report. Could you try to get a debug stacktrace or use apport to send a complete crash bug? Could you attach your xorg.conf and Xorg.0.log?

Changed in gnome-control-center:
assignee: nobody → desktop-bugs
importance: Undecided → Medium
status: New → Incomplete
Revision history for this message
Yuki Izumi (kivikakk) wrote :

Here's X's log.

Revision history for this message
Yuki Izumi (kivikakk) wrote :

X config. I will look into getting a proper stacktrace for you.

Revision history for this message
Yuki Izumi (kivikakk) wrote :

(gdb) run
Starting program: /usr/bin/gnome-display-properties
[Thread debugging using libthread_db enabled]
[New Thread 0xb6ca2720 (LWP 10742)]
CRTC 4a Timestamp: 7278908
CRTC 4b Timestamp: 7278908
Output 4c Timestamp: 7278908
Output 4d Timestamp: 7278908
Output 4e Timestamp: 7278908

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb6ca2720 (LWP 10742)]
rw_mode_get_width (mode=0x3) at randrwrap.c:1104
1104 randrwrap.c: No such file or directory.
 in randrwrap.c
(gdb) bt
#0 rw_mode_get_width (mode=0x3) at randrwrap.c:1104
#1 0x0804d62b in rebuild_gui (app=0x807a0f0) at xrandr-capplet.c:525
#2 0x0804f1ae in run_application (app=0x807a0f0) at xrandr-capplet.c:1755
#3 0x0804f83c in main (argc=1, argv=0xbfbd3184) at xrandr-capplet.c:1799
(gdb)

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for the extra informations. Could you get the stacktrace using "thread apply all bt full"? The mode value is weird, maybe a valgrind log (https://wiki.ubuntu.com/Valgrind) would be useful there

Changed in gnome-control-center:
status: Incomplete → New
Revision history for this message
Yuki Izumi (kivikakk) wrote :

No problems. Here's the extra back trace info. I'll run it with valgrind next.

(gdb) thread apply all bt full

Thread 1 (Thread 0xb6d5f720 (LWP 11066)):
#0 rw_mode_get_width (mode=0x3) at randrwrap.c:1104
 __PRETTY_FUNCTION__ = "rw_mode_get_width"
#1 0x0804d62b in rebuild_gui (app=0x807a0f0) at xrandr-capplet.c:525
 sensitive = 0
 __PRETTY_FUNCTION__ = "rebuild_gui"
#2 0x0804f1ae in run_application (app=0x807a0f0) at xrandr-capplet.c:1755
 xml = <value optimized out>
 align = (GtkWidget *) 0x8077078
 major = 1
 minor = 2
 event_base = 115
 error_base = 186
 display = <value optimized out>
 xdisplay = <value optimized out>
 __PRETTY_FUNCTION__ = "run_application"
#3 0x0804f83c in main (argc=1, argv=0xbfc68a14) at xrandr-capplet.c:1799
No locals.
(gdb)

Revision history for this message
Yuki Izumi (kivikakk) wrote :

Valgrind log attached! Looks painful.

Revision history for this message
Sebastien Bacher (seb128) wrote :

the valgrind log shows this error

==11339== Invalid read of size 4
==11339== at 0x4073229: rw_mode_get_width (randrwrap.c:1104)
==11339== by 0x804D62A: rebuild_gui (xrandr-capplet.c:525)
==11339== by 0x804F1AD: run_application (xrandr-capplet.c:1755)
==11339== by 0x804F83B: main (xrandr-capplet.c:1799)
==11339== Address 0xf is not stack'd, malloc'd or (recently) free'd

Changed in gnome-control-center:
status: New → Confirmed
Revision history for this message
James Westby (james-w) wrote :

Hi,

We have found what could possibly be the problem, and I
have prepared some packages with a patch for that. They
also are compiled with no optimisation and unstripped, so
they will give us some more information for debugging if
they do not fix the problem.

Could you please install

  http://jameswestby.net/scratch/gnome-control-center_2.22.1-0ubuntu3+test1_i386.deb
  http://jameswestby.net/scratch/capplets-data_2.22.1-0ubuntu3+test1_all.deb
  http://jameswestby.net/scratch/libgnome-window-settings1_2.22.1-0ubuntu3+test1_i386.deb

and test them. If you still see a problem then please again provide a stacktrace with gdb
and a valgrind log.

Thanks,

James

Revision history for this message
Yuki Izumi (kivikakk) wrote :

Perfect!

Well, almost. No screens appear - I believe this is because I also *happen* to be suffering from (proposed) bug 216696 - i.e. X detects no monitors as being available. I'm hoping it's not a complicating factor.

Either way, given these packages gnome-display-properties no longer crashes, and appears to work fine (given the situation).

Thank you! :)

Revision history for this message
Sebastien Bacher (seb128) wrote :

could you run it under valgrind and attach the log? the fact that it's not crashing doesn't mean everything has been fixed and having a log would be nice to see if there is still some error there

Revision history for this message
James Westby (james-w) wrote : Re: [Bug 216676] Re: gnome-display-properties crashed on opening with SIGSEGV in rw_mode_get_width()

On Mon, 2008-04-14 at 11:58 +0000, Arlen Christian Mart Cuss wrote:
> Perfect!
>
> Well, almost. No screens appear - I believe this is because I also
> *happen* to be suffering from (proposed) bug 216696 - i.e. X detects no
> monitors as being available. I'm hoping it's not a complicating factor.
>
> Either way, given these packages gnome-display-properties no longer
> crashes, and appears to work fine (given the situation).

Great, thanks for testing. It sounds as though you are suffering from
the exact problem that would trigger this bug.

However, there is a chance that the changes that were made to ease
debugging have actually masked the issue.

The change seems like a good one to have anyway, and we have a couple
of fixes pending for this package, so we will upload a new package
today, and it would be great if you could test that and confirm
that it still works. You'll see when the upload is done, as it will
close this bug report. A short while after that the packages will
be available. Note that using archive.ubuntu.com may be better here,
as you may be using a mirror that is slower to update.

If you could test the packages, and then confirm here that they work
that would be fantastic. If the problem re-appears could you please
re-open the bug (set the status back to "New") so that it is clear
to everyone that it needs work.

Thanks,

James

Revision history for this message
Yuki Izumi (kivikakk) wrote :

Of course, my apologies.

Arlen

Revision history for this message
Yuki Izumi (kivikakk) wrote : Re: [Bug 216676] Re: gnome-display-properties crashed on opening with SIGSEGV in rw_mode_get_width()

Hi,

On Mon, Apr 14, 2008 at 10:29 PM, James Westby
<<email address hidden><jw%<email address hidden>>>
wrote:

> If you could test the packages, and then confirm here that they work
> that would be fantastic. If the problem re-appears could you please
> re-open the bug (set the status back to "New") so that it is clear
> to everyone that it needs work.

No problems! I'll look out for it then.

Cheers,
Arlen

Revision history for this message
Sebastien Bacher (seb128) wrote :

no need to apology you didn't do anything wrong, thanks for the updated log there is no error, let's see how the new revision will work once in hardy

Revision history for this message
James Westby (james-w) wrote : Re: [Bug 216676] Re: gnome-display-properties crashed on opening with SIGSEGV in rw_mode_get_width()

On Mon, 2008-04-14 at 12:47 +0000, Arlen Christian Mart Cuss wrote:
> No problems! I'll look out for it then.

Hi,

Just a warning that I made a mistake when choosing the version number
for the .debs that you installed to test. This means that apt won't
think that there is a new version available when the new upload is
made shortly.

You can work around this by download those three packages from
archive.ubuntu.com directly and installing them that way. After
that everything will work as normal again.

If you wish then I can provide you with direct links to the packages
once they have been uploaded.

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: Confirmed → Fix Released
Revision history for this message
Yuki Izumi (kivikakk) wrote :

No problems with 1:2.22.1-0ubuntu3.

Thanks a lot, guys!

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.