gnome-shell crashed with SIGSEGV in cogl_texture_get_height(texture=0x0) from clutter_offscreen_effect_real_paint_target() from clutter_offscreen_effect_paint_texture() from clutter_offscreen_effect_paint() from clutter_actor_continue_paint()

Bug #1795774 reported by errors.ubuntu.com bug bridge
30
This bug affects 2 people
Affects Status Importance Assigned to Milestone
mutter (Ubuntu)
Fix Released
Medium
Marco Trevisan (Treviño)
Bionic
Fix Released
Undecided
Marco Trevisan (Treviño)
Cosmic
Fix Released
Undecided
Marco Trevisan (Treviño)

Bug Description

[ Impact ]

Gnome shell crashes on cogl_texture_get_height

[ Test case ]

No clear reproducer is know for such issue, crashes should be monitored in e.u.c checking that this is not happening anymore for the version in proposed.

[ Regression potential ]

Low, the proposed fix is part of the current stable branch upstream and not changed in further revisions.

--

The Ubuntu Error Tracker has been receiving reports about a problem regarding gnome-shell. This problem was most recently seen with package version 3.30.0-1ubuntu2, the problem page at https://errors.ubuntu.com/problem/e5b2dcb04552882a76f1daa6b9f18ba864269d26 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/.

Related branches

summary: - /usr/bin/gnome-
- shell:11:cogl_texture_get_height:clutter_offscreen_effect_real_paint_target:clutter_offscreen_effect_paint_texture:clutter_offscreen_effect_paint:clutter_actor_continue_paint
+ gnome-shell crashed with SIGSEGV in cogl_texture_get_height() from
+ clutter_offscreen_effect_real_paint_target() from
+ clutter_offscreen_effect_paint_texture() from
+ clutter_offscreen_effect_paint() from clutter_actor_continue_paint()
Revision history for this message
Launchpad Janitor (janitor) wrote : Re: gnome-shell crashed with SIGSEGV in cogl_texture_get_height() from clutter_offscreen_effect_real_paint_target() from clutter_offscreen_effect_paint_texture() from clutter_offscreen_effect_paint() from clutter_actor_continue_paint()

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

Changed in gnome-shell (Ubuntu):
status: New → Confirmed
Changed in mutter (Ubuntu):
status: New → Confirmed
Changed in gnome-shell (Ubuntu):
importance: Undecided → Medium
Changed in mutter (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Gert van de Kraats (gkraats) wrote :

Problem can be solved at update_fbo() within clutter/clutter/clutter-offscreen-effect.c

In this case at update_fbo a texture should be alocated with width 2560 which is greater than maximal size 2048 of graphics cards.
Offscreen-effect does not support sliced textures, so this is impossible and fails.

Crash occurs because no texture is allocated but a framebuffer is present at priv->offscreen.
Code to free the framebuffer at priv->offscreen should be moved upwards at update_fbo, because it also should be executed in case texture allocation fails.
This leads to the fillowing proposed code:

  if (priv->texture != NULL)
    {
      cogl_handle_unref (priv->texture);
      priv->texture = NULL;
    }
  if (priv->offscreen != NULL)
    {
      cogl_handle_unref (priv->offscreen);
      priv->offscreen = NULL;
    }

  priv->texture =
    clutter_offscreen_effect_create_texture (self, fbo_width, fbo_height);
  if (priv->texture == NULL)
    return FALSE;

  cogl_pipeline_set_layer_texture (priv->target, 0, priv->texture);

  priv->fbo_width = fbo_width;
  priv->fbo_height = fbo_height;

  priv->offscreen = cogl_offscreen_new_to_texture (priv->texture);

Remember bug 1790525 also should be solved (which often causes an earlier crash), to make the solution complete.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thanks for that, Gert.

AFAIK mosts GPUs from the last decade support textures up to size 16384. And ideally all should at least support textures larger than the typical screen resolution they support. If your GL_MAX_TEXTURE_SIZE is 2048 then that's fairly old and uncommon. But certainly we should fix it.

My question is: what is the large actor 2560 pixels in size that the machine is trying to offscreen? It's also a performance bug (for all GPUs) if we're trying to offscreen any actor that large. Even if it doesn't crash, gnome-shell still shouldn't be doing that.

Since I am working in the area (https://gitlab.gnome.org/GNOME/mutter/merge_requests/117) the code is still fresh in my mind and I will try to implement your suggested fix. Thanks!

Changed in mutter (Ubuntu):
assignee: nobody → Daniel van Vugt (vanvugt)
Changed in gnome-shell (Ubuntu):
assignee: nobody → Daniel van Vugt (vanvugt)
summary: - gnome-shell crashed with SIGSEGV in cogl_texture_get_height() from
- clutter_offscreen_effect_real_paint_target() from
+ gnome-shell crashed with SIGSEGV in cogl_texture_get_height(texture=0x0)
+ from clutter_offscreen_effect_real_paint_target() from
clutter_offscreen_effect_paint_texture() from
clutter_offscreen_effect_paint() from clutter_actor_continue_paint()
Changed in mutter (Ubuntu):
status: Confirmed → Triaged
Changed in mutter (Ubuntu):
status: Triaged → In Progress
Revision history for this message
Daniel van Vugt (vanvugt) wrote :
Changed in mutter (Ubuntu):
assignee: Daniel van Vugt (vanvugt) → Marco Trevisan (Treviño) (3v1n0)
Changed in gnome-shell (Ubuntu):
status: Confirmed → In Progress
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mutter - 3.30.2-5

---------------
mutter (3.30.2-5) unstable; urgency=medium

  * d/p/clutter-Avoid-rounding-compensation-when-invalidating-2D-.patch,
    d/p/clutter-Fix-offscreen-effect-painting-of-clones.patch:
    - Fix offscreen-effect painting of clones in zoom mode (LP: #1767648,
      LP: #1779615)
  * d/p/cogl-auto-texture-Avoid-a-double-free-crash.patch,
    d/p/clutter-offscreen-effect-Disable-if-no-texture.patch:
    - Fix crash in dual monitor setup and gdm activation (LP: #1790525,
      LP: #1795774)

 -- Marco Trevisan (Treviño) <email address hidden> Thu, 24 Jan 2019 18:00:14 +0000

Changed in mutter (Ubuntu):
status: In Progress → Fix Released
Iain Lane (laney)
Changed in mutter (Ubuntu Bionic):
status: New → In Progress
Changed in mutter (Ubuntu Cosmic):
status: New → In Progress
Changed in mutter (Ubuntu Bionic):
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)
Changed in mutter (Ubuntu Cosmic):
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)
Changed in gnome-shell (Ubuntu Bionic):
assignee: nobody → Daniel van Vugt (vanvugt)
Changed in gnome-shell (Ubuntu Cosmic):
assignee: nobody → Daniel van Vugt (vanvugt)
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

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

Accepted mutter into cosmic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/mutter/3.30.2-1~ubuntu18.10.3 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 and change the tag from verification-needed-cosmic to verification-done-cosmic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-cosmic. 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 mutter (Ubuntu Cosmic):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-cosmic
no longer affects: gnome-shell (Ubuntu)
no longer affects: gnome-shell (Ubuntu Bionic)
no longer affects: gnome-shell (Ubuntu Cosmic)
Revision history for this message
Gert van de Kraats (gkraats) wrote :

Reinstalled current libmutter.
With dual monitor horizontal aside this problem could not be reproduced because
logon-session crashes before showing logon-screen, (caused by bug #1790525).

Installed proposed version:

apt list libmutter-3-0
Listing... Done
libmutter-3-0/cosmic-proposed,now 3.30.2-1~ubuntu18.10.3 i386 [installed]

No crash anymore when trying to suspend at logon-screen.
Problem is solved by proposed package. No new other problems detected.

tags: added: verification-done-cosmic
removed: verification-needed-cosmic
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mutter - 3.30.2-1~ubuntu18.10.3

---------------
mutter (3.30.2-1~ubuntu18.10.3) cosmic; urgency=medium

  * d/p/clutter-Avoid-rounding-compensation-when-invalidating-2D-.patch,
    d/p/clutter-Fix-offscreen-effect-painting-of-clones.patch:
    - Fix offscreen-effect painting of clones in zoom mode (LP: #1767648,
      LP: #1779615)
  * d/p/cogl-auto-texture-Avoid-a-double-free-crash.patch,
    d/p/clutter-offscreen-effect-Disable-if-no-texture.patch:
    - Fix crash in dual monitor setup and gdm activation (LP: #1790525,
      LP: #1795774)

 -- Marco Trevisan (Treviño) <email address hidden> Fri, 25 Jan 2019 11:09:33 +0000

Changed in mutter (Ubuntu Cosmic):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update 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 regressions.

Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

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

Accepted mutter into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/mutter/3.28.3+git20190124-0ubuntu18.04.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 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 and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. 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 mutter (Ubuntu Bionic):
status: In Progress → Fix Committed
tags: added: verification-needed-bionic
Revision history for this message
Gert van de Kraats (gkraats) wrote :

Verification succeeded. Problem solved

tags: added: verification-done-bionic
removed: verification-needed-bionic
tags: added: verification-done
removed: verification-needed
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

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

Accepted mutter into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/mutter/3.28.3+git20190124-0ubuntu18.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 and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. 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-bionic
removed: verification-done verification-done-bionic
Revision history for this message
Gert van de Kraats (gkraats) wrote :

Problem could not be reproduced, because it was hidden by bug #1795774.

After installation from proposed, the problem was solved:

root@gert-laptop:/etc/apt# dpkg -s libmutter-2-0 | grep Version
Version: 3.28.3+git20190124-0ubuntu18.04.2

Revision history for this message
Gert van de Kraats (gkraats) wrote :

I did at #14 again, set verification-done-bionic for this fix, as requested.
Again it disappears.
I now tested the fix 3 times (once for cosmic and twice for bionic).
This time I did the same test as at #8.
Whatever you do it was the last time I test this bug.

tags: added: verification-done-bionic
removed: verification-needed-bionic
tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mutter - 3.28.3+git20190124-0ubuntu18.04.2

---------------
mutter (3.28.3+git20190124-0ubuntu18.04.2) bionic; urgency=medium

  * control: Add Breaks on budgie-desktop verions broken by this upload.
    budgie-desktop needs a fix in 10.4+git20171031.10.g9f71bb8-1.2ubuntu1.2
    for compatibility with this mutter.

mutter (3.28.3+git20190124-0ubuntu18.04.1) bionic; urgency=medium

  * New upstream git snapshot based on 3.28.3 plus commits up to 4af8d9d47
    (LP: #1811900)
    - Fix crash in dual monitor setup and gdm activation (LP: #1790525,
      LP: #1795774)
    - Make possible to launch gnome-shell in wayland using nvidia and EGLDevice
      backend (LP: #1805444)
  * debian/libmutter-2-0.symbols: Add new symbols
  * d/p/gpu-kms-Don-t-crash-if-drmModeGetResources-returns-N.patch,
    d/p/native-gpu-Handle-drmModeSetCrtc-failing-gracefully.patch,
    d/p/monitor-manager-Filter-out-low-screen-resolutions.patch,
    d/p/window-wayland-Always-update-monitor-for-non-user-ops.patch,
    d/p/window-Don-t-refuse-to-move-focus-to-the-grab-window.patch,
    d/p/window-Explicitly-exclude-unmanaging-window-from-focus-ag.patch,
    d/p/monitor-Use-current-monitor-mode-to-check-whether-active.patch,
    d/p/core-Return-1-if-meta_window_get_monitor-is-called-on-an-.patch,
    d/p/renderer-native-Fallback-to-non-planar-API-if-gbm_bo_get_.patch,
    d/p/clutter-x11-Implement-keycode-lookup-from-keysyms-on-virt.patch,
    d/p/clutter-Do-not-latch-modifiers-on-modifier-keys.patch:
    - Removed as applied upstream
  * d/p/clutter-Fix-offscreen-effect-painting-of-clones.patch:
    - Fix offscreen-effect painting of clones in zoom mode (LP: #1767648,
      LP: #1779615)

 -- Iain Lane <email address hidden> Wed, 17 Apr 2019 11:35:51 +0100

Changed in mutter (Ubuntu Bionic):
status: Fix Committed → 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.