Bug 89514 - upower: g_variant_unref(): upower killed by SIGSEGV
Summary: upower: g_variant_unref(): upower killed by SIGSEGV
Status: RESOLVED DUPLICATE of bug 89476
Alias: None
Product: upower
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Richard Hughes
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-10 11:19 UTC by Wolfgang Ulbrich
Modified: 2015-03-13 12:21 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
fixes upower statistics (839 bytes, patch)
2015-03-10 11:29 UTC, Wolfgang Ulbrich
Details | Splinter Review

Description Wolfgang Ulbrich 2015-03-10 11:19:27 UTC
upower --monitor-detail crashed for browsing battery statistics.
This gdb is from fedora 21 with upower-0.99.2-1.fc21

(gdb) run --monitor-detail
Starting program: /usr/bin/upower --monitor-detail
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7fffef671700 (LWP 19275)]
Monitoring activity from the power daemon. Press Ctrl+C to cancel.
[10:56:17.169]	device changed:     /org/freedesktop/UPower/devices/ups_hiddev0

Program received signal SIGSEGV, Segmentation fault.
g_variant_unref (value=0x7ffff7bd0800) at gvariant-core.c:627
627	  if (g_atomic_int_dec_and_test (&value->ref_count))
(gdb) bt
#0  0x00007ffff76b05f4 in g_variant_unref (value=0x7ffff7bd0800) at gvariant-core.c:627
#1  0x00007ffff7bc49d6 in up_device_get_history_sync (device=device@entry=0x613f70 [UpDevice], type=type@entry=0x7ffff7bcfbf3 "charge", timespec=timespec@entry=120, resolution=resolution@entry=10, cancellable=cancellable@entry=0x0, error=error@entry=0x0) at up-device.c:484
#2  0x00007ffff7bc4b5a in up_device_to_text_history (device=device@entry=0x613f70 [UpDevice], string=string@entry=0x631760, type=type@entry=0x7ffff7bcfbf3 "charge") at up-device.c:194
#3  0x00007ffff7bc5302 in up_device_to_text (device=device@entry=0x613f70 [UpDevice]) at up-device.c:375
#4  0x0000000000401c7f in up_tool_device_changed_cb (device=0x613f70 [UpDevice], pspec=<optimized out>, user_data=<optimized out>) at up-tool.c:94
#8  0x00007ffff798f3af in <emit signal notify:state on instance 0x613f70 [UpDevice]> (instance=instance@entry=0x613f70, signal_id=<optimized out>, detail=<optimized out>) at gsignal.c:3365
    #5  0x00007ffff7974d35 in g_closure_invoke (closure=0x628480, return_value=return_value@entry=0x0, n_param_values=2, param_values=param_values@entry=0x7fffffffcc90, invocation_hint=invocation_hint@entry=0x7fffffffcc30) at gclosure.c:768
    #6  0x00007ffff7986a42 in signal_emit_unlocked_R (node=node@entry=0x6109e0, detail=detail@entry=208, instance=instance@entry=0x613f70, emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7fffffffcc90) at gsignal.c:3553
    #7  0x00007ffff798f181 in g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args@entry=0x7fffffffce20) at gsignal.c:3309
#9  0x00007ffff7979475 in g_object_dispatch_properties_changed (object=0x613f70 [UpDevice], n_pspecs=<optimized out>, pspecs=<optimized out>) at gobject.c:1056
#10 0x00007ffff797b8d1 in g_object_notify (pspec=<optimized out>, object=0x613f70 [UpDevice]) at gobject.c:1149
#11 0x00007ffff797b8d1 in g_object_notify (object=0x613f70 [UpDevice], property_name=<optimized out>) at gobject.c:1197
#15 0x00007ffff798f3af in <emit signal notify:state on instance 0x618930 [UpDeviceGlueProxy]> (instance=instance@entry=0x618930, signal_id=<optimized out>, detail=<optimized out>) at gsignal.c:3365
    #12 0x00007ffff7974d35 in g_closure_invoke (closure=0x62a2a0, return_value=return_value@entry=0x0, n_param_values=2, param_values=param_values@entry=0x7fffffffd120, invocation_hint=invocation_hint@entry=0x7fffffffd0c0) at gclosure.c:768
    #13 0x00007ffff7986a42 in signal_emit_unlocked_R (node=node@entry=0x6109e0, detail=detail@entry=208, instance=instance@entry=0x618930, emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7fffffffd120) at gsignal.c:3553
    #14 0x00007ffff798f181 in g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args@entry=0x7fffffffd2b0) at gsignal.c:3309
#16 0x00007ffff7979475 in g_object_dispatch_properties_changed (object=0x618930 [UpDeviceGlueProxy], n_pspecs=<optimized out>, pspecs=<optimized out>) at gobject.c:1056
#17 0x00007ffff797b8d1 in g_object_notify (pspec=<optimized out>, object=0x618930 [UpDeviceGlueProxy]) at gobject.c:1149
#18 0x00007ffff797b8d1 in g_object_notify (object=0x618930 [UpDeviceGlueProxy], property_name=property_name@entry=0x7ffff7bd04c0 "state") at gobject.c:1197
#19 0x00007ffff7bcb99c in up_device_glue_proxy_g_properties_changed (_proxy=<optimized out>, changed_properties=<optimized out>, invalidated_properties=0x630df0) at up-device-glue.c:2698
#20 0x00007ffff6ad9d60 in ffi_call_unix64 () at ../src/x86/unix64.S:76
#21 0x00007ffff6ad97d1 in ffi_call (cif=cif@entry=0x7fffffffd640, fn=<optimized out>, rvalue=0x7fffffffd5a0, avalue=avalue@entry=0x7fffffffd540) at ../src/x86/ffi64.c:525
#26 0x00007ffff798f3af in <emit signal ??? on instance 0x618930 [UpDeviceGlueProxy]> (instance=instance@entry=0x618930, signal_id=<optimized out>, detail=detail@entry=0) at gsignal.c:3365
    #22 0x00007ffff7975554 in g_cclosure_marshal_generic (closure=0x6108d0, return_gvalue=0x0, n_param_values=<optimized out>, param_values=<optimized out>, invocation_hint=<optimized out>, marshal_data=0x7ffff7bcb840 <up_device_glue_proxy_g_properties_changed>) at gclosure.c:1448
    #23 0x00007ffff7974d35 in g_closure_invoke (closure=closure@entry=0x6108d0, return_value=return_value@entry=0x0, n_param_values=3, param_values=param_values@entry=0x7fffffffd870, invocation_hint=invocation_hint@entry=0x7fffffffd810) at gclosure.c:768
    #24 0x00007ffff798693a in signal_emit_unlocked_R (node=node@entry=0x617500, detail=detail@entry=0, instance=instance@entry=0x618930, emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7fffffffd870) at gsignal.c:3591
    #25 0x00007ffff798f181 in g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args@entry=0x7fffffffda20) at gsignal.c:3309
#27 0x00007ffff6fcf649 in on_properties_changed (connection=<optimized out>, sender_name=<optimized out>, object_path=<optimized out>, interface_name=<optimized out>, signal_name=<optimized out>, parameters=<optimized out>, user_data=0x629fc0) at gdbusproxy.c:1139
#28 0x00007ffff6fbf114 in emit_signal_instance_in_idle_cb (data=0x7fffe8009470) at gdbusconnection.c:3753
#29 0x00007ffff7675aeb in g_main_context_dispatch (context=0x60fe10) at gmain.c:3111
#30 0x00007ffff7675aeb in g_main_context_dispatch (context=context@entry=0x60fe10) at gmain.c:3710
#31 0x00007ffff7675e88 in g_main_context_iterate (context=0x60fe10, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3781
#32 0x00007ffff76761b2 in g_main_loop_run (loop=0x60fd80) at gmain.c:3975
#33 0x0000000000401806 in main (client=0x613a20 [UpClient]) at up-tool.c:185
#34 0x0000000000401806 in main (argc=1, argv=0x7fffffffe048) at up-tool.c:346
(gdb)

There are several related downstream reports with upower or apps which use upower for browsing statistics.

https://bugzilla.redhat.com/show_bug.cgi?id=1128390
https://bugzilla.redhat.com/show_bug.cgi?id=1151628
https://bugzilla.redhat.com/show_bug.cgi?id=1197513
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=774546
https://bugzilla.redhat.com/show_bug.cgi?id=1182349
https://bugzilla.redhat.com/show_bug.cgi?id=1190677
Comment 1 Wolfgang Ulbrich 2015-03-10 11:29:19 UTC
Created attachment 114195 [details] [review]
fixes upower statistics
Comment 2 Wolfgang Ulbrich 2015-03-10 11:29:54 UTC
Please review the patch.
Comment 3 Martin Pitt 2015-03-13 12:21:20 UTC

*** This bug has been marked as a duplicate of bug 89476 ***


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.