NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.08k stars 14.13k forks source link

Emacs (gtk?) crashes on `master` #37696

Closed peti closed 6 years ago

peti commented 6 years ago

I recently updated my installed Emacs to git master at 3a7854032afc792e42e0a724919969ade3a5b694. Ever since then, my Emacs crashes when I move the mouse over an URL in a text buffer. I don't have to actually click on it -- just hovering over the URL suffices to crash the process. My syslog journal says:

Mar 23 12:57:18 latitude .emacs-25.3-wra[7727]: Could not load a pixbuf from /org/gtk/libgtk/icons/16x16/status/image-missing.png.
                                                This may indicate that pixbuf loaders or the mime database could not be found.
Mar 23 12:57:18 latitude xsession[29557]: **
Mar 23 12:57:18 latitude xsession[29557]: Gtk:ERROR:gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /org/gtk/libgtk/icons/16x16/status/image-missing.png: Unrecognized image file format (gdk-pixbuf-error-quark, 3)
Mar 23 12:57:19 latitude xsession[29557]: Backtrace:
Mar 23 12:57:19 latitude xsession[29557]: /nix/store/hkz34n0aw65ngk1ripq7jzp9z8fsn6kc-emacs-25.3/bin/.emacs-wrapped[0x50904e]
Mar 23 12:57:19 latitude xsession[29557]: /nix/store/hkz34n0aw65ngk1ripq7jzp9z8fsn6kc-emacs-25.3/bin/.emacs-wrapped[0x4eee78]
Mar 23 12:57:19 latitude xsession[29557]: /nix/store/hkz34n0aw65ngk1ripq7jzp9z8fsn6kc-emacs-25.3/bin/.emacs-wrapped[0x50741e]
Mar 23 12:57:19 latitude xsession[29557]: /nix/store/hkz34n0aw65ngk1ripq7jzp9z8fsn6kc-emacs-25.3/bin/.emacs-wrapped[0x5075d8]
Mar 23 12:57:19 latitude xsession[29557]: /nix/store/hkz34n0aw65ngk1ripq7jzp9z8fsn6kc-emacs-25.3/bin/.emacs-wrapped[0x5076c9]
Mar 23 12:57:19 latitude xsession[29557]: /nix/store/84h2zni7h805k0i1ys2bba3dsp1cqnhh-glibc-2.26-131/lib/libpthread.so.0(+0x11dd0)[0x7fbe914d3dd0]
Mar 23 12:57:19 latitude xsession[29557]: /nix/store/84h2zni7h805k0i1ys2bba3dsp1cqnhh-glibc-2.26-131/lib/libc.so.6(gsignal+0x104)[0x7fbe90d29264]
Mar 23 12:57:19 latitude xsession[29557]: /nix/store/84h2zni7h805k0i1ys2bba3dsp1cqnhh-glibc-2.26-131/lib/libc.so.6(abort+0x165)[0x7fbe90d2a665]
Mar 23 12:57:19 latitude xsession[29557]: /nix/store/dqlc8y4phlg1hmdbwkhqfwhnxcac88d1-glib-2.56.0/lib/libglib-2.0.so.0(g_assertion_message+0x1b5)[0x7fbe94801695]
Mar 23 12:57:19 latitude xsession[29557]: /nix/store/dqlc8y4phlg1hmdbwkhqfwhnxcac88d1-glib-2.56.0/lib/libglib-2.0.so.0(g_assertion_message_error+0xae)[0x7fbe94801ede]
Mar 23 12:57:19 latitude xsession[29557]: /nix/store/yga9wkdscdxpzacdy58ncab451w3i7cp-gtk+3-3.22.29/lib/libgtk-3.so.0(+0x1f3c8d)[0x7fbe9634cc8d]
Mar 23 12:57:19 latitude xsession[29557]: /nix/store/yga9wkdscdxpzacdy58ncab451w3i7cp-gtk+3-3.22.29/lib/libgtk-3.so.0(+0x1f4367)[0x7fbe9634d367]
Mar 23 12:57:19 latitude xsession[29557]: /nix/store/yga9wkdscdxpzacdy58ncab451w3i7cp-gtk+3-3.22.29/lib/libgtk-3.so.0(+0x1f4494)[0x7fbe9634d494]
Mar 23 12:57:19 latitude xsession[29557]: /nix/store/yga9wkdscdxpzacdy58ncab451w3i7cp-gtk+3-3.22.29/lib/libgtk-3.so.0(+0x1f4678)[0x7fbe9634d678]
Mar 23 12:57:19 latitude xsession[29557]: /nix/store/yga9wkdscdxpzacdy58ncab451w3i7cp-gtk+3-3.22.29/lib/libgtk-3.so.0(+0x20793d)[0x7fbe9636093d]
Mar 23 12:57:19 latitude xsession[29557]: /nix/store/yga9wkdscdxpzacdy58ncab451w3i7cp-gtk+3-3.22.29/lib/libgtk-3.so.0(+0x16ca33)[0x7fbe962c5a33]
Mar 23 12:57:19 latitude xsession[29557]: /nix/store/yga9wkdscdxpzacdy58ncab451w3i7cp-gtk+3-3.22.29/lib/libgtk-3.so.0(+0x170b41)[0x7fbe962c9b41]
Mar 23 12:57:19 latitude xsession[29557]: /nix/store/yga9wkdscdxpzacdy58ncab451w3i7cp-gtk+3-3.22.29/lib/libgtk-3.so.0(+0x208093)[0x7fbe96361093]
Mar 23 12:57:19 latitude xsession[29557]: /nix/store/yga9wkdscdxpzacdy58ncab451w3i7cp-gtk+3-3.22.29/lib/libgtk-3.so.0(+0x2ce1a1)[0x7fbe964271a1]
Mar 23 12:57:19 latitude xsession[29557]: /nix/store/yga9wkdscdxpzacdy58ncab451w3i7cp-gtk+3-3.22.29/lib/libgtk-3.so.0(+0x2ce43c)[0x7fbe9642743c]
Mar 23 12:57:19 latitude xsession[29557]: /nix/store/yga9wkdscdxpzacdy58ncab451w3i7cp-gtk+3-3.22.29/lib/libgtk-3.so.0(gtk_widget_get_preferred_height_and_baseline_for_width+0xb5)[0x7fbe96427745]
Mar 23 12:57:19 latitude xsession[29557]: /nix/store/yga9wkdscdxpzacdy58ncab451w3i7cp-gtk+3-3.22.29/lib/libgtk-3.so.0(+0x11d5f6)[0x7fbe962765f6]
Mar 23 12:57:19 latitude xsession[29557]: /nix/store/yga9wkdscdxpzacdy58ncab451w3i7cp-gtk+3-3.22.29/lib/libgtk-3.so.0(+0x16ca33)[0x7fbe962c5a33]
Mar 23 12:57:19 latitude xsession[29557]: /nix/store/yga9wkdscdxpzacdy58ncab451w3i7cp-gtk+3-3.22.29/lib/libgtk-3.so.0(+0x170b41)[0x7fbe962c9b41]
Mar 23 12:57:19 latitude xsession[29557]: /nix/store/yga9wkdscdxpzacdy58ncab451w3i7cp-gtk+3-3.22.29/lib/libgtk-3.so.0(+0x11df53)[0x7fbe96276f53]
Mar 23 12:57:19 latitude xsession[29557]: /nix/store/yga9wkdscdxpzacdy58ncab451w3i7cp-gtk+3-3.22.29/lib/libgtk-3.so.0(+0x2ce1a1)[0x7fbe964271a1]
Mar 23 12:57:19 latitude xsession[29557]: /nix/store/yga9wkdscdxpzacdy58ncab451w3i7cp-gtk+3-3.22.29/lib/libgtk-3.so.0(+0x2ce43c)[0x7fbe9642743c]
Mar 23 12:57:19 latitude xsession[29557]: /nix/store/yga9wkdscdxpzacdy58ncab451w3i7cp-gtk+3-3.22.29/lib/libgtk-3.so.0(gtk_widget_get_preferred_height+0x91)[0x7fbe96426961]
Mar 23 12:57:19 latitude xsession[29557]: /nix/store/yga9wkdscdxpzacdy58ncab451w3i7cp-gtk+3-3.22.29/lib/libgtk-3.so.0(+0x38d6a2)[0x7fbe964e66a2]
Mar 23 12:57:19 latitude xsession[29557]: /nix/store/yga9wkdscdxpzacdy58ncab451w3i7cp-gtk+3-3.22.29/lib/libgtk-3.so.0(+0x2cdc2c)[0x7fbe96426c2c]
Mar 23 12:57:19 latitude xsession[29557]: /nix/store/yga9wkdscdxpzacdy58ncab451w3i7cp-gtk+3-3.22.29/lib/libgtk-3.so.0(+0x2ce43c)[0x7fbe9642743c]
Mar 23 12:57:19 latitude xsession[29557]: /nix/store/yga9wkdscdxpzacdy58ncab451w3i7cp-gtk+3-3.22.29/lib/libgtk-3.so.0(gtk_widget_get_preferred_height_and_baseline_for_width+0xb5)[0x7fbe96427745]
Mar 23 12:57:19 latitude xsession[29557]: /nix/store/yga9wkdscdxpzacdy58ncab451w3i7cp-gtk+3-3.22.29/lib/libgtk-3.so.0(+0x2ce883)[0x7fbe96427883]
Mar 23 12:57:19 latitude xsession[29557]: /nix/store/yga9wkdscdxpzacdy58ncab451w3i7cp-gtk+3-3.22.29/lib/libgtk-3.so.0(+0x38f794)[0x7fbe964e8794]
Mar 23 12:57:19 latitude xsession[29557]: /nix/store/yga9wkdscdxpzacdy58ncab451w3i7cp-gtk+3-3.22.29/lib/libgtk-3.so.0(+0x390176)[0x7fbe964e9176]
Mar 23 12:57:19 latitude xsession[29557]: /nix/store/dqlc8y4phlg1hmdbwkhqfwhnxcac88d1-glib-2.56.0/lib/libgobject-2.0.so.0(+0xfc66)[0x7fbe94ab5c66]
Mar 23 12:57:19 latitude xsession[29557]: /nix/store/dqlc8y4phlg1hmdbwkhqfwhnxcac88d1-glib-2.56.0/lib/libgobject-2.0.so.0(g_signal_emit_valist+0xd5f)[0x7fbe94ad115f]
Mar 23 12:57:19 latitude xsession[29557]: /nix/store/dqlc8y4phlg1hmdbwkhqfwhnxcac88d1-glib-2.56.0/lib/libgobject-2.0.so.0(g_signal_emit+0x8f)[0x7fbe94ad188f]
Mar 23 12:57:19 latitude xsession[29557]: /nix/store/yga9wkdscdxpzacdy58ncab451w3i7cp-gtk+3-3.22.29/lib/libgtk-3.so.0(+0x3921f5)[0x7fbe964eb1f5]
Mar 23 12:57:19 latitude xsession[29557]: /nix/store/dqlc8y4phlg1hmdbwkhqfwhnxcac88d1-glib-2.56.0/lib/libgobject-2.0.so.0(g_closure_invoke+0x19d)[0x7fbe94ab5a2d]
Mar 23 12:57:19 latitude xsession[29557]: /nix/store/dqlc8y4phlg1hmdbwkhqfwhnxcac88d1-glib-2.56.0/lib/libgobject-2.0.so.0(+0x2288e)[0x7fbe94ac888e]
Mar 23 12:57:19 latitude xsession[29557]: ...
Mar 23 12:57:19 latitude xsession[29557]: user error (Error in function getWindowAttributes)

I have other regular X-related crashes that appeared only after updating to the latest master a day ago:

Mar 23 12:57:47 latitude kernel: xmobar[7370]: segfault at 6300000004 ip 00000000007ba57f sp 00007ffedf067a80 error 4 in xmobar[400000+3ea000]

My system runs nixos-unstable @ cc4677c36ee, and my user installs packages directly from git master as mentioned above. nix-info says:

$ nix-info
system: "x86_64-linux", multi-user?: yes, version: nix-env (Nix) 2.0, channels(simons): "nixpkgs-17.09.1502.19879836d1", channels(root): "nixos-18.03pre130932.cc4677c36ee", nixpkgs: /home/simons/.nix-defexpr
jtojnar commented 6 years ago

Bah, that looks very much like the shared-mime-info issue from #36312. I guess we need to patch GLib after all. I do not understand how it worked before, though – it should have been always required accoding to https://github.com/GNOME/gdk-pixbuf/blob/e48c4d5d69bed5b93a1cc63df21ff97dcecc658c/meson.build#L189.

peti commented 6 years ago

OK, I compiled a new emacs binary with 3abd1ec53d4d373f2fd1b697bc9ea191137e5d19 reverted and that version works fine. No more crashes.

peti commented 6 years ago

I keep running into more and more issues. pavucontrol is broken, too. It crashes right after being started:

(pavucontrol:9253): Gtk-WARNING **: 14:06:50.775: Could not load a pixbuf from icon theme.
This may indicate that pixbuf loaders or the mime database could not be found.
**
Gtk:ERROR:gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /nix/store/cc0ws3mz8ap3a60nib5n5cgxfd6laz6y-adwaita-icon-theme-3.28.0/share/icons/Adwaita/16x16/status/image-missing.png: Unrecognized image file format (gdk-pixbuf-error-quark, 3)

@jtojnar, can we please revert this commit in master and commit an update once a fixed version is available?

peti commented 6 years ago

https://github.com/NixOS/nixpkgs/commit/cb6f88ce5ea98998701e1d49690e294ab2613daa should fix this for the time being.