eclipse reports memory corruption, crashes

Bug #121413 reported by Bogdan Butnaru
8
Affects Status Importance Assigned to Milestone
eclipse (Ubuntu)
Invalid
Undecided
Unassigned
firefox (Ubuntu)
Invalid
High
Mozilla Bugs

Bug Description

Binary package hint: eclipse

Hello! I have updated to Gutsy recently and I noticed Eclipse throws a scary warning due to the new GSlice thing:

bogdanb@cimer:~$ eclipse
using specified vm: /usr/lib/jvm/java

***MEMORY-WARNING***: [12710]: GSlice: g_thread_init() must be called before all other GLib functions; memory corruption due to late invocation of g_thread_init() has been detected; this program is likely to crash, leak or unexpectedly abort soon...

===============
Eclipse starts correctly, but I encountered random crashes soon afterwards, for example when autocomplete comes up (automatically or when asked):

~$ eclipse
using specified vm: /usr/lib/jvm/java

***MEMORY-WARNING***: [12862]: GSlice: g_thread_init() must be called before all other GLib functions; memory corruption due to late invocation of g_thread_init() has been detected; this program is likely to crash, leak or unexpectedly abort soon...
#
# An unexpected error has been detected by Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0xb2e82dd2, pid=12862, tid=3085007760
#
# Java VM: Java HotSpot(TM) Client VM (1.6.0-b105 mixed mode, sharing)
# Problematic frame:
# C [libmozjs.so+0x1cdd2]
#
# An error report file with more information is saved as hs_err_pid12862.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
#
==============
If I rename the library the crash complains about (cd /usr/lib/firefox && sudo mv libmozjs.so ~libmozjs.so) eclipse doesn't crash anymore, but it still shows the warning at start. (However, Firefox doesn't start anymore, so this needs either manual shuffling of the file or some linker script-fu to fix.)

I'm not sure if the warning and the crash are related, but they appeared at the same time, so there you go...

Revision history for this message
Bogdan Butnaru (bogdanb) wrote :
Revision history for this message
Bogdan Butnaru (bogdanb) wrote :

I attached this to Firefox, too, because it owns the library. Firefox gives the same warning, though I didn't notice instability yet.

Revision history for this message
Alexander Sack (asac) wrote : Re: [Bug 121413] eclipse reports memory corruption, crashes

Can you please give me a step-by-step instruction on how you can crash
it? Please assume that my eclipse is completely fresh (e.g. a newly
created workspace).

Thanks,

 - Alexander

Revision history for this message
Bogdan Butnaru (bogdanb) wrote :

OK, so I tried creating a new workspace, with the bug "enabled" (ie, the libmozjs file in the normal position), Eclipse crashed. So I hid (renamed) the file as described above, started Eclipse again, created a workspace (it worked), stopped Eclipse, and put the file back. Then:

(1) I Started Eclipse (with the new, blank workspace),
(2) created a new Java project (named test),
(3) created a new class named Test, in package test.
(4) In the body of the class I started typing "Str" and pressed Ctrl-Space for the auto-completion.
(5) Eclipse worked the hard drive a bit, the little drop-box with the possible completions showed up, and a couple of seconds later Eclipse crashed. In quick succession:
    a. The error message appeared in the console (the one with "#" at the start of the lines);
    b. The Eclipse window disappeared;
    c. The dialog box that Eclipse shows on crashes appeared (see the contents below).

The exact same thing happens in any case when I press Ctrl+Space (and also on automatic autocomplete), in any class in any project. It does happen in other situations, too (like when I switch to a _new_ project, not one that exists already). And the error is with the same file, as far as I can tell. (Note, however, that the gslice/memory warning appears right when Eclipse starts.)

JVM terminated. Exit code=1
/usr/lib/jvm/java/bin/java
-Djava.library.path=/usr/lib/jni
-Dgnu.gcj.precompiled.db.path=/var/lib/gcj-4.1/classmap.db
-Dgnu.gcj.runtime.VMClassLoader.library_control=never
-Dosgi.locking=none
-jar /usr/lib/eclipse/startup.jar
-os linux
-ws gtk
-arch x86
-launcher /usr/lib/eclipse/eclipse
-name Eclipse
-showsplash 600
-exitdata 420013
-install /usr/lib/eclipse
-vm /usr/lib/jvm/java/bin/java
-vmargs
-Djava.library.path=/usr/lib/jni
-Dgnu.gcj.precompiled.db.path=/var/lib/gcj-4.1/classmap.db
-Dgnu.gcj.runtime.VMClassLoader.library_control=never
-Dosgi.locking=none
-jar /usr/lib/eclipse/startup.jar

Changed in firefox:
assignee: nobody → mozilla-bugs
importance: Undecided → High
status: New → Incomplete
Revision history for this message
Daniel Hahler (blueyed) wrote :

I can confirm the eclipse crash with the java-1.5.0-sun and java-6-sun VMs, but not with java-gcj (although the warning appears there, too) - which seems to be the default.
The bug appears e.g. after /usr/lib/jvm/java-gcj/bin/java gets started by the eclipse wrapper script.
It seems the bug should rather get filed against the Java VM(s) and not eclipse?!

Changed in eclipse:
status: New → Confirmed
Revision history for this message
Bogdan Butnaru (bogdanb) wrote :

Haven't seen this happening in a long while.

Changed in eclipse:
status: Confirmed → Invalid
Bogdan Butnaru (bogdanb)
Changed in firefox:
status: Incomplete → Invalid
Revision history for this message
Travis Raphael Miller (raphtee) wrote :

The same behavior is happening to me. I can't even start eclipse. It crashes immediately. I have tried installing, re-installing and downloading the version from eclipse.org. I am running a fresh install of hardy (32 bit). This occurs with java 1.5, 1.6 and gcj. This seems to me to be a critical bug since it is preventing me from development work. I am now having to boot into windows! just to work on java! Whoever decided to release hardy with a broken java/eclipse packages should feel ashamed.

Revision history for this message
Travis Raphael Miller (raphtee) wrote :

I have found a solution. I completely removed the eclipse that came from the repos. And I made sure that my default java was the sun 1.5 version. Then I downloaded the newest ganymede release candidate from eclipse.org, and it worked fine.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.