gsd-power crashes due to memory corruption

Bug #2085060 reported by errors.ubuntu.com bug bridge
130
This bug affects 16 people
Affects Status Importance Assigned to Milestone
gnome-settings-daemon (Ubuntu)
Fix Released
Medium
Alessandro Astone
Oracular
Fix Released
Medium
Alessandro Astone

Bug Description

[ Impact ]

gsd-power is seen crashing with various stack traces indicating to memory corruption.

[ Test Plan ]

We're not aware of steps to reproduce.
We will monitor errors.ubuntu.com to see if any more crashes are reported after this update lands.

[ Where problems could occur ]

Patches to address this bug are included in the 47.2 update.
See bug 2089929

[ Other info ]

This is a sample stacktrace:

#0 0x00007ad719ab3395 in __GI___libc_free (mem=0xbf293fbb0) at ./malloc/malloc.c:3375
        ar_ptr = <optimized out>
        p = <optimized out>
        err = <optimized out>
#1 0x00007ad719e1c04c in g_hash_table_unref (hash_table=0x5770f293bf10) at ../../../glib/ghash.c:1442
        __func__ = <optimized out>
        _g_boolean_var_27 = <optimized out>
#2 g_hash_table_unref (hash_table=0x5770f293bf10) at ../../../glib/ghash.c:1432
        __func__ = "g_hash_table_unref"
#3 0x00007ad71a046048 in info_cache_free (cache=0x5770f2940e40) at ../../../gio/gdbusintrospection.c:1886
        __func__ = "info_cache_free"
#4 0x00007ad719e1aca9 in g_hash_table_remove_internal (hash_table=0x5770f292b230, key=0x7ad71ac12660 <_gsd_screen_saver_interface_info>, notify=1) at ../../../glib/ghash.c:1722
        node_index = 11
        node_hash = 448865888
        node_index = <optimized out>
        node_hash = <optimized out>
        __func__ = <optimized out>
        _g_boolean_var_33 = <optimized out>
#5 g_hash_table_remove (hash_table=0x5770f292b230, key=key@entry=0x7ad71ac12660 <_gsd_screen_saver_interface_info>) at ../../../glib/ghash.c:1750
No locals.
#6 0x00007ad71a0470cf in g_dbus_interface_info_cache_release (info=0x7ad71ac12660 <_gsd_screen_saver_interface_info>) at ../../../gio/gdbusintrospection.c:2137
        cache = <optimized out>
        __func__ = "g_dbus_interface_info_cache_release"
#7 0x00007ad71a03feac in g_dbus_proxy_finalize (object=0x5770f2940c60) at ../../../gio/gdbusproxy.c:222
        proxy = 0x5770f2940c60
        __func__ = "g_dbus_proxy_finalize"
#8 0x00007ad71aa46922 in g_object_unref (_object=0x5770f2940c60) at ../../../gobject/gobject.c:4486
        object = 0x5770f2940c60
        old_ref = 1
        toggle_notify = <optimized out>
        toggle_data = <optimized out>
        nqueue = 0x5770f2950240
        obj_gtype = <optimized out>
        retry_beginning = <optimized out>
        retry_decrement = <optimized out>
        __func__ = "g_object_unref"
#9 0x00005770d5187102 in gsd_power_manager_stop (manager=0x5770f2931900) at ../plugins/power/gsd-power-manager.c:3142
        _pp = 0x5770f2931958
        _ptr = <optimized out>
#10 0x00005770d5183400 in main (argc=<optimized out>, argv=<optimized out>) at ../plugins/common/daemon-skeleton-gtk.h:294
        error = 0x0
        name_own_id = 1

--------------------------------------------------------------------------------

The Ubuntu Error Tracker has been receiving reports about a problem regarding gnome-settings-daemon. This problem was most recently seen with package version 47.1-1ubuntu1, the problem page at https://errors.ubuntu.com/problem/40e180c1cf5f7e9657be6f796bd3b35b705c35b2 contains more details, including versions of packages affected, stacktrace or traceback, and individual crash reports.
If you do not have access to the Ubuntu Error Tracker and are a software developer, you can request it at http://forms.canonical.com/reports/.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gnome-settings-daemon (Ubuntu):
status: New → Confirmed
summary: - /usr/libexec/gsd-
- power:11:__GI___libc_free:g_hash_table_unref:g_hash_table_unref:info_cache_free:g_hash_table_remove_internal
+ gsd-power crashed with SIGSEGV in __GI___libc_free() from
+ g_hash_table_unref() from g_hash_table_unref() from info_cache_free()
+ from g_hash_table_remove_internal()
Revision history for this message
Alessandro Astone (aleasto) wrote (last edit ): Re: gsd-power crashed with SIGSEGV in __GI___libc_free() from g_hash_table_unref() from g_hash_table_unref() from info_cache_free() from g_hash_table_remove_internal()

Very similar crash but when freeing `proxy->priv->properties` instead of `proxy->priv->expected_interface`: https://launchpad.net/bugs/2085143

tags: added: 1202
tags: added: udeng-5009
removed: 1202
description: updated
summary: - gsd-power crashed with SIGSEGV in __GI___libc_free() from
- g_hash_table_unref() from g_hash_table_unref() from info_cache_free()
- from g_hash_table_remove_internal()
+ gsd-power crashes due to memory corruption
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-settings-daemon - 47.1-1ubuntu2

---------------
gnome-settings-daemon (47.1-1ubuntu2) plucky; urgency=medium

  * Backport patch to fix memory corruption crashes (LP: #2085060)

 -- Alessandro Astone <email address hidden> Thu, 21 Nov 2024 21:16:08 +0100

Changed in gnome-settings-daemon (Ubuntu):
status: Confirmed → Fix Released
description: updated
Changed in gnome-settings-daemon (Ubuntu):
assignee: nobody → Alessandro Astone (aleasto)
Changed in gnome-settings-daemon (Ubuntu Oracular):
assignee: nobody → Alessandro Astone (aleasto)
status: New → In Progress
Changed in gnome-settings-daemon (Ubuntu):
importance: Undecided → Medium
Changed in gnome-settings-daemon (Ubuntu Oracular):
importance: Undecided → Medium
description: updated
Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

Hello errors.ubuntu.com, or anyone else affected,

Accepted gnome-settings-daemon into oracular-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/gnome-settings-daemon/47.2-0ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-oracular to verification-done-oracular. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-oracular. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in gnome-settings-daemon (Ubuntu Oracular):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-oracular
Revision history for this message
Alessandro Astone (aleasto) wrote :

Will be monitoring errors.ubuntu.com to see if any more crashes are reported after this update lands.

tags: added: verification-done verification-done-oracular
removed: verification-needed verification-needed-oracular
Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (gnome-settings-daemon/47.2-0ubuntu1)

All autopkgtests for the newly accepted gnome-settings-daemon (47.2-0ubuntu1) for oracular have finished running.
The following regressions have been reported in tests triggered by the package:

mutter/47.0-1ubuntu4.1 (amd64)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/oracular/update_excuses.html#gnome-settings-daemon

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-settings-daemon - 47.2-0ubuntu1

---------------
gnome-settings-daemon (47.2-0ubuntu1) oracular; urgency=medium

  * New upstream release (LP: #2089929)
    - Address memory corruption crashes (LP: #2085060)

 -- Alessandro Astone <email address hidden> Fri, 06 Dec 2024 10:25:31 +0100

Changed in gnome-settings-daemon (Ubuntu Oracular):
status: Fix Committed → Fix Released
Revision history for this message
Andreas Hasenack (ahasenack) wrote : Update Released

The verification of the Stable Release Update for gnome-settings-daemon has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.