Crash in eclipse (JIT bug)

Bug #586765 reported by Ramon Garcia
32
This bug affects 5 people
Affects Status Importance Assigned to Milestone
openjdk-6 (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

The symptom is that eclipse crashes silently (no log, no message, no hs_.....log file in home directory). Only a core file in home directory. It happens when the m2eclipse plugin from sonatype is installed, and it fetches indexes from maven servers. A workaround is to disable the Internet connection while eclipse starts.

This is a Ubuntu 10.04 x64 system completely up to date.

Looking at the core file, this looks like a code generation bug. Perhaps the latest update to openjdk broke something.

gdb -c ~/core
(gdb) print $rsp
$9 = (void *) 0x1

Obviously the stack pointer is corrupted. Probably this is the reason why no hs_.....log is produced. Calling the crash handler is imposible.

If we disassemble a few instructions above:

(gdb) x /20i $rip - 52
   0x7f12a956bd3b: je 0x7f12a956bd46
   0x7f12a956bd41: jmpq 0x7f12a955d330
   0x7f12a956bd46: mov -0x38(%rbp),%r13
   0x7f12a956bd4a: mov -0x30(%rbp),%r14
   0x7f12a956bd4e: retq
   0x7f12a956bd4f: mov -0x40(%rbp),%rsp
   0x7f12a956bd53: movq $0x0,-0x10(%rbp)
   0x7f12a956bd5b: movabs $0x7f12ae146988,%rsi
   0x7f12a956bd65: movabs $0x0,%rdx
=> 0x7f12a956bd6f: callq 0x7f12a956bd79
   0x7f12a956bd74: jmpq 0x7f12a956bdfa

We see that the instruction mov -0x40(%rbp),%rsp overwrites the stack pointer. We confirm this by looking at the assigned value:
(gdb) print {long} ($rbp - 0x40)
$13 = 1

Revision history for this message
Ramon Garcia (ramon-garcia-f+ubuntu) wrote :

I am keeping the core file, in case futher details are required.

Revision history for this message
Robin Stocker (nibor) wrote :

I also had this on Fedora 13 and just now on an Ubuntu 10.04 x86_64 machine. It happens just when M2Eclipse is doing "Updating indexes".

wdesmet (kromagg)
Changed in openjdk-6 (Ubuntu):
status: New → Confirmed
Revision history for this message
Vreixo Formoso (metalpain2002) wrote :

A simple workaround is to disable respository index updates on startup. Just go to Window->Preferences->Maven and uncheck that option. Everything seems to work after it, but I have just find that option, so I have not tested it too much...

Revision history for this message
Matthias Klose (doko) wrote :

is this seen with the eclipse version distributed in Ubuntu?

Revision history for this message
wdesmet (kromagg) wrote :

I just tested it. It is indeed also a problem with eclipse as distributed in ubuntu (not that there was any reason to think otherwise).

Revision history for this message
Ramon Garcia (ramon-garcia-f+ubuntu) wrote :

The recently issued openjdk update, 6b18-1.8-4ubuntu3, no longer shows the problem.

(By the way, the discussion about the eclipse version used is pointless. A Java virtual machine cannot crash. The code causing the crash was JIT code. It was a code generation bug)

Changed in openjdk-6 (Ubuntu):
status: Confirmed → Fix Released
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.