gsd-power 3.27.91 crashed with SIGFPE

Bug #1751956 reported by Jeremy Bícha
36
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Ubuntu GNOME
Fix Released
Undecided
Unassigned

Bug Description

Test Case
=========
From Ubuntu 18.04, add the GNOME3 Staging PPA.
Log out and log back in.

Open gnome-control-center to the Power panel.
Close gnome-control-center
Open gnome-control-center

(gnome-control-center 3.27.91 will automatically open the last opened panel, which is Power here).

gnome-settings-daemon crashes which crashes the entire session and logs you out.

Other Info
==========
The GNOME3 Staging PPA has gnome-control-center 3.27.90.

I could not reproduce this crash with bionic's gnome-settings-daemon 3.26.2.

I was still able to reproduce the crash after applying this patch:
https://gitlab.gnome.org/GNOME/gnome-settings-daemon/commit/a72c928a

ProblemType: Crash
DistroRelease: Ubuntu 18.04
Package: gnome-settings-daemon 3.27.91-0ubuntu0~bionic1 [origin: LP-PPA-gnome3-team-gnome3-staging]
ProcVersionSignature: Ubuntu 4.15.0-10.11-generic 4.15.3
Uname: Linux 4.15.0-10-generic x86_64
ApportVersion: 2.20.8-0ubuntu10
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Mon Feb 26 19:42:15 2018
ExecutablePath: /usr/lib/gnome-settings-daemon/gsd-power
InstallationDate: Installed on 2017-10-13 (136 days ago)
InstallationMedia: Ubuntu 17.10 "Artful Aardvark" - Beta amd64 (20171012)
ProcCmdline: /usr/lib/gnome-settings-daemon/gsd-power
Signal: 8
SourcePackage: gnome-settings-daemon
StacktraceTop:
 ()
 ()
 () at /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
 g_main_context_dispatch () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
 () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
Title: gsd-power crashed with SIGFPE
UpgradeStatus: Upgraded to bionic on 2017-11-24 (94 days ago)
UserGroups: adm cdrom dip lpadmin lxd plugdev sambashare sbuild sudo

Revision history for this message
Jeremy Bícha (jbicha) wrote :
Revision history for this message
Tim Lunn (darkxst) wrote :

Reproduced as per test case.
Here is a backtrace:

Core was generated by `/usr/lib/gnome-settings-daemon/gsd-power'.
Program terminated with signal SIGFPE, Arithmetic exception.
#0 0x000056134e7068d8 in gsd_power_backlight_abs_to_percentage (
    min=min@entry=0, max=<optimised out>, value=<optimised out>)
    at ../plugins/power/gpm-common.c:61
61 ../plugins/power/gpm-common.c: No such file or directory.
[Current thread is 1 (Thread 0x7f49b27d80c0 (LWP 2070))]
(gdb) bt
#0 0x000056134e7068d8 in gsd_power_backlight_abs_to_percentage (
    min=min@entry=0, max=<optimised out>, value=<optimised out>)
    at ../plugins/power/gpm-common.c:61
#1 0x000056134e70c207 in handle_get_property_other (error=0x0,
    property_name=0x561350569bd0 "Brightness",
    interface_name=0x561350569480 "org.gnome.SettingsDaemon.Power.Keyboard",
    manager=0x561350568150) at ../plugins/power/gsd-power-manager.c:2924
#2 handle_get_property (connection=<optimised out>, sender=<optimised out>,
    object_path=object_path@entry=0x7f4998011ad0 "/org/gnome/SettingsDaemon/Power",
    interface_name=interface_name@entry=0x561350569480 "org.gnome.SettingsDaemon.Power.Keyboard",
    property_name=property_name@entry=0x561350569bd0 "Brightness",
    error=error@entry=0x0, user_data=0x561350568150)
    at ../plugins/power/gsd-power-manager.c:2957
#3 0x00007f49b0d8caf8 in invoke_get_all_properties_in_idle_cb (
    _data=0x7f499803b920) at ../../../../gio/gdbusconnection.c:4494
#4 0x00007f49b07aef85 in g_main_dispatch (context=0x56135052e800)
    at ../../../../glib/gmain.c:3177
#5 g_main_context_dispatch (context=context@entry=0x56135052e800)
    at ../../../../glib/gmain.c:3830
#6 0x00007f49b07af350 in g_main_context_iterate (context=0x56135052e800,
    block=block@entry=1, dispatch=dispatch@entry=1, self=<optimised out>)
---Type <return> to continue, or q <return> to quit---
   ../../../glib/gmain.c:3903
#7 0x00007f49b07af662 in g_main_loop_run (loop=0x561350595b10) at ../../../../glib/gmain.c:4099
#8 0x00007f49b15a9455 in gtk_main () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#9 0x000056134e705fca in main (argc=<optimised out>, argv=<optimised out>) at ../plugins/common/daemon-skeleton-gtk.h:246

Tim Lunn (darkxst)
information type: Private → Public Security
information type: Public Security → Public
Revision history for this message
Tim Lunn (darkxst) wrote :

I can not reproduce this on my laptop that actually has a backlit keyboard, so suspect it only affects machines without.

Could be a divide-by-0 error, though the code seems to guard against that.

Revision history for this message
Tim Lunn (darkxst) wrote :

I poked at this with gdb:
#0 gsd_power_backlight_abs_to_percentage (min=min@entry=0, max=0, value=-1) at ../plugins/power/gpm-common.c:61

that should trigger g_return_val_if_fail (max > min, -1) to return, however the g_return_val_if_fail's seem to have been compiled out ;(

I will file an upstream bug for this

Revision history for this message
Tim Lunn (darkxst) wrote :

https://gitlab.gnome.org/GNOME/gnome-settings-daemon/issues/8

seems Launchpad hasnt learnt about gitlab URL's yet?

Revision history for this message
Jeremy Bícha (jbicha) wrote :

Here's the Launchpad bug for GitLab bugs: LP: #1745210 (I believe no one's working on it yet.)

Jeremy Bícha (jbicha)
Changed in ubuntu-gnome:
status: New → Fix Released
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.