FS#42422 - [evince] plugin loads GTK3 shared library into apps using GTK2 (Firefox, Thunderbird) causing freeze

Attached to Project: Arch Linux
Opened by Raymond W. Ko (kokonut) - Friday, 17 October 2014, 15:07 GMT
Last edited by Jan de Groot (JGC) - Monday, 20 October 2014, 17:51 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jan de Groot (JGC)
Jan Alexander Steffens (heftig)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 18
Private No

Details

Description:
This problem was hard to track down, but apparently installing evince creates a file:
/usr/lib/mozilla/plugins/libevbrowserplugin.so
This file is then automatically loaded by Firefox and Thunderbird as an add-on.
However, even though this isn't necessarily directly used, the GTK3 shared library is loaded into GTK2 processes (Firefox, and Thunderbird).
This apparently wreaks all sort of subtle havoc, eventually causing stuff like:

(firefox:27332): GLib-GObject-WARNING **: cannot register existing type 'GdkKeymap'

(firefox:27332): GLib-CRITICAL **: g_once_init_leave: assertion 'result != 0' failed

(firefox:27332): Gdk-CRITICAL **: gdk_keymap_have_bidi_layouts: assertion 'GDK_IS_KEYMAP (keymap)' failed

Then once it tries to do something "complex" with the keyboard, it freezes the entire program. In this case,
I have xcape-git from AUR and pentadactyl Firefox extension, and opening the completion menu and then
pressing 'Escape'.

To make sure it is not xcape-git, I disabled this, and things were fine for a while, but unexplainable freezes eventually occurred.

Attach is a list of shared libraries that are loaded into Firefox.

(gdb) bt
#0 0x00007f242e16a0d9 in syscall () from /usr/lib/libc.so.6
#1 0x00007f24253eb10c in g_cond_wait () from /usr/lib/libglib-2.0.so.0
#2 0x00007f24253cd6db in g_once_init_enter () from /usr/lib/libglib-2.0.so.0
#3 0x00007f240a892a88 in gdk_keymap_get_type () from /usr/lib/libgdk-3.so.0
#4 0x00007f240a892b8e in gdk_keymap_have_bidi_layouts () from /usr/lib/libgdk-3.so.0
#5 0x00007f242b1f941a in ?? () from /usr/lib/firefox/libxul.so
#6 0x00007f242567b255 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#7 0x00007f242568cf5c in ?? () from /usr/lib/libgobject-2.0.so.0
#8 0x00007f2425695768 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#9 0x00007f2425695f1a in g_signal_emit_by_name () from /usr/lib/libgobject-2.0.so.0
#10 0x00007f242401e8c8 in ?? () from /usr/lib/libgdk-x11-2.0.so.0
#11 0x00007f242401edd6 in ?? () from /usr/lib/libgdk-x11-2.0.so.0
#12 0x00007f242401ee7e in ?? () from /usr/lib/libgdk-x11-2.0.so.0
#13 0x00007f24253a6a1d in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#14 0x00007f24253a6d08 in ?? () from /usr/lib/libglib-2.0.so.0
#15 0x00007f24253a6dbc in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#16 0x00007f242c061e7f in ?? () from /usr/lib/firefox/libxul.so
#17 0x00007f242c0661de in ?? () from /usr/lib/firefox/libxul.so
#18 0x00007f242bf7da04 in ?? () from /usr/lib/firefox/libxul.so
#19 0x00007f242bf5415c in ?? () from /usr/lib/firefox/libxul.so
#20 0x00007f242bfb7e6c in ?? () from /usr/lib/firefox/libxul.so
#21 0x00007f242c618533 in ?? () from /usr/lib/firefox/libxul.so
#22 0x00007f242c69461a in ?? () from /usr/lib/firefox/libxul.so
#23 0x00007f242c7c621e in ?? () from /usr/lib/firefox/libxul.so
#24 0x00007f242c7bf26c in ?? () from /usr/lib/firefox/libxul.so
#25 0x00007f242c7bd688 in ?? () from /usr/lib/firefox/libxul.so
#26 0x00007f242c7bd4af in XRE_main () from /usr/lib/firefox/libxul.so
#27 0x00000000004103b4 in _start ()


Additional info:
* package version(s)
* config and/or log files etc.


Steps to reproduce:
1. Install evince.
2. Start Firefox, make sure the evince plugin is loaded.
3. Eventually after some keyboard event, Firefox freezes.
(In my case, I have pentadactyl installed, and xcape-git running mapping a tap of Control to become Escape. I hit 'o' in Firefox to open a new URL menu and then hit Control to generate an escape key event.)

Workaround:
1. Uninstall evince
2. No freezes
This task depends upon

Closed by  Jan de Groot (JGC)
Monday, 20 October 2014, 17:51 GMT
Reason for closing:  Fixed
Additional comments about closing:  disabled browser plugin for now. No idea why it was added to evince in the first place...
Comment by Raymond W. Ko (kokonut) - Friday, 17 October 2014, 15:21 GMT
If you search Google for this phrase:
GLib-GObject-WARNING **: cannot register existing type 'GdkKeymap'

I think you see similar results of past bugs like this with the Unity plugin, and maybe even some version of Java, loading itself into Firefox and introducing GTK3 symbols.
Comment by Ole Ernst (olebowle) - Friday, 17 October 2014, 17:26 GMT
Confirmed, thanks for tracking this down! I had issues all day long. I could consistently freeze firefox with XF86Audio* and BrightnessUp and BrightnesDown button presses. Once I remove /usr/lib/mozilla/plugins/libevbrowserplugin.so the issue is gone!
Comment by Wojtek Warczakowski (wowar) - Friday, 17 October 2014, 18:20 GMT
I'm confirming too. Temporary solution is to remove /usr/lib/mozilla/plugins/libevbrowserplugin.so without uninstalling evince.
Comment by Joe M. (joe666) - Friday, 17 October 2014, 20:11 GMT
I confirm this issue as well. Instead of removing /usr/lib/mozilla/plugins/libevbrowserplugin.so, I tried disabling the evince plugin in the firefox add-ons, it worked for me.

EDIT: After a few hours the issue presented itself again, so I am now taking the actual removal of the file instead of just disabling it.
Comment by Wojtek Warczakowski (wowar) - Saturday, 18 October 2014, 07:13 GMT
Confirmed, disabling the evince plugin doesn't help.
Comment by Elijah Schwab (eschwab) - Saturday, 18 October 2014, 18:53 GMT
Confirmed, removing /usr/lib/mozilla/plugins/libevbrowserplugin.so works without uninstalling evince or disabling it in firefox.
Comment by mattia (nTia89) - Sunday, 19 October 2014, 17:01 GMT
I can't reproduce the bug!
Comment by Hexcles Ma (bob.robot) - Monday, 20 October 2014, 01:27 GMT
Confirmed the bug as well as the workaround (deleting the .so).

It really took me a while to figure out what the hell it is... Didn't think about it is an Evince plugin problem.
Comment by Michael (goodwill) - Monday, 20 October 2014, 07:40 GMT
Confirming bug and workaround.

Loading...