Bug 608402 - The program 'gnome-power-manager' received an X Window System error.
Summary: The program 'gnome-power-manager' received an X Window System error.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: gnome-power-manager
Version: 14
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Richard Hughes
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 607008 621596 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-06-27 10:29 UTC by ritz
Modified: 2010-08-24 21:38 UTC (History)
4 users (show)

Fixed In Version: gnome-power-manager-2.31.90-3.fc14
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-08-24 01:55:29 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
output of 'bt full' (12.79 KB, text/plain)
2010-08-14 05:42 UTC, Will Woods
no flags Details
gnome-power-bugreport.sh output (3.82 KB, text/plain)
2010-08-14 05:45 UTC, Will Woods
no flags Details
gnome-power-manager-2.31.6-backlight-is-None.patch (666 bytes, patch)
2010-08-16 00:19 UTC, Will Woods
no flags Details | Diff

Description ritz 2010-06-27 10:29:54 UTC
Description of problem:
gpm crashes on startup

Version-Release number of selected component (if applicable):
gnome-power-manager-2.31.3-1.fc14.x86_64

How reproducible:
always


Additional info:
$ gnome-power-bugreport.sh 
Distro version:       Fedora release 14 (Rawhide)
Kernel version:       2.6.34-45.fc14.x86_64
g-p-m version:        2.31.3
HAL version:          0.5.14
System manufacturer:  missing
System version:       missing
System product:       missing
AC adapter present:   yes
Battery present:      yes
Laptop panel present: yes
CPU scaling present:  no

bt -
Gtk-Message: Failed to load module "pk-gtk-module": libpk-gtk-module.so: cannot open shared object file: No such file or directory
[New Thread 0x7ffff0a6f710 (LWP 2477)]

(gnome-power-manager:2474): GLib-GObject-WARNING **: gsignal.c:2276: signal `proxy-status' is invalid for instance `0x6b7260'
Detaching after fork from child process 2479.
The program 'gnome-power-manager' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadAtom (invalid Atom parameter)'.
  (Details: serial 171 error_code 5 request_code 148 minor_code 15)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)

(gdb) bt
#0  0x00000030646aa420 in _exit () from /lib64/libc.so.6
#1  0x0000003064636f52 in exit () from /lib64/libc.so.6
#2  0x00000037df867fcf in ?? () from /usr/lib64/libgdk-x11-3.0.so.0
#3  0x0000003067e46da4 in _XError () from /usr/lib64/libX11.so.6
#4  0x0000003067e4d277 in ?? () from /usr/lib64/libX11.so.6
#5  0x0000003067e4d983 in _XReply () from /usr/lib64/libX11.so.6
#6  0x000000306aa051bc in XRRGetOutputProperty () from /usr/lib64/libXrandr.so.2
#7  0x0000000000419e0a in ?? ()
#8  0x000000000041a330 in ?? ()
#9  0x000000000041aa4a in ?? ()
#10 0x0000000000409ba9 in ?? ()
#11 0x00007ffff7873915 in g_type_create_instance (type=<value optimized out>) at gtype.c:1888
#12 0x00007ffff785669c in g_object_constructor (type=<value optimized out>, n_construct_properties=0, construct_params=0x0)
    at gobject.c:1483
#13 0x00007ffff785796a in g_object_newv (object_type=7159312, n_parameters=0, parameters=0x0) at gobject.c:1267
#14 0x00007ffff785819c in g_object_new (object_type=7159312, first_property_name=0x0) at gobject.c:1179
#15 0x000000000040d912 in ?? ()
#16 0x00007ffff7873915 in g_type_create_instance (type=<value optimized out>) at gtype.c:1888
#17 0x00007ffff785669c in g_object_constructor (type=<value optimized out>, n_construct_properties=0, construct_params=0x0)
    at gobject.c:1483
#18 0x00007ffff785796a in g_object_newv (object_type=7025504, n_parameters=0, parameters=0x0) at gobject.c:1267
#19 0x00007ffff785819c in g_object_new (object_type=7025504, first_property_name=0x0) at gobject.c:1179
#20 0x000000000040d312 in ?? ()
#21 0x000000000040ce7c in ?? ()
#22 0x000000306461ed6d in __libc_start_main () from /lib64/libc.so.6

Comment 1 Richard Hughes 2010-06-27 12:42:19 UTC
Your backtrace is meanlingless. You need to install the debuginfo packages.

Comment 2 ritz 2010-07-13 08:28:52 UTC
Breakpoint 1, 0x0000003b500aa260 in _exit () from /lib64/libc.so.6
(gdb) bt
#0  0x0000003b500aa260 in _exit () from /lib64/libc.so.6
#1  0x0000003b50036f12 in exit () from /lib64/libc.so.6
#2  0x0000003423c65cff in ?? () from /usr/lib64/libgdk-x11-3.0.so.0
#3  0x0000003b53c46da4 in _XError () from /usr/lib64/libX11.so.6
#4  0x0000003b53c4d277 in ?? () from /usr/lib64/libX11.so.6
#5  0x0000003b53c4d983 in _XReply () from /usr/lib64/libX11.so.6
#6  0x0000003b584051bc in XRRGetOutputProperty ()
   from /usr/lib64/libXrandr.so.2
#7  0x000000000041c25a in gpm_brightness_output_get_internal (brightness=
    0x6d5180, output=81, cur=0x7fffffffd644) at gpm-brightness.c:178
#8  0x000000000041c780 in gpm_brightness_output_get_percentage (brightness=
    0x6d5180, op=<value optimized out>) at gpm-brightness.c:323
#9  gpm_brightness_foreach_resource (brightness=0x6d5180, 
    op=<value optimized out>) at gpm-brightness.c:489
#10 gpm_brightness_foreach_screen (brightness=0x6d5180, 
    op=<value optimized out>) at gpm-brightness.c:526
#11 0x000000000041ce9a in gpm_brightness_get (brightness=0x6d5180, percentage=
    0x7fffffffd6d4) at gpm-brightness.c:633
#12 0x000000000040c349 in gpm_backlight_brightness_evaluate_and_set (backlight=
    0x665a80, interactive=0) at gpm-backlight.c:342
#13 0x0000003b52430915 in g_type_create_instance ()
   from /lib64/libgobject-2.0.so.0
#14 0x0000003b5241369c in ?? () from /lib64/libgobject-2.0.so.0
---Type <return> to continue, or q <return> to quit---fram 7
#15 0x0000003b5241496a in g_object_newv () from /lib64/libgobject-2.0.so.0
#16 0x0000003b5241519c in g_object_new () from /lib64/libgobject-2.0.so.0
#17 0x000000000041033b in gpm_manager_init (manager=0x673440)
    at gpm-manager.c:1985
#18 0x0000003b52430915 in g_type_create_instance ()
   from /lib64/libgobject-2.0.so.0
#19 0x0000003b5241369c in ?? () from /lib64/libgobject-2.0.so.0
#20 0x0000003b5241496a in g_object_newv () from /lib64/libgobject-2.0.so.0
#21 0x0000003b5241519c in g_object_new () from /lib64/libgobject-2.0.so.0
#22 0x000000000040fa82 in gpm_manager_new () at gpm-manager.c:2104
#23 0x000000000040f5ec in main (argc=1, argv=0x7fffffffe208) at gpm-main.c:248
(gdb) fram 7
#7  0x000000000041c25a in gpm_brightness_output_get_internal (brightness=
    0x6d5180, output=81, cur=0x7fffffffd644) at gpm-brightness.c:178
178		if (XRRGetOutputProperty (brightness->priv->dpy, output, brightness->priv->backlight,
(gdb) list
173		int actual_format;
174		gboolean ret = FALSE;
175	
176		g_return_val_if_fail (GPM_IS_BRIGHTNESS (brightness), FALSE);
177	
178		if (XRRGetOutputProperty (brightness->priv->dpy, output, brightness->priv->backlight,
179					  0, 4, False, False, None,
180					  &actual_type, &actual_format,
181					  &nitems, &bytes_after, ((unsigned char **)&prop)) != Success) {
182			egg_debug ("failed to get property");
(gdb) p *brightness
$1 = {parent = {g_type_instance = {g_class = 0x69ac70}, ref_count = 1, qdata = 
    0x7fffec0018a0}, priv = 0x6d51a0}
(gdb) p *(brightness->priv)
$2 = {has_changed_events = 0, cache_trusted = 0, cache_percentage = 0, 
  last_set_hw = 0, backlight = 0, dpy = 0x653e00, root_window = 0x669030, 
  shared_value = 0, has_extension = 0, has_randr13 = 1, hw_changed = 0, 
  resources = 0x7fffec001900, extension_levels = 10, extension_current = 0}
(gdb) p *(brightness->priv->dpy)
$3 = <incomplete type>
(gdb) p *(brightness->priv->backlight)
Cannot access memory at address 0x0

Comment 3 Bug Zapper 2010-07-30 12:15:38 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 14 development cycle.
Changing version to '14'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 4 Will Woods 2010-08-14 05:42:44 UTC
Created attachment 438783 [details]
output of 'bt full'

Reproducible here (New 13" Macbook Pro [7,1]). Backtrace goes through gpm_brightness_output_get_internal in about the same way.

Comment 5 Will Woods 2010-08-14 05:45:47 UTC
Created attachment 438784 [details]
gnome-power-bugreport.sh output

Comment 6 Will Woods 2010-08-16 00:19:45 UTC
Created attachment 438871 [details]
gnome-power-manager-2.31.6-backlight-is-None.patch

The problem (at least for my machine) is that some part of the system (upower? kernel? who knows) doesn't know how to deal with the backlight brightness. So gpm_backlight_init does:
  backlight->priv->brightness = gpm_brightness_new ();
which sets backlight->priv->brightness to 0 (i.e. None). So when we get to gpm_backlight_brightness_evaluate_and_set(), we end up trying to read the X property for something that's None, and X barfs at us, and gpm crashes.

Okay. So. Adding a nice simple check to gpm_brightness_output_get_internal():

        if (brightness->priv->backlight == None)
                return FALSE;

lets gpm at least start up and run without crashing. Brightness control obviously isn't working, and it doesn't think I have a lid on my laptop, but at least we're not crashing.

Comment 7 Fedora Update System 2010-08-23 19:20:54 UTC
gnome-power-manager-2.31.90-3.fc14 has been submitted as an update for Fedora 14.
http://admin.fedoraproject.org/updates/gnome-power-manager-2.31.90-3.fc14

Comment 8 Matthias Clasen 2010-08-23 19:23:31 UTC
*** Bug 607008 has been marked as a duplicate of this bug. ***

Comment 9 Fedora Update System 2010-08-24 01:55:17 UTC
gnome-power-manager-2.31.90-3.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Will Woods 2010-08-24 21:38:51 UTC
*** Bug 621596 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.