FS#34892 - [glib2] 2.36.1-1 causes fusion-icon to crash

Attached to Project: Arch Linux
Opened by Pantelis Panayiotou (plp) - Monday, 22 April 2013, 18:11 GMT
Last edited by Bartłomiej Piotrowski (Barthalion) - Thursday, 02 January 2014, 21:01 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Jan de Groot (JGC)
Jan Alexander Steffens (heftig)
Architecture i686
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 23
Private No

Details

Description:
------------
This has broken the desktop of several people who use Compiz with XFCE4. Downgrading to glib2 2.34 solves the problem. However, this is not an option, as doing so breaks a number of Gnome apps.

More information can be found in this post:

https://bbs.archlinux.org/viewtopic.php?pid=1262345#p1262345

Additional info:
----------------

GDB output:

(gdb) exec-file python2
(gdb) run /usr/bin/fusion-icon
Starting program: /usr/bin/python2 /usr/bin/fusion-icon
warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7ffff7ffa000
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
* Detected Session: xfce
* Searching for installed applications...
* Using the GTK Interface

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff74d1206 in __strcmp_sse2 () from /usr/lib/libc.so.6
(gdb) bt
#0 0x00007ffff74d1206 in __strcmp_sse2 () from /usr/lib/libc.so.6
#1 0x00007ffff3b557b9 in g_str_equal () from /usr/lib/libglib-2.0.so.0
#2 0x00007ffff3b54ee0 in g_hash_table_lookup () from /usr/lib/libglib-2.0.so.0
#3 0x00007ffff3b74670 in g_quark_from_static_string ()
from /usr/lib/libglib-2.0.so.0
#4 0x00007ffff0be67bc in ?? () from /usr/lib/libgobject-2.0.so.0
#5 0x00007ffff7de9a9a in call_init () from /lib64/ld-linux-x86-64.so.2
#6 0x00007ffff7de9b6c in _dl_init_internal () from /lib64/ld-linux-x86-64.so.2
#7 0x00007ffff7dedbd5 in dl_open_worker () from /lib64/ld-linux-x86-64.so.2
#8 0x00007ffff7de9914 in _dl_catch_error () from /lib64/ld-linux-x86-64.so.2
#9 0x00007ffff7ded44b in _dl_open () from /lib64/ld-linux-x86-64.so.2
#10 0x00007ffff724e02b in ?? () from /usr/lib/libdl.so.2
#11 0x00007ffff7de9914 in _dl_catch_error () from /lib64/ld-linux-x86-64.so.2
#12 0x00007ffff724e5dd in ?? () from /usr/lib/libdl.so.2
#13 0x00007ffff724e0c1 in dlopen () from /usr/lib/libdl.so.2
#14 0x00007ffff7b2158f in _PyImport_GetDynLoadFunc ()
from /usr/lib/libpython2.7.so.1.0
#15 0x00007ffff7b0aace in _PyImport_LoadDynamicModule ()
from /usr/lib/libpython2.7.so.1.0
#16 0x00007ffff7b08cd9 in import_submodule () from /usr/lib/libpython2.7.so.1.0
#17 0x00007ffff7b08f1d in load_next () from /usr/lib/libpython2.7.so.1.0
#18 0x00007ffff7b09888 in PyImport_ImportModuleLevel ()
from /usr/lib/libpython2.7.so.1.0

Steps to reproduce:
-------------------

Just execute fusion-icon.
This task depends upon

Closed by  Bartłomiej Piotrowski (Barthalion)
Thursday, 02 January 2014, 21:01 GMT
Reason for closing:  Won't fix
Additional comments about closing:  Compiz and its related packages have been dropped to AUR.
Comment by Vlastik Plaminek (vlastikcz) - Monday, 22 April 2013, 19:00 GMT
This also affects Skype and lib32-glib2 on amd64- https://bbs.archlinux.org/viewtopic.php?id=154571.
Comment by Darren Davison (davison) - Monday, 22 April 2013, 22:55 GMT
This is also more general than fusion-icon. I don't have that or compiz installed but I was unable to use xfce at all for more than a few seconds after login before errors like:

Apr 22 21:37:07 hepburn kernel: xfce4-session[2128]: segfault at ffffffff00000000 ip 00007fa36e156537 sp 00007fff72717340 error 5 in libglib-2.0.so.0.3600.1[7fa36e0f3000+fc000]

leading to several components dumping core and session crash/logout. Reverting to 2.34 has solved this for now.
Comment by Larry Johnson (keepitsimpleengineer) - Monday, 22 April 2013, 23:39 GMT
Same failure for me. 2wit

[--ljohnson{16:32:22}~]$ fusion-icon
* Detected Session: xfce
* Searching for installed applications...
* NVIDIA on Xorg detected, exporting: __GL_YIELD=NOTHING
* Using the GTK Interface
Segmentation fault (core dumped)
Comment by Pantelis Panayiotou (plp) - Tuesday, 23 April 2013, 05:09 GMT
I actually think severity for this should be at least "High", as it prevents people from using their desktop.
Comment by Stefan Schindler (TankBo) - Tuesday, 23 April 2013, 05:54 GMT
This might be even related to https://bugs.archlinux.org/task/34871 (GIMP not starting) too (see my second comment there).
Comment by David Barri (japgolly) - Tuesday, 23 April 2013, 07:22 GMT
Having the same issue with cairo-dock so probably related: https://bugs.archlinux.org/task/34904
Comment by Darren Davison (davison) - Tuesday, 23 April 2013, 09:30 GMT
This looks pretty widespread in terms of affected glib2 clients and is clearly high impact for those using such binaries.. priority for this should be increased.
Comment by Philip (nuc) - Tuesday, 23 April 2013, 11:22 GMT Comment by Robert (rmetzger) - Tuesday, 23 April 2013, 11:29 GMT
It seems that glib2 also causes xfce4-session and others to crash on my system. It's probaby a bug in glib2 that affects many users
Comment by Florian Pritz (bluewind) - Tuesday, 23 April 2013, 14:38 GMT
Please test glib2 from testing.
Comment by Robert (rmetzger) - Tuesday, 23 April 2013, 15:27 GMT
glib2 from testing does not resolve the issues.

That's exactly the line from dmesg:
xfce4-session[451]: segfault at ffffffff00000000 ip 00007f9802f24537 sp 00007fffb8eeba50 error 5 in libglib-2.0.so.0.3600.1[7f9802ec1000+fc000]

robert@robert-tp /usr/lib % pacman -Qo ./libglib-2.0.so.0.3600.1
./libglib-2.0.so.0.3600.1 is owned by glib2 2.36.1-2

Comment by ianc (ianc) - Tuesday, 23 April 2013, 15:30 GMT
Unfortunately no success here with that version in testing:

$ pacman -Qi glib2 | grep -i version
Version : 2.36.1-2
$ fusion-icon
* Detected Session: /usr/bin/startxfce4
* Searching for installed applications...
* Intel detected, exporting: INTEL_BATCH=1
* Using the GTK Interface
Segmentation fault (core dumped)

Comment by Robert (rmetzger) - Tuesday, 23 April 2013, 20:49 GMT
I think the xfce4-session bug? is documented here: https://bugzilla.xfce.org/show_bug.cgi?id=9709
Fedora users also seem to experience the problem.

I could not find a relevant bug at the GTK+ tracker: https://bugzilla.gnome.org/buglist.cgi?quicksearch=magazine_chain_pop_head
Comment by Pantelis Panayiotou (plp) - Wednesday, 24 April 2013, 05:35 GMT
I looked into the code a bit last night. The crash is caused by g_str_equal() receiving a string that isn't null terminated and passing it to strcmp(), thus causing a buffer overrun. From the backtrace, this string appears to be passed to g_str_equal() from g_hash_table_lookup(), which is in turn called by g_quark_from_static_string(). I didn't have time to investigate which of these functions generates the non-null terminated string.

The code of g_str_equal() is in glib/ghash.c, and is quite straightforward. So, one can see how the crash is caused:

gboolean
g_str_equal (gconstpointer v1,
gconstpointer v2)
{
const gchar *string1 = v1;
const gchar *string2 = v2;

return strcmp (string1, string2) == 0;
}
Comment by John Lindgren (jlindgren) - Wednesday, 24 April 2013, 09:08 GMT
EDIT: Sorry, I didn't look close enough at the backtrace; this doesn't look like the same problem as #34630.

Please take a look at https://bugs.archlinux.org/task/34630#comment108896.

Is this the same g_quark_from_static_string() that is called during libgobject initialization? If so, it may not be actually calling strcmp() but executing some random other code instead due to the linking problem I described (just as g_malloc() thought it was calling malloc() but instead tried to read a DWORD from port 24h.)
Comment by David Polák (Cz-David) - Wednesday, 24 April 2013, 12:16 GMT
For me it crashes even sooner, I remember installing clang and experimenting with llvm that day, but I don't exactly remember what packages got reinstalled.

(gdb) run /usr/bin/fusion-icon
Starting program: /usr/bin/python2 /usr/bin/fusion-icon
warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7ffff7ffa000
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
* Detected Session: unknown
* Searching for installed applications...

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff757735c in __strcmp_ssse3 () from /usr/lib/libc.so.6
(gdb) bt
#0 0x00007ffff757735c in __strcmp_ssse3 () from /usr/lib/libc.so.6
#1 0x00007ffff3b577b9 in g_str_equal () from /usr/lib/libglib-2.0.so.0
#2 0x00007ffff3b56ee0 in g_hash_table_lookup () from /usr/lib/libglib-2.0.so.0
#3 0x00007ffff3b76a70 in g_intern_static_string () from /usr/lib/libglib-2.0.so.0
Comment by Pantelis Panayiotou (plp) - Wednesday, 24 April 2013, 13:19 GMT
hlindgren:

I tried the fix proposed in the bug report you sent (adding a "sed -ie '/SANE_MALLOC_PROTOS/d' config.h" between configure and make) and the crash still happens for me. Also, I tried adding a printf("%s %s\n", string1, string2); before the return statement, and fusion-icon crashed when executing that printf().

So, you are right: this isn't the same problem as that of #34630.
Comment by David Batson (David_Batson) - Friday, 26 April 2013, 09:58 GMT
I am also affected by this bug as I am using XFCE and Compiz (fusion-icon). Segmentation fault.

For the time being, I found I can launch xfwm4 from terminal as user to get my mouse cursor and window decorations back (although I cannot see the cursor before I do this, I can see the desktop and taskbar icons "highlight" and when my invisible mouse passes over them and can then click on the icons to launch whatever).

I hope the solution is found soon. I want my Compiz back (I have video tearing without it).
Comment by Jelle van der Waa (jelly) - Friday, 26 April 2013, 10:07 GMT
I don't think upstream will ever fix this issue. Since the last commit is 5 years ago http://cgit.compiz.org/~crdlb/fusion-icon/log/
Comment by budiman (crazyg4merz) - Friday, 26 April 2013, 10:33 GMT
@david u can use another way to use compiz for workaround. Like autostart using compiz --replace ccp command or edit your xfce4-session like the wiki mentioned. But u can't use metacity window decoration without fusion-icon, so I just switch to emerald until this bug is fixed :-)
@jelle I think this bug is caused by glib2 update, so this maybe can be fixed by gnome devs :-)
Comment by Pantelis Panayiotou (plp) - Friday, 26 April 2013, 17:24 GMT
Hi David. As I've already mentioned in the bug report, "fusion-icon -u" worked for me as well, though without the useful icon in the taskbar.
Comment by Pantelis Panayiotou (plp) - Saturday, 27 April 2013, 12:54 GMT
I wrote a small patch for fusion-icon that fixes this bug - for me, at least. I'm attaching an updated package (and source package) for fusion-icon. Can you please test it and tell me if it works for you?


What I did and how it works:

I noticed that Python crashes when the script attempts to "import gtk" within an if block that resides in a function. However, "import gtk" works fine when executed as a stand-alone statement. So, I added the following lines of code to /usr/bin/fusion-icon:

try:
import gtk
except ImportError:
pass

This way, the gtk module gets imported correctly (if it exists) and no crash occures when the program tries to reload it later on.

Note that this is essentially a workaround. The bug that's causing the crash is still hidden somewhere in the code of glib and/or pygtk. After all, interpreters and GUI libraries aren't supposed to dump core when you try to run a script.
Comment by Daniel Kirchner (ekpyron) - Saturday, 27 April 2013, 16:13 GMT
glib2-2.36.1-3 fixes this for me [I was wrong, see below]
Comment by Pantelis Panayiotou (plp) - Saturday, 27 April 2013, 16:21 GMT
For me, glib2-2.36.1-3 still causes the original fusion-icon package to crash. However, my patched version works fine with it.
Comment by Daniel Kirchner (ekpyron) - Saturday, 27 April 2013, 16:40 GMT
@plp You're right, I was still using a modified version of fusion-icon. Modifying /usr/bin/fusion-icon like in your patch didn't work for me before updating to glib2-2.36.1-3 (so I expected it to have no effect at all), but after updating AND using a patched version of fusion-icon everything works for me.
Comment by Michael Kogan (Photon) - Saturday, 27 April 2013, 17:09 GMT
I can also confirm that glib2-2.36.1-3 doesn't fix the fusion-icon issue.
Comment by David Batson (David_Batson) - Saturday, 27 April 2013, 22:38 GMT
[root@myhost ~]# pacman -Ss glib2 | grep installed
core/glib2 2.36.1-3 [installed]
multilib/lib32-glib2 2.36.1-3 [installed]

Your patched fusion-icon file works - sort of. Compiz runs and the icon works fine, but the "Log Out, Restart, Shut Down, Suspend, and Hibernate" icon just logs me out when I click on it. Also sometimes starting something like terminal or thunar brings me to the login screen.

For the time being I am using compton in place of Compiz. Compiz is definitely more feature-rich, but it just isn't working for me at this time.
http://www.neowin.net/forum/topic/1148464-using-compton-for-tear-free-compositing-in-xfce/
Comment by David Batson (David_Batson) - Sunday, 28 April 2013, 05:47 GMT
[root@myhost ~]# pacman -Ss glib2 | grep installed
core/glib2 2.36.1-3 [installed]
multilib/lib32-glib2 2.36.1-3 [installed]

Your patched fusion-icon file works - sort of. Compiz runs and the icon works fine, but the "Log Out, Restart, Shut Down, Suspend, and Hibernate" icon just logs me out when I click on it. Also sometimes starting something like terminal or thunar brings me to the login screen.

For the time being I am using compton in place of Compiz. Compiz is definitely more feature-rich, but it just isn't working for me at this time.
http://www.neowin.net/forum/topic/1148464-using-compton-for-tear-free-compositing-in-xfce/
Comment by Pantelis Panayiotou (plp) - Sunday, 28 April 2013, 15:25 GMT
David_Batson:

It looks glib2 2.36.1 is causing X and compiz related crashes for other people, as well:

https://bbs.archlinux.org/viewtopic.php?pid=1262739

I'm not getting any of these though (except for the fusion-icon ones), and I have a suspicion that these may be video driver related. Are you using radeon, by any chance?
Comment by what now? (whoops) - Sunday, 28 April 2013, 15:53 GMT
nvidia(-ck) 313.30-5
... and affected + lots of random X crashes (after working around the initial problem).

( No idea if that's a "clue" or not but: I happened not to do a "real" reboot for some days - system was working fine even after the update until I hibernated yesterday and then it froze on thaw, which was when the problem first appeared. After downgrading though, stuff started working again without reboot. )
Comment by David Batson (David_Batson) - Sunday, 28 April 2013, 16:07 GMT
I am using the intel driver. Pure intel here.
Comment by Michael Kogan (Photon) - Sunday, 28 April 2013, 16:31 GMT
I'm using Catalyst and get NO crashes besides of the fusion-icon segmentation fault.
Comment by Philip (nuc) - Sunday, 28 April 2013, 16:56 GMT
@plp: I am the one who posted the thread in Arch forums. I use Radeon drivers yes. But you could have also seen that from the logs :P
Comment by Pantelis Panayiotou (plp) - Sunday, 28 April 2013, 17:13 GMT
nuc: Yes, that's where I saw it. That's why I asked. ;)

whoops: I had a similar problem a few days ago, one that's still unresolved. I reported it on bbs but got no replies, and have no idea what to do about it. I'm scared of looking into Kernel code. https://bbs.archlinux.org/viewtopic.php?id=161100

Anyway, if we now know what causes the fusion-icon crash, and we know how to fix it, how do we communicate the fact to the maintainers of the package so that they can fix it? I'm not sure if anyone "in charge" is paying any attention to this bug...
Comment by Philip (nuc) - Sunday, 28 April 2013, 17:43 GMT
@plp: Well this bug is on the forth place already https://bugs.archlinux.org/index/proj1?do=index&project=1&order=votes&sort=desc so they must needs pay attention :D
Comment by Pantelis Panayiotou (plp) - Monday, 29 April 2013, 17:28 GMT
Regarding all those people who have been complaining about random crashes, has anyone seen this?

https://projects.archlinux.org/svntogit/packages.git/commit/trunk?h=packages/xfce4-session&id=5eeb5523deefc75a3bfa9044e1224d4eda1acdc4
Comment by Darren Davison (davison) - Monday, 29 April 2013, 18:06 GMT
I just applied that upgrade (xfce4-session) and as far as I can tell so far it has fixed all the crashes I was having with glib2-2.36. Nice.
Comment by Alfredo Amatriain (amatriain) - Monday, 29 April 2013, 18:30 GMT
xfce4-session 4.10.0-7 does not fix the fusion-icon crash for me.
Comment by Pantelis Panayiotou (plp) - Monday, 29 April 2013, 19:52 GMT
You may want to take a look at post #15 (by whoops) in the discussion thread:

https://bbs.archlinux.org/viewtopic.php?pid=1265784#p1265784

It may be that the fusion-icon crash and the random XFCE session crashes are unrelated. However, it looks like we have fixes for both now. :-)
Comment by Philip (nuc) - Wednesday, 08 May 2013, 15:56 GMT
Since the latest updates (from yesterday or so), the fusion-icon wouldn't start for me (= no window manager) on xfce4. I need to start it manually via terminal. What's up there??

Btw I use method 3 from arch wiki https://wiki.archlinux.org/index.php/Compiz#Method_3:
Comment by David Batson (David_Batson) - Wednesday, 08 May 2013, 23:34 GMT
Fully updated. No problem here, but I am using method 1 from the arch wiki.
Comment by ianc (ianc) - Friday, 10 May 2013, 17:36 GMT
Confirmed: the workaround is no longer working here now when fusion-icon is launched using using Method 3.

Fusion-icon loads OK via the menu.
Comment by Pantelis Panayiotou (plp) - Friday, 10 May 2013, 17:59 GMT
It still works for me, and I'm using method 3. Can you try starting XFCE using 'startxfce4' and posting its output? Maybe this way we can figure out why this is happening for you.
Comment by ianc (ianc) - Friday, 10 May 2013, 18:44 GMT
"startxfce4" is the output from:

$ startxfce4 2> startxfce4out

"fusion-icon_out" is the output from

$ fusion-icon &

Comment by Pantelis Panayiotou (plp) - Friday, 10 May 2013, 19:28 GMT
My humble thoughts (without doing any searching on the error messages):

1. It doesn't look like fusion-icon is crashing. First, there's no message about a SIGSEGV. And, second, compiz gets started (you can tell because it prints a 'Failed to load slide' warning to stderr) and we know that the crash happens before fusion-icon gets a chance to start compiz.

2. I wonder if 'startxfce4 2>startxfce4out' captures the entire output of startxfce4. Can you try 'script -c startxfce4' and post the result of the resulting 'typescript' file?
Comment by Pantelis Panayiotou (plp) - Friday, 10 May 2013, 19:33 GMT
BTW, I put the patched fusion-icon in AUR:

https://aur.archlinux.org/packages/fusion-icon-fixed/
Comment by David Batson (David_Batson) - Friday, 10 May 2013, 19:38 GMT
I tried method 3 (both with "--force-compiz" and "compiz --replace --sm-disable --ignore-desktop-hints ccp"), but compiz doesn't launch and the fusion-icon is not on the taskbar. Works fine with method 1 though...

EDIT: Just tried again. Noticed a small typo. Had to remove forward slash from <property name="Client0_Command" type="array">
Method 3 works fine now. Really have to check very carefully for typos in the .xml file.
Comment by ianc (ianc) - Friday, 10 May 2013, 21:27 GMT
Result of 'startxfce4 2>startxfce4out'.

My xfce4-session.xml looks OK. David: when you say method 3 works OK do you mean that both fusion-icon & compiz load at startup, or is it just compiz?




Edit: ~/.cache/sessions was corrupted. Deleted it & it's working again now - apologies for wasting everyone's time.
Comment by Philip (nuc) - Friday, 10 May 2013, 22:06 GMT
@ianc: You are wrong, it will only solve the problem temporarily. Re-login and you'll see, that the issue persists.
Comment by ianc (ianc) - Saturday, 11 May 2013, 07:52 GMT
Wierd... I sucessfully logged out & back in and also rebooted several times before I edited that post & it was fine every time. Now it's broken again.

Comment by David Batson (David_Batson) - Saturday, 11 May 2013, 17:18 GMT
@ianc: Both fusion-icon and compiz load on startup (method 1 or method 3).
Comment by Jan de Groot (JGC) - Tuesday, 02 July 2013, 06:40 GMT
Is this still an issue?
Comment by ianc (ianc) - Tuesday, 02 July 2013, 13:01 GMT
For me at least - yes.
Comment by Larry Johnson (keepitsimpleengineer) - Tuesday, 02 July 2013, 17:05 GMT
Crashes for me x86_64
Comment by Michael Kogan (Photon) - Tuesday, 02 July 2013, 17:37 GMT
@keepitsimpleengineer: Did you install fusion-icon-fixed from AUR? For me it works both on x86_64 and x86 after installing the -fixed package from AUR.
Comment by Philip (nuc) - Tuesday, 02 July 2013, 17:47 GMT
Issue persists. The reason is that xfce4 is saving sessions although it shouldn't (it is configured not to do so). See https://bbs.archlinux.org/viewtopic.php?pid=1273690#p1273690 and https://bbs.archlinux.org/viewtopic.php?id=163830
Comment by Larry Johnson (keepitsimpleengineer) - Tuesday, 02 July 2013, 18:00 GMT
@Michael Kogan It's been so long I don't recall. I'll reinstall it and see, may take a while...

------

O.K. - seems to work after removing fusion-icon and installing fusion-icon-fixed from AUR. Now Emerald window manager works, no more using work-arounds..!
Comment by Michael Kogan (Photon) - Tuesday, 02 July 2013, 18:40 GMT
@nuc: There is a workaround for this bug: https://bbs.archlinux.org/viewtopic.php?pid=931586#p931586 In short: Disable session saving, enable "Prompt on logout", delete ~/.cache/sessions and, most important, use xfce4-session-logout for logging out, shutting down etc. (you can add a launcher for xfce4-session-logout to the panel.

Loading...