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
Member

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 @

@worldofpeace

This comment has been minimized.

Copy link
Member

worldofpeace commented Sep 3, 2019

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)

@danieldk danieldk force-pushed the danieldk:mutter-resume-fix branch from c7c3499 to 7ddd49a Sep 3, 2019
@worldofpeace

This comment has been minimized.

Copy link
Member

worldofpeace commented Sep 3, 2019

@GrahamcOfBorg build gnome3.mutter

@ofborg ofborg bot requested a review from worldofpeace Sep 3, 2019
@worldofpeace

This comment has been minimized.

Copy link
Member

worldofpeace commented Sep 3, 2019

Pulled in patches for 3.28 mutter too 8c772a6

@worldofpeace worldofpeace merged commit 72dc15c into NixOS:master Sep 3, 2019
13 of 15 checks passed
13 of 15 checks passed
grahamcofborg-eval Calculating Changed Outputs
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
gnome3.mutter on x86_64-darwin No attempt
Details
gnome3.mutter on aarch64-linux Success
Details
gnome3.mutter on x86_64-linux Success
Details
grahamcofborg-eval-check-maintainers matching changed paths to changed attrs...
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A darwin-tested
Details
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release-combined.nix -A tested
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A manual
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A options
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A manual
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A tarball
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A unstable
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
@danieldk danieldk deleted the danieldk:mutter-resume-fix branch Sep 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.