gnome-shell crashed with SIGABRT in g_assertion_message()

Bug #1319897 reported by Marius Gedminas on 2014-05-15
78
This bug affects 11 people
Affects Status Importance Assigned to Milestone
Ubuntu GNOME
Undecided
Unassigned
gnome-shell (Ubuntu)
Undecided
Unassigned
Trusty
Undecided
Unassigned
Utopic
Undecided
Unassigned
mutter (Ubuntu)
Undecided
Unassigned
Trusty
High
Unassigned
Utopic
Undecided
Unassigned

Bug Description

[Impact]
gnome-shell will crash when resuming from suspend, if the monitor configuration was changed while machine was suspended

[Test Case]
-Suspend Laptop with external monitor connected
-Disconnect external monitor
-Resume from suspend

[Regression Potential]
Low, the applied patches discard the previous monitor configuration, but only
if monitors changed while machine was suspended.

=== Original Bug Report ===

This happened on resume from S3 sleep. It seems related to multi-monitor support: I had an external display connected via VGA that I unplugged at around the same time as I suspended the laptop. The external display was unplugged when I woke the laptop up.

There was a long pause with a blank screen before gnome-shell crashed and restarted (I've observed that pause in other gnome-shell crashes too; maybe it's just apport taking a long time to process the core dump? dunno). It then restarted, flashing the picture of my desktop before restoring the lock screen (this could have privacy/security implications).

Bug 1190535 might be a duplicate; I can't tell. The stack trace in that bug seems mangled.

FWIW the crash was a SIGABRT due to

  assertion failed: (n_outputs == config->n_outputs)

which was visible in the function arguments passed to g_assertion_message() in the stack trace shown by apport before I submitted this bug. I don't trust the retracer bot not to mess up the stack trace like it usually does for PPA packages.

ProblemType: Crash
DistroRelease: Ubuntu 14.04
Package: gnome-shell 3.12.1-0ubuntu1~trusty1 [origin: LP-PPA-gnome3-team-gnome3-staging]
ProcVersionSignature: Ubuntu 3.13.0-26.48-generic 3.13.11
Uname: Linux 3.13.0-26-generic x86_64
ApportVersion: 2.14.1-0ubuntu3
Architecture: amd64
CrashCounter: 1
CurrentDesktop: GNOME
Date: Thu May 15 18:18:13 2014
DisplayManager: gdm
EcryptfsInUse: Yes
ExecutablePath: /usr/bin/gnome-shell
GsettingsChanges:
 b'org.gnome.desktop.interface' b'clock-show-seconds' b'true'
 b'org.gnome.desktop.interface' b'gtk-im-module' b"'gtk-im-context-simple'"
 b'org.gnome.desktop.interface' b'clock-show-date' b'true'
InstallationDate: Installed on 2012-07-25 (659 days ago)
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120425)
ProcCmdline: /usr/bin/gnome-shell
Signal: 6
SourcePackage: gnome-shell
Title: gnome-shell crashed with SIGABRT in g_assertion_message()
UpgradeStatus: Upgraded to trusty on 2014-04-18 (27 days ago)
UserGroups: adm cdrom dip libvirtd lpadmin plugdev sambashare shared sudo wireshark

Marius Gedminas (mgedmin) wrote :
Ubuntu GNOME (ug-bot) wrote :

StacktraceTop:
 g_once_init_enter (location=<optimized out>) at /build/buildd/glib2.0-2.40.0+git20140410.c938e742/./glib/gthread.c:645
 ?? () from /home/darkxst/gnome3-amd64/usr/lib/libmutter.so.0
 __FUNCTION__.11789 () from /home/darkxst/gnome3-amd64/lib/x86_64-linux-gnu/libglib-2.0.so.0
 __FUNCTION__.4488 () from /home/darkxst/gnome3-amd64/lib/x86_64-linux-gnu/libglib-2.0.so.0
 ?? ()

summary: - gnome-shell crashed with SIGABRT in g_assertion_message()
+ gnome-shell crashed with SIGABRT in g_once_init_enter()
tags: removed: need-amd64-retrace
Marius Gedminas (mgedmin) wrote :

Yup, ug-bot's stack trace is bogus. I'll try apport-retrace locally.

summary: - gnome-shell crashed with SIGABRT in g_once_init_enter()
+ gnome-shell crashed with SIGABRT in g_assertion_message()
Marius Gedminas (mgedmin) wrote :

BTW bug 1286098 was about the same assertion message (n_outputs == config->n_outputs).

Bug 1294115 might be another duplicate (Apport showed it as a DuplicateOf during one of the previous crashes), but I can't see it because it's private.

I've seen more gnome-shell crashes right after resume, but the above are the only ones where I paid attention to the stack trace and made a note about the failed n_outputs assertion in my diary.

Marius Gedminas (mgedmin) wrote :

I'm attaching a full and correct stack trace, produced in gdb with debug symbols by entering

    set pagination off
    set logging file ~/lp1319897.log
    set logging on
    bt
    t a a bt full

Marius Gedminas (mgedmin) wrote :

The failing assertion is in meta_monitor_config_assign_crtcs in libmutter (core/monitor-config.c:1822)

At that point n_outputs == 1 but config->n_outputs == 0.

Marius Gedminas (mgedmin) wrote :

I built a mutter with the two upstream patches backported (the only change necessary was in the file name). I'm about to test it.

Marius Gedminas (mgedmin) wrote :

Brief test with fixed package:
1. plug in external monitor
2. suspend laptop
3. unplug monitor
4. resume laptop

Outcome: no crash. Yay!

Tim Lunn (darkxst) on 2014-05-15
information type: Private → Public
Tim Lunn (darkxst) wrote :

Marius, thanks for your work on this, it seems that both those patches are included in mutter 3.12.2, which I just uploaded to the ppa.

Tim Lunn (darkxst) on 2014-05-15
Changed in ubuntu-gnome:
milestone: none → trusty.1
Launchpad Janitor (janitor) wrote :

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

Changed in gnome-shell (Ubuntu Trusty):
status: New → Confirmed
Changed in gnome-shell (Ubuntu):
status: New → Confirmed
Tim Lunn (darkxst) wrote :

This also affects 3.10 in utopic and trusty. Marius, Can you test your debdiff against the 3.10 packages?

The attachment "Debdiff with backported upstream patches" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch
Marius Gedminas (mgedmin) wrote :

When my other laptop gets back from the repair shop, I'll upgrade it to stock Ubuntu GNOME 14.04 and see if I can reproduce this crash and test the fix.

I don't want to start ppa-purging GNOME 3.12 on my primary laptop for reasons.

Tim Lunn (darkxst) wrote :

Marius, given you have already test the patches against 3.12, it should be enough to make sure they apply cleanly to 3.10 packages and build ok (use pbuilder or sbuild).

Once we SRU it back into trusty it will need testing though..

Marius Gedminas (mgedmin) wrote :

mutter 3.10.4 from trusty (no PPA) builds with the two patches applied (here's a debdiff). I tested with debuild wile waiting for 'pbuilder-dist create trusty', now I'm waiting for 'pbuilder-dist build trusty mutter_3.10.4-0ubuntu2mg1.dsc'... Ok, this builds too.

I uploaded the fixed mutter package to my PPA (https://launchpad.net/~mgedmin/+archive/ppa) if anyone with stock 14.04 has this problem (gnome-shell crashes on monitor hotplug/unplug) and wants to test it. It's building now.

Tim Lunn (darkxst) wrote :

Thanks Marius! Uploaded, can you add the SRU paperwork to the bug description
see https://wiki.ubuntu.com/StableReleaseUpdates#SRU_Bug_Template

Changed in gnome-shell (Ubuntu Trusty):
status: Confirmed → Fix Committed
Changed in ubuntu-gnome:
status: New → Fix Committed
Tim Lunn (darkxst) on 2014-05-19
description: updated
Changed in gnome-shell (Ubuntu Utopic):
status: Confirmed → Fix Released
Changed in gnome-shell (Ubuntu Trusty):
status: Fix Committed → In Progress
description: updated
Brian Murray (brian-murray) wrote :

Fixed in utopic

mutter (3.10.4-0ubuntu4) utopic; urgency=medium

  * debian/patches/git-fix-crash-on-hotplug-*.patch:
    - Backport crasher fix from upstream git (LP: #1319897, BGO#725637)

 -- Marius Gedminas <email address hidden> Fri, 16 May 2014 18:08:32 +0300

This really should have had a mutter task so the Launchpad janitor would close the bug tasks automatically. I've added one for the SRU process.

Changed in mutter (Ubuntu Utopic):
status: New → Fix Released
Changed in mutter (Ubuntu Trusty):
status: New → In Progress
importance: Undecided → High
status: In Progress → Fix Committed
tags: added: verification-needed

Hello Marius, or anyone else affected,

Accepted mutter into trusty-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/mutter/3.10.4-0ubuntu2.1 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 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, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

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

Package 3.10.4-0ubuntu2.1 from trusty-proposed fixes the bug for me.

It fixes both:

1) suspend
2) unplug monitor
3) resume

and:

1) unplug monitor
2) suspend
3) resume

Tim Lunn (darkxst) wrote :

Marking verification done, based on Jasper's results above

tags: added: verification-done
removed: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mutter - 3.10.4-0ubuntu2.1

---------------
mutter (3.10.4-0ubuntu2.1) trusty; urgency=medium

  * debian/patches/git-fix-crash-on-hotplug-*.patch:
    - Backport crasher fix from upstream git (LP: #1319897, BGO#725637)
 -- Marius Gedminas <email address hidden> Fri, 16 May 2014 18:08:32 +0300

Changed in mutter (Ubuntu Trusty):
status: Fix Committed → Fix Released

The verification of the Stable Release Update for mutter has completed successfully and the package has now been 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 regresssions.

Tim Lunn (darkxst) on 2014-06-24
Changed in gnome-shell (Ubuntu Trusty):
status: In Progress → Fix Released
Changed in ubuntu-gnome:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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