gnome-shell-hotplug-sniffer crashed with SIGSEGV in g_str_hash() from g_hash_table_lookup() from deep_count_more_files_callback()

Bug #1865300 reported by Alfred E. Neumayer
228
This bug affects 44 people
Affects Status Importance Assigned to Milestone
GNOME Shell
Fix Released
Unknown
glib2.0 (Ubuntu)
Invalid
Undecided
Unassigned
gnome-shell (Ubuntu)
Fix Released
High
Marco Trevisan (Treviño)
Focal
Fix Released
High
Marco Trevisan (Treviño)

Bug Description

[ Impact ]

gnome-shell-hotplug-sniffer crashes when attaching some device that may have files with unknown content type

[ Test case ]

- Plug a media, but it's not yet known which kind of files cause this issue,
  so we should just monitor the e.u.c crash:
  https://errors.ubuntu.com/problem/2edf29b9677e3de0d55d2114024f39c4c52b45e9

[ Regression potential ]

- No valid application for opening a media is shown by gnome-shell

---

This is for 3.34:

https://errors.ubuntu.com/problem/b6069e75f805530e3c7722835d567cfdb84f2fec

---

Happened during normal use of the desktop.

ProblemType: CrashDistroRelease: Ubuntu 20.04
Package: gnome-shell 3.34.3-1ubuntu1
ProcVersionSignature: Ubuntu 5.4.0-14.17-generic 5.4.18
Uname: Linux 5.4.0-14-generic x86_64
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair wl
ApportVersion: 2.20.11-0ubuntu18
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Sat Feb 29 19:51:58 2020
DisplayManager: gdm3
ExecutablePath: /usr/lib/gnome-shell/gnome-shell-hotplug-sniffer
InstallationDate: Installed on 2020-01-25 (35 days ago)
InstallationMedia: Ubuntu 20.04 LTS "Focal Fossa" - Alpha amd64 (20200117)
ProcCmdline: /usr/lib/gnome-shell/gnome-shell-hotplug-sniffer
RelatedPackageVersions: mutter-common 3.34.3-1ubuntu1
SegvAnalysis:
 Segfault happened at: 0x7f5f54fa6444 <g_str_hash+4>: movsbl (%rdi),%eax
 PC (0x7f5f54fa6444) ok
 source "(%rdi)" (0x00000000) not located in a known VMA region (needed readable region)!
 destination "%eax" ok
SegvReason: reading NULL VMA
Signal: 11SourcePackage: gnome-shell
StacktraceTop:
 g_str_hash () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
 g_hash_table_lookup () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
 ?? ()
 ?? () from /lib/x86_64-linux-gnu/libgio-2.0.so.0
 ?? () from /lib/x86_64-linux-gnu/libgio-2.0.so.0
Title: gnome-shell-hotplug-sniffer crashed with SIGSEGV in g_str_hash()
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip docker lpadmin lxd plugdev sambashare sudo
separator:

Revision history for this message
Alfred E. Neumayer (beidl) wrote :
Revision history for this message
Apport retracing service (apport) wrote :

StacktraceTop:
 g_str_hash () from /tmp/apport_sandbox_0f0xofjv/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.6305.0
 g_hash_table_lookup () from /tmp/apport_sandbox_0f0xofjv/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.6305.0
 deep_count_more_files_callback ()
 next_async_callback_wrapper (source_object=0x557217342500, res=0x55721732fca0, user_data=0x557217356400) at ../../../gio/gfileenumerator.c:305
 g_task_return_now (task=0x55721732fca0) at ../../../gio/gtask.c:1214

Revision history for this message
Apport retracing service (apport) wrote : Stacktrace.txt
Revision history for this message
Apport retracing service (apport) wrote : StacktraceSource.txt
Revision history for this message
Apport retracing service (apport) wrote : ThreadStacktrace.txt
Changed in gnome-shell (Ubuntu):
importance: Undecided → Medium
tags: removed: need-amd64-retrace
Revision history for this message
Launchpad Janitor (janitor) wrote : Re: gnome-shell-hotplug-sniffer crashed with SIGSEGV in g_str_hash()

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

Changed in gnome-shell (Ubuntu):
status: New → Confirmed
Revision history for this message
Daniel van Vugt (vanvugt) wrote :
information type: Private → Public
Revision history for this message
Daniel van Vugt (vanvugt) wrote :
summary: - gnome-shell-hotplug-sniffer crashed with SIGSEGV in g_str_hash()
+ gnome-shell-hotplug-sniffer crashed with SIGSEGV in g_str_hash() from
+ g_hash_table_lookup() from deep_count_more_files_callback()
description: updated
description: updated
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

This looks more a glib issue as the code in this shell utility didn't really change in the past.

Changed in gnome-shell (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in glib2.0 (Ubuntu):
status: New → Confirmed
Vikas Gill (vikkygill)
Changed in gnome-shell (Ubuntu):
status: Incomplete → Confirmed
tags: added: apport-request-retrace
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

This is the #2 most common gnome-shell crash in focal.

tags: added: rls-ff-incoming
Revision history for this message
Daniel van Vugt (vanvugt) wrote :
Changed in gnome-shell (Ubuntu):
importance: Medium → High
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)
tags: removed: rls-ff-incoming
Revision history for this message
Andrew Derry (unrheal) wrote :

I'm new on here - sorry for any mistakes.
I didn't know if it's worth adding, or where to add... that after I got this crash, I closed everything (and had my Android plugged in and mounted, but ejected it) and rebooted.
Now, when I plug my phone back in, it makes the little alert noise, but I cannot find my phone drive. It doesn't show up in Files like it did last time, even when I click "other locations". (Files was what I was using to look at the phone files before the reboot)

tags: added: groovy
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

I've prepared a mitigation in gnome-shell as https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1302

However, it may be that both debian and ubuntu are lacking some mime type definitions, as it looks weird to me that it we're the only one affected by this (which under the hood is `g_file_info_get_content_type` returning NULL for a file).

Changed in gnome-shell (Ubuntu):
status: Confirmed → In Progress
Changed in glib2.0 (Ubuntu):
status: Confirmed → Invalid
tags: added: fixed-in-3.37.3 fixed-upstream
description: updated
Changed in gnome-shell (Ubuntu Focal):
status: New → In Progress
importance: Undecided → High
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)
no longer affects: glib2.0 (Ubuntu Focal)
Changed in gnome-shell (Ubuntu):
status: In Progress → Fix Committed
Changed in gnome-shell (Ubuntu Focal):
status: In Progress → Fix Committed
tags: added: fixed-in-3.36.4
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-shell - 3.36.3-1ubuntu2

---------------
gnome-shell (3.36.3-1ubuntu2) groovy; urgency=medium

  * d/p/shell-mime-sniffer-Ignore-invalid-file-content-type.patch:
    - gnome-shell-sniffer, don't crash when opening files with invalid content
      type (LP: #1865300)

 -- Marco Trevisan (Treviño) <email address hidden> Fri, 05 Jun 2020 20:14:47 +0200

Changed in gnome-shell (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

Hello Alfred, or anyone else affected,

Accepted gnome-shell into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/gnome-shell/3.36.3-1ubuntu1~20.04.2 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-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. 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.

tags: added: verification-needed verification-needed-focal
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

After 12 days in proposed I see that e.u.c has only one report, that looks to be more a false positive or a crash that isn't due to the same root case of this bug, so I'd say we can confirm this bug.

tags: added: verification-done verification-done-focal
removed: verification-needed verification-needed-focal
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (4.4 KiB)

This bug was fixed in the package gnome-shell - 3.36.3-1ubuntu1~20.04.2

---------------
gnome-shell (3.36.3-1ubuntu1~20.04.2) focal; urgency=medium

  * No change backport to focal

gnome-shell (3.36.3-1ubuntu2) groovy; urgency=medium

  * d/p/shell-mime-sniffer-Ignore-invalid-file-content-type.patch:
    - gnome-shell-sniffer, don't crash when opening files with invalid content
      type (LP: #1865300)

gnome-shell (3.36.3-1ubuntu1~20.04.1) focal; urgency=medium

  * No change backport to focal (LP: #1881973)

gnome-shell (3.36.3-1ubuntu1) groovy; urgency=medium

  * Merge with debian, including new upstream release:
    - Fix app icon aspect ratio in the panel (LP: #1872026)
    - Ensure that Do not disturb is persistent across sessions (LP: #1873692)
    - Fix Theme node crashes (LP: #1877774, LP: #1877760)
  * debian/patches: Refresh
  * Remaining changes with debian:
    - Replace gnome-backgrounds dep with ubuntu-wallpapers and Suggests
      gnome-themes-standard-data, gnome-backgrounds
    - Add some Recommends:
      + ubuntu-session (| gnome-session) to have the ubuntu session available
      + xserver-xorg-legacy
      + yaru-theme-gnome-shell for the default ubuntu theming
    - Update debian/gbp.conf with Ubuntu settings
    - gnome-shell-common.prerm: Remove deprecated ubuntu theme alternative
    - ubuntu/desktop_detect.patch:
      + add caching for desktop detection to avoid querying the current
        desktop env variable as iterate through the list each time. For the
        time of the Shell process, we can expect this env variable to stay
        stable.
    - ubuntu/smarter_alt_tab.patch:
      + quick alt-tab (without showing up the switcher) switch only between
        the last window of the last 2 applications to be focused instead of
        raising all windows of those apps.
    - ubuntu/lightdm-user-switching.patch:
      + Allow user switching when using LightDM.
    - ubuntu/lock_on_suspend.patch
      + Respect Ubuntu's lock-on-suspend setting.
    - ubuntu/background_login.patch
      + Change default background color as we modified the default GDM color
        for our ubuntu session.
    - ubuntu/gdm_alternatives.patch
      + Add support for GDM3 theme alternatives
    - optional-hot-corner.patch
      + enable patch proposed by upstream developer already in package (but
        not in series) to add a settings for optional hot corner activation.
    - main-show-an-error-message-on-gnome-shell-crash.patch,
      global-make-possible-to-set-debug-flags-dynamically.patch,
      main-increase-the-granularity-of-backtraces-in-SHELL_DEBU.patch,
      main-add-backtrace-crashes-all-and-backtrace-all.patch,
      sessionMode-add-support-for-debugFlags-parameter.patch:
      + Improve debug JS tracing for crash reports
    - st-scroll-view-Handle-the-case-where-scrollbars-are-NULL.patch:
      + Fix crash on theme changes
    - ubuntu/search-call-XUbuntuCancel-method-on-providers-when-no-dat.patch:
      + stop searches when requested from UI
    - magnifier-Show-cursor-when-magnifier-is-enabled-and-scale.patch:
      + Show monitor scaled cursor when magnifier is enabled
    - Break gnome-shell-extension-desktop...

Read more...

Changed in gnome-shell (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for gnome-shell 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.

Changed in gnome-shell:
status: Unknown → Fix Released
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.