Bug 627315

Summary: g-p-m hangs
Product: [Fedora] Fedora Reporter: ritz <rkhadgar>
Component: gnome-power-managerAssignee: Richard Hughes <rhughes>
Status: CLOSED WORKSFORME QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 14CC: mclasen, rhughes
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-10-23 21:56:56 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description ritz 2010-08-25 12:37:26 EDT
Description of problem:
g-p-m hangs. most likely a polkit issue 

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

How reproducible:
frequent

Steps to Reproduce:
1. n/a
  
Actual results:
hangs

Expected results:
not to hang

Additional info:
g-p-m trace
(gdb) bt
#0  0x000000352b00ef1e in waitpid () from /lib64/libpthread.so.0
#1  0x00000031dc083549 in g_spawn_sync () from /lib64/libglib-2.0.so.0
#2  0x00000031dc083a89 in g_spawn_command_line_sync ()
   from /lib64/libglib-2.0.so.0
#3  0x000000000040f8d0 in ?? ()
#4  0x0000000000410daa in gpm_brightness_set ()
#5  0x000000000040bf82 in ?? ()
#6  0x00000031dc80dcae in g_closure_invoke () from /lib64/libgobject-2.0.so.0
#7  0x00000031dc81f73a in ?? () from /lib64/libgobject-2.0.so.0
#8  0x00000031dc82927a in g_signal_emit_valist ()


$ ps aux|grep power
root      1353  0.0  0.1 144712  4648 ?        Sl   Aug24   0:12 /usr/libexec/upowerd
ritz      1558  0.0  0.4 413028 12352 ?        S    Aug24   0:07 gnome-power-manager
root     11251  0.0  0.0 116752  2564 ?        tl   13:12   0:00 pkexec /usr/sbin/gnome-power-backlight-helper --set-brightness 0
ritz     24294  0.0  0.0 103404   952 pts/7    S+   21:31   0:00 grep --color=auto power


from var log messages ( seems to be from login screen )
Aug 24 14:25:18 localhost kernel: type=1400 audit(1282640118.912:4): avc:  denied  { write } for  pid=1397 comm="gnome-power-bac" name="brightness" dev=sysfs ino=14975 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:sysfs_t:s0 tclass=file

last action visible action
/var/log/secure:Aug 25 12:01:04 localhost pkexec[9409]: ritz: Executing command [USER=root] [TTY=unknown] [CWD=/home/ritz] [COMMAND=/usr/sbin/gnome-power-backlight-helper --set-brightness 4] 


gdb for plexec
Attaching to program: /usr/bin/pkexec, process 11251
Cannot access memory at address 0x7274735f67007471
Cannot access memory at address 0x7274735f67007471
Cannot access memory at address 0x7274735f67007471
Cannot access memory at address 0x7274735f67007471

Reading symbols from /lib64/ld-linux-x86-64.so.2...Reading symbols from /usr/lib/debug/lib64/ld-2.12.90.so.debug...done.
done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
Cannot access memory at address 0x7274735f67007471
0x000000352a8dd7a9 in ?? ()
(gdb) bt
#0  0x000000352a8dd7a9 in ?? ()
#1  0x00000031dc018f8c in ?? ()
#2  0x00007ffff92d9548 in ?? ()
#3  0x0000003100000007 in ?? ()
#4  0x00007f0e4402ec30 in ?? ()
#5  0x00007ffff92d9570 in ?? ()
#6  0x0000000000000076 in ?? ()
#7  0x00000031dc079629 in ?? ()
#8  0x00007ffff92d9548 in ?? ()
#9  0x00000031dc073a94 in ?? ()
#10 0x00007ffff92d9548 in ?? ()
#11 0x00007f0e4402ec30 in ?? ()
#12 0x00007ffff92d9548 in ?? ()
#13 0x00000031dc078354 in ?? ()
#14 0x00000032650e230d in ?? ()
---Type <return> to continue, or q <return> to quit---
#15 0x000000352ab99180 in ?? ()
#16 0x0000000000000010 in ?? ()
#17 0x00000031dc0e3bcf in ?? ()
#18 0x00000032650e230d in ?? ()
#19 0x0000000002533cc2 in ?? ()
#20 0x0000000002533cc1 in ?? ()
#21 0x0000000002533cc1 in ?? ()
#22 0x0000000002533cc1 in ?? ()
#23 0x00000031dc018f4a in ?? ()
#24 0x00000032650e230d in ?? ()
#25 0x00000031dc019065 in ?? ()
#26 0x0000000002522260 in ?? ()
#27 0x0000000002522260 in ?? ()
#28 0x0000000000000000 in ?? ()
Comment 1 Matthias Clasen 2010-08-27 16:17:17 EDT
if you think this is a polkit issue, you should tell us what version of polkit you have installed.
Comment 2 ritz 2010-08-30 14:01:08 EDT
mea culpa.

polkit-0.98-1.fc14.x86_64
Comment 3 Matthias Clasen 2010-09-01 16:16:34 EDT
Does gnome-power-backlight-helper hang if you run it as root, like this ?

/usr/sbin/gnome-power-backlight-helper --set-brightness 4
Comment 5 ritz 2010-09-09 06:28:03 EDT
on subsequent run. I do something interesting. gpm helper app crashes.


# pkexec /usr/sbin/gnome-power-backlight-helper  --set-brightness 5
**
GLib:ERROR:gvarianttypeinfo.c:186:g_variant_type_info_check: assertion failed: (0 <= index && index < 24)
Aborted (core dumped)
Comment 6 Richard Hughes 2010-09-23 04:55:31 EDT
(In reply to comment #5)
> # pkexec /usr/sbin/gnome-power-backlight-helper  --set-brightness 5
> **
> GLib:ERROR:gvarianttypeinfo.c:186:g_variant_type_info_check: assertion failed:
> (0 <= index && index < 24)
> Aborted (core dumped)

What version glib2? Does this still happen with a fully up to date F14 system?
Comment 7 ritz 2010-10-23 21:56:56 EDT
Not reproducible any further.