hud-service crashed with g-assert-if-reached in GMenu call from qtgmenu::QtGMenuModel::CreateChild()

Bug #1298656 reported by Jos Geluk
38
This bug affects 2 people
Affects Status Importance Assigned to Milestone
hud (Ubuntu)
Fix Released
Medium
Marcus Tomlinson
Nominated for Trusty by Antti Kaijanmäki
Trusty
Fix Released
Undecided
Pete Woods

Bug Description

[Impact]

 * Unknown GTK application causes HUD service to crash by sending invalid menu updates via GMenu.

[Test Case]

 * Not reproducable so far.

[Regression Potential]

 * Worst case is that somehow HUD doesn't work on the desktop and phone.

 * There are, obviously, extensive unit and functional tests to verify this doesn't happen.

[Other Info]

 * The patch will report the offending application to errors.ubuntu.com with all available debugging information.

 * The indexes are now range checked before processing. As soon as a window sends any invalid message it is blocked.

 * Further hardening around the memory management in QtGMenu has been carried out.

* The change is not as large as it at first appears. The majority of the diff is simply replacing Type* with QSharedPointer<Type>. The rest is the extra code for reporting the recoverable problem.

Related branches

Revision history for this message
Jos Geluk (t-jos) wrote :
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 : StacktraceTop.txt
Revision history for this message
Apport retracing service (apport) wrote : ThreadStacktrace.txt
Changed in hud (Ubuntu):
importance: Undecided → Medium
tags: removed: need-amd64-retrace
Charles Kerr (charlesk)
summary: - hud-service crashed with SIGABRT in g_assertion_message()
+ hud-service crashed with g-assert-if-reached in GMenu call from
+ qtgmenu::QtGMenuModel::CreateChild()
information type: Private → Public
Revision history for this message
Pete Woods (pete-woods) wrote :

Hi Jos, do you remember which application was in the foreground when this happened?

Revision history for this message
Jos Geluk (t-jos) wrote :

I think it was either none (i.e., the desktop) or Nemo. Hope this helps.

Changed in hud (Ubuntu):
assignee: nobody → Marcus Tomlinson (marcustomlinson)
status: New → In Progress
Pete Woods (pete-woods)
description: updated
description: updated
Pete Woods (pete-woods)
description: updated
Changed in hud (Ubuntu Trusty):
status: New → In Progress
assignee: nobody → Pete Woods (pete-woods)
Revision history for this message
Colin Watson (cjwatson) wrote : Please test proposed package

Hello Jos, or anyone else affected,

Accepted hud into trusty-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/hud/13.10.1+14.04.20140425-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 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!

Changed in hud (Ubuntu Trusty):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Pete Woods (pete-woods) wrote :

Hi guys,

I've been running this over the weekend, and have seen no regressions so far.

Also, checking out the errors.u.c report (https://errors.ubuntu.com/bucket/?id=GMenuModelItemsChangedInvalidIndex) you can see that it is successfully catching the misbehaving applications.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Pete Woods (pete-woods) wrote :

Just setting verification needed while I check some other error reports.

tags: added: verification-needed
removed: verification-done
Revision history for this message
Sebastien Bacher (seb128) wrote :

Pete, how is the checking going? That HUD version seems to work fine here

Revision history for this message
Pete Woods (pete-woods) wrote :

Plenty of crash regressions here. We should probably pull the packages from proposed.

tags: added: verification-failed
removed: verification-needed
Revision history for this message
Pete Woods (pete-woods) wrote :

We made a stupid (but easy) mistake in the order we were iterating through a critical GMenu data structure. This lead to memory corruption.

Revision history for this message
Pete Woods (pete-woods) wrote :

There's a revision to the branch, but I think I'd prefer to experiment on utopic users before attempting trusty again.

Revision history for this message
Pete Woods (pete-woods) wrote :

I have no idea what the process for flushing the broken build out of proposed is, though.

Pete Woods (pete-woods)
Changed in hud (Ubuntu Trusty):
status: Fix Committed → In Progress
Revision history for this message
Brian Murray (brian-murray) wrote :

The new package version which should fix this bug seems to have included a typo in the version number.

diff -Nru hud-13.10.1+14.04.20140425/debian/changelog hud-14.04+14.04.20140604/debian/changelog
--- hud-13.10.1+14.04.20140425/debian/changelog 2014-06-05 16:24:32.000000000 -0700
+++ hud-14.04+14.04.20140604/debian/changelog 2014-06-05 16:24:32.000000000 -0700
@@ -1,3 +1,14 @@
+hud (14.04+14.04.20140604-0ubuntu1) trusty; urgency=medium

Notice how the package version number starts off with 14.04 instead of 13.10. Was this intended? If so then the version number for Trusty will be greater than the one for Utopic.

Revision history for this message
Pete Woods (pete-woods) wrote :

As soon as this change lands in Trusty, I will release it into utopic as well.

Revision history for this message
Colin Watson (cjwatson) wrote :

Hello Jos, or anyone else affected,

Accepted hud into trusty-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/hud/14.04+14.04.20140604-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 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!

Changed in hud (Ubuntu Trusty):
status: In Progress → Fix Committed
tags: removed: verification-failed
tags: added: verification-needed
Revision history for this message
Pete Woods (pete-woods) wrote :

I have given this a thorough spin on my trusty machine, and additionally there hasn't been a single error report on errors.ubuntu.com for this release yet.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Marcus Tomlinson (marcustomlinson) wrote :

Seeing that we no longer receive error reports re: this bug, I consider this fixed.

Changed in hud (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Pete Woods (pete-woods) wrote :

Just making sure the bug is still marked "in progress" until the packages migrate into trusty-updates.

Changed in hud (Ubuntu):
status: Fix Committed → In Progress
Changed in hud (Ubuntu Trusty):
status: Fix Committed → In Progress
Pete Woods (pete-woods)
Changed in hud (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package hud - 14.10+14.10.20140617-0ubuntu1

---------------
hud (14.10+14.10.20140617-0ubuntu1) utopic; urgency=medium

  [ Pete Woods ]
  * Forward port changes from trusty.

hud (14.04+14.04.20140604-0ubuntu1) trusty; urgency=medium

  [ Pete Woods ]
  * Resolve crasher in previous attempted SRU. (LP: #1298656)
    - Fix order of menu traversal.
    - Add timeout to legacy HUD queries.
    - Improve legacy menu safety valve trigger.
    - Remove duplicate entries in upstart job.
 -- Ubuntu daily release <email address hidden> Tue, 17 Jun 2014 11:23:25 +0000

Changed in hud (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package hud - 14.04+14.04.20140604-0ubuntu1

---------------
hud (14.04+14.04.20140604-0ubuntu1) trusty; urgency=medium

  [ Pete Woods ]
  * Resolve crasher in previous attempted SRU. (LP: #1298656)
    - Fix order of menu traversal.
    - Add timeout to legacy HUD queries.
    - Improve legacy menu safety valve trigger.
    - Remove duplicate entries in upstart job.
 -- Ubuntu daily release <email address hidden> Wed, 04 Jun 2014 14:04:12 +0000

Changed in hud (Ubuntu Trusty):
status: In Progress → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

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