Bug 513014

Summary: g-p-m crashes when running without battery
Product: [Fedora] Fedora Reporter: Michael Monreal <michael.monreal>
Component: gnome-power-managerAssignee: Richard Hughes <richard>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 11CC: rhughes, richard, thomas.mey
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 010-0.3.20090810git.fc11 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-04-27 16:33:30 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
bug-buddy report none

Description Michael Monreal 2009-07-21 16:46:50 UTC
Created attachment 354521 [details]
bug-buddy report

After the last round of updates (g-p-m, devicekit, ...) a few days ago, gnome-power-manager has started crashing.

Attaching the report from bug-buddy

Comment 1 Richard Hughes 2009-07-21 16:57:52 UTC
Is this 64 bit, and just coming up to be 100% charged?

Comment 2 Michael Monreal 2009-07-22 16:54:08 UTC
No it's a 32bit installation. Girlfriend says it happens every time she connects to the network at the beginning of each session.

Not sure about the charge percentage but she usually has AC plugged, so the battery is probably at 99% when she powers on.

Comment 3 Michael Monreal 2009-07-22 17:00:02 UTC
I have to correct myself here: girlfriend tells me she does *not* have a battery inserted atm, so no charge percentage at all.

Comment 4 Michael Monreal 2009-07-22 17:07:44 UTC
Hey... I can reproduce the problem on my laptop now... all I needed to do is taking out the battery. Both are Lenovo laptops but different models (n200 and g530)

Comment 5 Richard Hughes 2009-07-22 17:15:51 UTC
Good that you can reproduce (just don't tell your girlfriend that...) anyway -- could you get me a backtrace of /usr/bin/gnome-power-manager when that happens please? You'll need to install the correct debuginfos. Thanks.

Comment 6 Michael Monreal 2009-07-22 19:35:18 UTC
Hope this helps:

Program received signal SIGSEGV, Segmentation fault.
gpm_engine_get_warning (engine=0x87ff950, obj=0x0) at gpm-engine.c:168
168		if (obj->type == DKP_DEVICE_TYPE_MOUSE ||
(gdb) bt
#0  gpm_engine_get_warning (engine=0x87ff950, obj=0x0) at gpm-engine.c:168
#1  0x08069205 in gpm_engine_device_changed_cb (client=0x87fdad8, 
    device=0x882ef18, engine=0x87ff950) at gpm-engine.c:609
#2  0x0045a1c8 in IA__g_cclosure_marshal_VOID__POINTER (closure=0x8874de0, 
    return_value=0x0, n_param_values=2, param_values=0x887a878, 
    invocation_hint=0xbfe6d5e0, marshal_data=0x80691c0) at gmarshal.c:601
#3  0x0044d332 in IA__g_closure_invoke (closure=0x8874de0, return_value=0x0, 
    n_param_values=2, param_values=0x887a878, invocation_hint=0xbfe6d5e0)
    at gclosure.c:767
#4  0x004629a8 in signal_emit_unlocked_R (node=<value optimized out>, 
    detail=<value optimized out>, instance=0x87fdad8, emission_return=0x0, 
    instance_and_params=0x887a878) at gsignal.c:3247
#5  0x00463d1d in IA__g_signal_emit_valist (instance=0x87fdad8, signal_id=161, 
    detail=0, var_args=0xbfe6d7a0 "tFH") at gsignal.c:2980
#6  0x004641a6 in IA__g_signal_emit (instance=0x87fdad8, signal_id=161, 
    detail=0) at gsignal.c:3037
#7  0x0806eb21 in dkp_device_changed_cb (proxy=0x886e480, 
    object_path=0x88492a8 "/org/freedesktop/DeviceKit/Power/devices/battery_BAT1", client=0x87fdad8) at dkp-client.c:364
#8  0x0045a3d8 in IA__g_cclosure_marshal_VOID__STRING (closure=0x8872d20, 
    return_value=0x0, n_param_values=2, param_values=0x88716f0, 
    invocation_hint=0xbfe6d960, marshal_data=0x806ead0) at gmarshal.c:496
#9  0x008fe6d4 in marshal_dbus_message_to_g_marshaller (closure=0x8872d20, 
---Type <return> to continue, or q <return> to quit---
    return_value=0x0, n_param_values=3, param_values=0x87ffe60, 
    invocation_hint=0xbfe6d960, marshal_data=0x0) at dbus-gproxy.c:1673
#10 0x0044d332 in IA__g_closure_invoke (closure=0x8872d20, return_value=0x0, 
    n_param_values=3, param_values=0x87ffe60, invocation_hint=0xbfe6d960)
    at gclosure.c:767
#11 0x004629a8 in signal_emit_unlocked_R (node=<value optimized out>, 
    detail=<value optimized out>, instance=0x886e480, emission_return=0x0, 
    instance_and_params=0x87ffe60) at gsignal.c:3247
#12 0x00463d1d in IA__g_signal_emit_valist (instance=0x886e480, signal_id=146, 
    detail=738, var_args=0xbfe6db24 "\364_v") at gsignal.c:2980
#13 0x004641a6 in IA__g_signal_emit (instance=0x886e480, signal_id=146, 
    detail=738) at gsignal.c:3037
#14 0x008ff8e5 in dbus_g_proxy_emit_remote_signal (
    message=<value optimized out>, proxy=<value optimized out>)
    at dbus-gproxy.c:1726
#15 dbus_g_proxy_manager_filter (message=<value optimized out>, 
    proxy=<value optimized out>) at dbus-gproxy.c:1293
#16 0x0073595d in dbus_connection_dispatch (connection=0x88301e8)
    at dbus-connection.c:4406
#17 0x008f619d in message_queue_dispatch (source=0x8831b70, callback=0, 
    user_data=0x0) at dbus-gmain.c:101
#18 0x00398d78 in g_main_dispatch (context=<value optimized out>)
    at gmain.c:1814
---Type <return> to continue, or q <return> to quit---
#19 IA__g_main_context_dispatch (context=<value optimized out>) at gmain.c:2367
#20 0x0039c310 in g_main_context_iterate (context=0x8802010, 
    block=<value optimized out>, dispatch=1, self=0x87da560) at gmain.c:2445
#21 0x0039c77f in IA__g_main_loop_run (loop=0x8833e78) at gmain.c:2653
#22 0x0805d568 in main (argc=1, argv=0xbfe6df84) at gpm-main.c:261

Comment 7 Richard Hughes 2009-07-22 21:47:16 UTC
Great backtrace, thanks. I'll look at the backport, but this should already solved upstream. You can get the latest 2.27 code for F11 here: http://koji.fedoraproject.org/koji/taskinfo?taskID=1490592

I'll look at a f11 patch for your backtrace tomorrow.

Comment 8 Thomas Meyer 2009-07-24 17:02:30 UTC
Same here on my macbook. when i remove the battery while gnome is up and i'm logged in as user then gnomer power manager crashes. Maybe somebody could change the title of this bug to "gnome-power-manager crahses after battery removal" or something like this.

Comment 9 Michael Monreal 2009-07-27 11:18:48 UTC
Richard, I just installed gnome-power-manager-2.27.3-0.1.20090721git.fc12.i686 on my F11 installation. I can confirm that it no longer crashes.

Instead, it shows a battery icon with 0% charge (note: no battery present in laptop) in both GDM and the tray which just vanishes after about a minute. This seems to be exactly the same time when gnome-power-manager used to crash with g-p-m 2.26.x, so this still seems to be related somehow (or would this not happen if I had F12-ish kernel/devicekit/something?).

Comment 10 Michael Monreal 2009-08-09 18:26:15 UTC
gnome-power-manager-2.26.4-1.fc11 from the testing repo as well as the latest "unofficial" devicekit-power build for F11 (the 0.10.x one) seem to also fix this bug. Without the new devicekit, this g-p-m build acted weird btw. Any change we will see devicekit-power 0.10.x pushed to F11 stable?

Comment 11 Richard Hughes 2009-08-10 10:48:05 UTC
Built as http://koji.fedoraproject.org/koji/taskinfo?taskID=1594332, I'll add to bodhi now.

Comment 12 Fedora Update System 2009-08-10 10:51:27 UTC
DeviceKit-power-010-0.3.20090810git.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/DeviceKit-power-010-0.3.20090810git.fc11

Comment 13 Michael Monreal 2009-08-10 11:46:28 UTC
Looks like this has regressed yet again. I have double and tripple checked this:

DeviceKit-power-010-0.2.20090721git.fc11.i586.rpm -> Works
- shows a "running on ac" icon for about a minute even when tray icon is set to only show if battery is present, then hides it

DeviceKit-power-010-0.3.20090810git.fc11.i586 -> Crashes
- shows a "running on ac" icon for about a minute even when tray icon is set to only show if battery is present, then crashes


I'm running gnome-power-manager-2.26.4-1.fc11.i586 from updates-testing btw, please tell me if I should revert to the latest released one.

Comment 14 Richard Hughes 2009-08-10 11:52:32 UTC
(In reply to comment #13)
> DeviceKit-power-010-0.3.20090810git.fc11.i586 -> Crashes
> - shows a "running on ac" icon for about a minute even when tray icon is set to
> only show if battery is present, then crashes

Same backtrace as before?

Comment 15 Michael Monreal 2009-08-10 12:36:21 UTC
(In reply to comment #14)
> Same backtrace as before?  

Eh... no:

Program received signal SIGSEGV, Segmentation fault.
0x08068f13 in g_strcmp0 () at gtestutils.c:1410
1410	{
(gdb) bt
#0  0x08068f13 in g_strcmp0 () at gtestutils.c:1410
#1  0x08069395 in g_strcmp0 () at gtestutils.c:1410
#2  0x0037a1c8 in IA__g_cclosure_marshal_VOID__POINTER (closure=0x87c73d8, 
    return_value=0x0, n_param_values=2, param_values=0x87cb118, 
    invocation_hint=0xbfb33960, marshal_data=0x8069350) at gmarshal.c:601
#3  0x0036d332 in IA__g_closure_invoke (closure=0x87c73d8, return_value=0x0, 
    n_param_values=2, param_values=0x87cb118, invocation_hint=0xbfb33960)
    at gclosure.c:767
#4  0x003829a8 in signal_emit_unlocked_R (node=<value optimized out>, 
    detail=<value optimized out>, instance=0x8751ad8, emission_return=0x0, 
    instance_and_params=0x87cb118) at gsignal.c:3247
#5  0x00383d1d in IA__g_signal_emit_valist (instance=0x8751ad8, signal_id=161, 
    detail=0, var_args=0xbfb33b20 "tF:") at gsignal.c:2980
#6  0x003841a6 in IA__g_signal_emit (instance=0x8751ad8, signal_id=161, 
    detail=0) at gsignal.c:3037
#7  0x0806ecd1 in ?? ()
#8  0x0037a3d8 in IA__g_cclosure_marshal_VOID__STRING (closure=0x87c5048, 
    return_value=0x0, n_param_values=2, param_values=0x8803488, 
    invocation_hint=0xbfb33ce0, marshal_data=0x806ec80) at gmarshal.c:496
#9  0x003ef6d4 in marshal_dbus_message_to_g_marshaller (closure=0x87c5048, 
    return_value=0x0, n_param_values=3, param_values=0x8753ce0, 
    invocation_hint=0xbfb33ce0, marshal_data=0x0) at dbus-gproxy.c:1673
#10 0x0036d332 in IA__g_closure_invoke (closure=0x87c5048, return_value=0x0, 
---Type <return> to continue, or q <return> to quit---
    n_param_values=3, param_values=0x8753ce0, invocation_hint=0xbfb33ce0)
    at gclosure.c:767
#11 0x003829a8 in signal_emit_unlocked_R (node=<value optimized out>, 
    detail=<value optimized out>, instance=0x87c2880, emission_return=0x0, 
    instance_and_params=0x8753ce0) at gsignal.c:3247
#12 0x00383d1d in IA__g_signal_emit_valist (instance=0x87c2880, signal_id=146, 
    detail=738, var_args=0xbfb33ea4 "\364_v") at gsignal.c:2980
#13 0x003841a6 in IA__g_signal_emit (instance=0x87c2880, signal_id=146, 
    detail=738) at gsignal.c:3037
#14 0x003f08e5 in dbus_g_proxy_emit_remote_signal (
    message=<value optimized out>, proxy=<value optimized out>)
    at dbus-gproxy.c:1726
#15 dbus_g_proxy_manager_filter (message=<value optimized out>, 
    proxy=<value optimized out>) at dbus-gproxy.c:1293
#16 0x0073587d in dbus_connection_dispatch (connection=0x87841e8)
    at dbus-connection.c:4406
#17 0x003e719d in message_queue_dispatch (source=0x8785b70, callback=0, 
    user_data=0x0) at dbus-gmain.c:101
#18 0x0680ecf8 in g_main_dispatch (context=<value optimized out>)
    at gmain.c:1824
#19 IA__g_main_context_dispatch (context=<value optimized out>) at gmain.c:2377
#20 0x06812370 in g_main_context_iterate (context=0x8756010, 
    block=<value optimized out>, dispatch=1, self=0x872e560) at gmain.c:2455
---Type <return> to continue, or q <return> to quit---
#21 0x068127df in IA__g_main_loop_run (loop=0x8787e78) at gmain.c:2663
#22 0x0805d528 in g_strcmp0 () at gtestutils.c:1410
#23 0x00178a66 in __libc_start_main (main=0x805cf20 <g_strcmp0+64772>, argc=1, 
    ubp_av=0xbfb34304, init=0x8073d50, fini=0x8073d40, 
    rtld_fini=0x14e030 <_dl_fini>, stack_end=0xbfb342fc) at libc-start.c:220
#24 0x0804d251 in g_strcmp0 () at gtestutils.c:1410


Some debug info seems to be missing, but I used debuginfo-install gnome-power-manager-2.26.4-1.fc11.i586

Comment 16 Fedora Update System 2009-08-10 21:45:17 UTC
DeviceKit-power-010-0.3.20090810git.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update DeviceKit-power'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-8422

Comment 17 Fedora Update System 2009-08-20 21:02:20 UTC
DeviceKit-power-010-0.3.20090810git.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 18 Michael Monreal 2009-08-21 07:37:53 UTC
I'm sure the crash from comment 15 has not fixed itself magically in this package? In that case the bug is still not fixed...

Comment 19 Michael Monreal 2009-08-26 17:12:18 UTC
Trying to reopen as I now had the chance to update to the latest DeviceKit-power and gnome-power-manager from -updates and I can 100% confirm the same problem still occurs.

Comment 20 Richard Hughes 2009-10-14 10:39:07 UTC
Right, I've fixed this in the F12 packages, as I ended up re-writing a lot of the hotplug code in DeviceKit-power to be more sane. Could you please verify the F12 packages work as expected, and then I'll start work on backporting the fixes for F11. Thanks.

Comment 21 Michael Monreal 2009-10-14 19:49:32 UTC
With today's rawhide on as liveusb (g-p-m 2.28.0.1.20090914git, d-k-p 011-0.1.20090914git) everything seems to work fine, thanks a lot.

Comment 22 Bug Zapper 2010-04-27 15:49:55 UTC
This message is a reminder that Fedora 11 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 11.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '11'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 11's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 11 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 23 Michael Monreal 2010-04-27 16:33:30 UTC
I think this can be closed safely. Not sure if it was fixed in F11 but it works in F12 and F13