imsory / gnome2-globalmenu

Automatically exported from code.google.com/p/gnome2-globalmenu
GNU General Public License v2.0
0 stars 0 forks source link

globalmenu-gnome gtk module crashes multi-thread apps on SMP systems #408

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I'm using 64bit Ubuntu Jaunty. I use spatial Nautilus. Sometimes Nautilus
crashes when opening a folder. I filed a bug on Launchpad, against
Nautilus. A developer found that "the crash is due to
/usr/lib/gtk-2.0/modules/libglobalmenu-gnome.so", and naturally closed the
bug because globalmenu is not in Ubuntu but in the PPA.

The bug report with strace is here:
https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/362819

Original issue reported on code.google.com by jsilt...@gmail.com on 20 Apr 2009 at 9:10

GoogleCodeExporter commented 8 years ago
Is your CPU a SMP(dual core) ?

Original comment by rainwood...@gmail.com on 21 Apr 2009 at 3:00

GoogleCodeExporter commented 8 years ago
Yes, it is a 3GHz Intel Core 2 Duo.

Original comment by jsilt...@gmail.com on 21 Apr 2009 at 3:18

GoogleCodeExporter commented 8 years ago
OK. I get the problem. But it is going to be very difficult to make a fix 
because I
don't have access to any x64 SMP machines. and debugging multithread is always 
a pain
in the ass..

Original comment by rainwood...@gmail.com on 22 Apr 2009 at 1:07

GoogleCodeExporter commented 8 years ago
Ok, thanks. I'm afraid I have no idea how anything works, but if there is 
anything
that mortals can do to help, please let me know. :)

Unfortunately the machine with the crash is my office workstation at work, and
naturally I cannot spend very much time there doing this, but I will probably 
be able
to do some testing etc.

Original comment by jsilt...@gmail.com on 22 Apr 2009 at 5:28

GoogleCodeExporter commented 8 years ago
Currently the module relies on the GDK critical section for protecting global
members. It might be insufficient.

I plan to protect all global menu code with a critical section no matter if we 
are
within the GDK critical section or not.

I bet it will fix the problem.

Will it cause a deadlock though?

Original comment by rainwood...@gmail.com on 24 Apr 2009 at 2:36

GoogleCodeExporter commented 8 years ago
Issue 390 has been merged into this issue.

Original comment by rainwood...@gmail.com on 24 Apr 2009 at 2:53

GoogleCodeExporter commented 8 years ago
Please test against rev 2522 where a recursive lock is used to protect the 
internals
of the global menu module.

No deadlock is observed on my single core laptop.

Original comment by rainwood...@gmail.com on 24 Apr 2009 at 2:56

GoogleCodeExporter commented 8 years ago
Issue 401 has been merged into this issue.

Original comment by rainwood...@gmail.com on 24 Apr 2009 at 2:56

GoogleCodeExporter commented 8 years ago
Issue 349 has been merged into this issue.

Original comment by rainwood...@gmail.com on 24 Apr 2009 at 2:57

GoogleCodeExporter commented 8 years ago
A related change is in rev 2538.

Original comment by rainwood...@gmail.com on 27 Apr 2009 at 3:22

GoogleCodeExporter commented 8 years ago
can't compile the source from svn on jaunty
and the issue still there after I installed the deb package from ppa

Original comment by deadey...@gmail.com on 29 Apr 2009 at 2:01

GoogleCodeExporter commented 8 years ago
@deadeye2k

You'll need a vala 0.6.x version to compile it on jaunty from svn, 
unfortunately that
means you'll need to compile vala, too. Concerning the dep-package: I've 
uploaded a
recent svn-snapshot to my ppa (https://launchpad.net/~gkulyk/+archive/ppa), the
results should be available soon. Please test the package and tell me, if it 
fixes
the issue for you, if so, I'll upload the snapshot to gnome-globalmenu-ppa, too.

Original comment by gku...@googlemail.com on 29 Apr 2009 at 5:03

GoogleCodeExporter commented 8 years ago
I think your PPA fixes the bug, but could be i´m a lucky boy at the moment...

I started eclipse 10 times, programmed a little bit and no crash!

Thank you!

Original comment by tomtasche on 1 May 2009 at 6:36

GoogleCodeExporter commented 8 years ago
I still got eclipse crashed with globalmenu 0.7.6~svn2538

Original comment by deadey...@gmail.com on 2 May 2009 at 1:33

GoogleCodeExporter commented 8 years ago
Could you also produce a stack track for the crash with svn2538?

Original comment by rainwood...@gmail.com on 5 May 2009 at 8:48

GoogleCodeExporter commented 8 years ago
I don't know how to produce a stack track
but I got this file in my home directory

Original comment by deadey...@gmail.com on 6 May 2009 at 7:23

Attachments:

GoogleCodeExporter commented 8 years ago
OK it is the same problem.
Would you please run eclipse with
env GLOBALMENU_GNOME_ARGS="--verbose --log-file=~/gnomenu.log"

and attach a copy of ~/gnomenu.log here(when it crashes)?

Original comment by rainwood...@gmail.com on 6 May 2009 at 10:24

GoogleCodeExporter commented 8 years ago
here you go

Original comment by deadey...@gmail.com on 7 May 2009 at 3:19

Attachments:

GoogleCodeExporter commented 8 years ago
Do you also have the stack back trace of this crash?

Original comment by rainwood...@gmail.com on 7 May 2009 at 4:25

GoogleCodeExporter commented 8 years ago

Original comment by deadey...@gmail.com on 7 May 2009 at 5:33

Attachments:

GoogleCodeExporter commented 8 years ago
Any progress on this issue?

Original comment by kim.silkebaekken on 23 May 2009 at 8:41

GoogleCodeExporter commented 8 years ago
patches are warmly welcomed but i wont have time to work on it by myself.

Original comment by rainwood...@gmail.com on 24 May 2009 at 4:28

GoogleCodeExporter commented 8 years ago
Slip.
0.7.6 contains several fixes regarding this.

Original comment by rainwood...@gmail.com on 27 Jun 2009 at 5:51

GoogleCodeExporter commented 8 years ago
I'm on Jaunty with Firefox 3.5.1 and I still got the seg fault.
I rebuilt the packages for 0.7.6 release but that didn't help in any way.

I also tried building the latest trunk, but I got some vala related error, so I 
stopped.

Any ideas?
Thanks.

Original comment by cool2sv@gmail.com on 20 Jul 2009 at 10:10

GoogleCodeExporter commented 8 years ago
Here's my PPA:
https://edge.launchpad.net/~sushkov/+archive/personal

Original comment by cool2sv@gmail.com on 20 Jul 2009 at 10:29

GoogleCodeExporter commented 8 years ago
I think the trunk compiles with 0.7.4 now. (r2587)

Original comment by rainwood...@gmail.com on 31 Jul 2009 at 8:02

GoogleCodeExporter commented 8 years ago
Issue 462 has been merged into this issue.

Original comment by rainwood...@gmail.com on 31 Jul 2009 at 9:18

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
On my 64 bit Ubuntu Jaunty this problem occurs only when I start Eclipse 
Galileo or
Ganymede but with 3.2 it works fine. And when I try, like 5-20 times to launch
Galileo or Ganymede it works as well eventually.

Original comment by kojot...@gmail.com on 23 Aug 2009 at 8:13

GoogleCodeExporter commented 8 years ago
I had this issue on GIMP, but I'm on single core (AMD 3200+). The only thing we 
have
in common is the 64bits of our OS.

Original comment by bmarw...@gmail.com on 23 Aug 2009 at 12:59

GoogleCodeExporter commented 8 years ago
It might be a truncated pointer if single core is also affected.

Original comment by rainwood...@gmail.com on 23 Aug 2009 at 11:39

GoogleCodeExporter commented 8 years ago
Confirm crushes of Firefox 3.5.2 & Gimp - Ubuntu Karmic amd64 on single core.

Original comment by Alexandr.Domrachev on 27 Aug 2009 at 3:49

GoogleCodeExporter commented 8 years ago
Confirmed the bug with firefox 3.5.4pre, gimp 2.6 and gimp 2.7pre, ubuntu jaunty
amd64 athlon dual core.

Original comment by federico...@gmail.com on 27 Aug 2009 at 4:46

GoogleCodeExporter commented 8 years ago
I think this issue could be more related to 32 vs. 64 bit binaries 
incompatibility
rather than SMP issue. Occasionally when launching eclipse i get the error 
about 32
bit incompatible library. I'll post the exact error message the next time it 
happens.  

Original comment by kojot...@gmail.com on 28 Aug 2009 at 9:08

GoogleCodeExporter commented 8 years ago
Could someone with a smp/64bit platform run the crashing apps against valgrind?

Original comment by rainwood...@gmail.com on 1 Sep 2009 at 2:58

GoogleCodeExporter commented 8 years ago
Since it's a race condition, I'm not at all convinced that will actually allow 
seeing
the bug, but I can try -- at least gimp is usually very easy to crash.

Original comment by jo.m.b...@gmail.com on 1 Sep 2009 at 6:29

GoogleCodeExporter commented 8 years ago
Same problem. I installed the last version from svn (2613), compiled with Vala 
0.7.5.
I tested with Eclipse 3.5 64bits, my SO is Ubuntu 9.04 64bits (using the 32bits 
everything works OK)

Follow the error message and also I've attached the log.

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007ff644b9c379, pid=20763, tid=140696582797648
#
# JRE version: 6.0_16-b01
# Java VM: Java HotSpot(TM) 64-Bit Server VM (14.2-b01 mixed mode linux-amd64 )
# Problematic frame:
# C  [libgobject-2.0.so.0+0xf379]  g_object_ref+0x9
#
# An error report file with more information is saved as:
# /java/eclipse/3.5/hs_err_pid20763.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

Original comment by golim...@gmail.com on 1 Sep 2009 at 2:02

Attachments:

GoogleCodeExporter commented 8 years ago
@36 I don't know. Since somebody suggested it might be a truncated pointer or
something too.

@37: Was the log produced from an eclipse failure at launching?

Original comment by rainwood...@gmail.com on 1 Sep 2009 at 5:44

GoogleCodeExporter commented 8 years ago
@38 Yes it was.

Original comment by golim...@gmail.com on 1 Sep 2009 at 6:10

GoogleCodeExporter commented 8 years ago
Sometimes Global Menu (SVN 2613) consumes all the CPU and I have to kill the 
process.

Original comment by golim...@gmail.com on 1 Sep 2009 at 8:58

GoogleCodeExporter commented 8 years ago
I tried running gimp in valgrind but couldn't ever get it to crash.

Original comment by jo.m.b...@gmail.com on 1 Sep 2009 at 9:16

GoogleCodeExporter commented 8 years ago
I guess it just crashes when it's least convenient :)

Stick in an a flashdrive, and as soon as the icon comes up - nautilus dies. 
Open up 
Home, nautilus dies. Open up "Computer", nautilus dies. Nautilus won't crash 
*every* 
time I do something like this - just often. 

I've been searching for the cause of the mysterious nautilus dying issue, and 
this 
seems to be it. I've running 64-bit, and it goes away when globalmenu is 
disabled.

That said, globalmenu rocks and I can't bring myself to disable it unless it's 
for 
testing purposes!

If I can help, let me know.

Original comment by vmi...@gmail.com on 2 Sep 2009 at 1:14

GoogleCodeExporter commented 8 years ago
If anyone can help, please do the follows:

1: checkout r2635,
2: build and install
3: set env GLOBALMENU_GNOME_ARGS=--patch-only
4: launch any crashing apps and see if they still

--patch-only disables the global menu while keeping the code that intercepts 
GtkMenuBar.

Original comment by rainwood...@gmail.com on 2 Sep 2009 at 4:21

GoogleCodeExporter commented 8 years ago
With GLOBALMENU_GNOME_ARGS=--patch-only I cannot make gimp crash, but obviously 
it
has no globalmenu then.

Original comment by jo.m.b...@gmail.com on 2 Sep 2009 at 5:02

GoogleCodeExporter commented 8 years ago
I spotted a suspicious code and made changes in rev2636.

Original comment by rainwood...@gmail.com on 2 Sep 2009 at 5:16

GoogleCodeExporter commented 8 years ago
Thanks, but that didn't help. At least gimp still crashes. Here's the relevant 
part
of the stack trace:

#4  <signal handler called>
#5  0x00007fb343aec339 in IA__g_object_ref (_object=0x3a9c6060)
    at /tmp/buildd/glib2.0-2.21.5/gobject/gobject.c:2339
#6  0x00007fb33c8be1cd in global_menu_gtk_update_menu_context 
(menubar=0x30a9620) at
globalmenu.c:248
#7  0x00007fb33c8be28a in global_menu_gtk_window_realize (window=<value 
optimized
out>) at globalmenu.c:450
#8  0x00007fb343aea48d in IA__g_closure_invoke (closure=0x384da60, 
return_value=0x0,
n_param_values=1, 
    param_values=0x3862ee0, invocation_hint=0x7fff38332620) at
/tmp/buildd/glib2.0-2.21.5/gobject/gclosure.c:767
#9  0x00007fb343b00fae in signal_emit_unlocked_R (node=0x275dea0, detail=0,
instance=0x7fb33a9c6060, 
    emission_return=0x0, instance_and_params=0x3862ee0) at
/tmp/buildd/glib2.0-2.21.5/gobject/gsignal.c:3247
#10 0x00007fb343b0255f in IA__g_signal_emit_valist (instance=0x7fb33a9c6060,
signal_id=<value optimized out>, 
    detail=0, var_args=0x7fff38332800) at
/tmp/buildd/glib2.0-2.21.5/gobject/gsignal.c:2980
#11 0x00007fb343b02a63 in IA__g_signal_emit (instance=0x3a9c6060, signal_id=0,
detail=1135461384)
    at /tmp/buildd/glib2.0-2.21.5/gobject/gsignal.c:3037
#12 0x00007fb34646e7bb in IA__gtk_widget_realize (widget=0x7fb33a9c6060)
    at /tmp/buildd/gtk+2.0-2.17.9/gtk/gtkwidget.c:3347
#13 0x00007fb3464817a8 in gtk_window_show (widget=0x7fb33a9c6060)
    at /tmp/buildd/gtk+2.0-2.17.9/gtk/gtkwindow.c:4487
#14 0x00007fb343aea48d in IA__g_closure_invoke (closure=0x275d9f0, 
return_value=0x0,
n_param_values=1, 
    param_values=0x3875a00, invocation_hint=0x7fff38332af0) at
/tmp/buildd/glib2.0-2.21.5/gobject/gclosure.c:767
#15 0x00007fb343b008a5 in signal_emit_unlocked_R (node=0x275da80, detail=0,
instance=0x7fb33a9c6060, 
    emission_return=0x0, instance_and_params=0x3875a00) at
/tmp/buildd/glib2.0-2.21.5/gobject/gsignal.c:3177
#16 0x00007fb343b0255f in IA__g_signal_emit_valist (instance=0x7fb33a9c6060,
signal_id=<value optimized out>, 
    detail=0, var_args=0x7fff38332cd0) at
/tmp/buildd/glib2.0-2.21.5/gobject/gsignal.c:2980
#17 0x00007fb343b02a63 in IA__g_signal_emit (instance=0x3a9c6060, signal_id=0,
detail=1135461384)
    at /tmp/buildd/glib2.0-2.21.5/gobject/gsignal.c:3037
#18 0x00007fb34646fa1b in IA__gtk_widget_show (widget=0x7fb33a9c6060)
    at /tmp/buildd/gtk+2.0-2.17.9/gtk/gtkwidget.c:3031
#19 0x00000000004b3e13 in gimp_display_new (gimp=0x27980e0, image=0x0,
unit=GIMP_UNIT_PIXEL, scale=1, 
    menu_factory=0x2918280, popup_manager=0x31dda40, display_factory=0x2b23d70)
    at /usr/src/debian/work/build-area/gimp-2.6.7/./app/display/gimpdisplay.c:387
#20 0x00000000004751e4 in gui_display_create (gimp=0x27980e0, image=0x0,
unit=GIMP_UNIT_PIXEL, scale=1)
    at /usr/src/debian/work/build-area/gimp-2.6.7/./app/gui/gui-vtable.c:343

Original comment by jo.m.b...@gmail.com on 2 Sep 2009 at 5:23

GoogleCodeExporter commented 8 years ago
Can you run against 3637 and see if there is any critcals before the crash?

run with 
env GLOBALMENU_GNOME_ARGS=--verbose

Original comment by rainwood...@gmail.com on 2 Sep 2009 at 5:29

GoogleCodeExporter commented 8 years ago
Eclipse runs OK with "GLOBALMENU_GNOME_ARGS=--patch-only"
But it still crashing if I don't disable the global menu.

Original comment by golim...@gmail.com on 2 Sep 2009 at 5:31

GoogleCodeExporter commented 8 years ago
No output before the crash at all on my terminal.

Original comment by jo.m.b...@gmail.com on 2 Sep 2009 at 5:43

GoogleCodeExporter commented 8 years ago
Ohh! Your truncated pointer comment made me look, and I seem to have fixed it.

Original comment by jo.m.b...@gmail.com on 2 Sep 2009 at 5:47