Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gnome3.mutter: fix segfault in dri_flush_front_buffer() #67986

Merged
merged 1 commit into from Sep 3, 2019

Conversation

danieldk
Copy link
Contributor

@danieldk danieldk commented Sep 3, 2019

Motivation for this change

The last few months I have run into an issue where if my machine resumes from suspend (Intel NUC8i5, Intel Iris Plus Graphics 655), Mutter segfaults, loses the whole session, and I am back in GDM. Shortened stack trace:

gdb) bt
#0  0x00007f254fc4bd33 in dri_flush_front_buffer ()
   from /nix/store/38nq875iq0dmvpvzhw2vrc56k7x103lr-mesa-19.1.3/lib/libgbm.so.1
#1  0x00007f253e20c94a in intel_flush_front ()
   from /run/opengl-driver/lib/dri/i965_dri.so
#2  0x00007f253e20c9cc in intel_glFlush ()
   from /run/opengl-driver/lib/dri/i965_dri.so
#3  0x00007f254c4a12fe in dri2_make_current ()
   from /nix/store/jidsgx7f5grm62yypkjgnxw1xxm40ig1-mesa-19.1.3-drivers/lib/libEGL_mesa.so.0
#4  0x00007f254c490585 in eglMakeCurrent ()
   from /nix/store/jidsgx7f5grm62yypkjgnxw1xxm40ig1-mesa-19.1.3-drivers/lib/libEGL_mesa.so.0
#5  0x00007f254fe91ad0 in InternalMakeCurrentVendor.isra.1 ()
   from /nix/store/09m1aqi2i3rnxcnj80c2ixzay94xlhas-libglvnd-1.0.0/lib/libEGL.so.1
#6  0x00007f255193f8f1 in _cogl_winsys_egl_make_current ()
   from /nix/store/qyi7xmdcvh2jlj7v0jh1l114syh7v27y-mutter-3.32.2/lib/mutter-4/libmutter-cogl-4.so.0
#7  0x00007f2551efcdd6 in meta_renderer_native_create_view ()
   from /nix/store/qyi7xmdcvh2jlj7v0jh1l114syh7v27y-mutter-3.32.2/lib/libmutter-4.so.0
#8  0x00007f2551e59c80 in meta_renderer_rebuild_views ()
   from /nix/store/qyi7xmdcvh2jlj7v0jh1l114syh7v27y-mutter-3.32.2/lib/libmutter-4.so.0
#9  0x00007f2551effaf7 in meta_stage_native_rebuild_views ()
   from /nix/store/qyi7xmdcvh2jlj7v0jh1l114syh7v27y-mutter-3.32.2/lib/libmutter-4.so.0

In the Mutter commit history I found the same call stack with Valgrind errors:

https://gitlab.gnome.org/GNOME/mutter/commit/56ddaaa3809240a357b5e19b5789d1aa49aaecc3

I have applied this patch two days ago and Mutter hasn't crashed since. I guess that NixOS 19.09 will probably not ship with GNOME 3.34, so it would be nice to have this fix in 19.09.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @

@ofborg ofborg bot added the 6.topic: GNOME GNOME desktop environment and its underlying platform label Sep 3, 2019
@worldofpeace
Copy link
Contributor

I have applied this patch two days ago and Mutter hasn't crashed since. I guess that NixOS 19.09 will probably not ship with GNOME 3.34, so it would be nice to have this fix in 19.09.

That is true, we'd have to work at super-human speed for that to even happen (plus branch of is actually two days before the release)

@worldofpeace
Copy link
Contributor

@GrahamcOfBorg build gnome3.mutter

@ofborg ofborg bot requested a review from worldofpeace September 3, 2019 13:35
@worldofpeace
Copy link
Contributor

Pulled in patches for 3.28 mutter too 8c772a6

@worldofpeace worldofpeace merged commit 72dc15c into NixOS:master Sep 3, 2019
@danieldk danieldk deleted the mutter-resume-fix branch September 3, 2019 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: GNOME GNOME desktop environment and its underlying platform 10.rebuild-darwin: 0 10.rebuild-linux: 11-100
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants