views:

4401

answers:

5

When a Java VM crashes with an EXCEPTION_ACCESS_VIOLATION and produces an hs_err_pidXXX.log file, what does that indicate? The error itself is basically a null pointer exception. Is it always caused by a bug in the JVM, or are there other causes like malfunctioning hardware or software conflicts?

Edit: there is a native component, this is an SWT application on win32.

+3  A: 

Most of the times this is a bug in the VM. But it can be caused by any native code (e.g. JNI calls).

The hs_err_pidXXX.log file should contain some information about where the problem happened.

You can also check the "Heap" section inside the file. Many of the VM bugs are caused by the garbage collection (expecially in older VMs). This section should show you if the garbage was running at the time of the crash. Also this section shows, if some sections of the heap are filled (the percentage numbers).

The VM is also much more likely to crash in a low memory situation than otherwise.

jiriki
A: 

First thing you should do is upgrade your JVM to the latest you can.

Can you repeat the issue? Or does it seem to happen randomly? We recently had a problem where our JVM was crashing all over the place, at random times. Turns out it was a hardware problem. We put the drives in a new server and it completely went away.

Bottom line, the JVM should never crash, as the poster above mentioned if your not doing any JNI then my gut is that you have a hardware problem.

Jeremy
Could you please describe what exact problem that was? I'm struggling with such error and thinking on how HW problems could be detected.
Andrew Dashin
A: 

The cause of the problem will be documented in the hs_err* file, if you know what to look for. Take a look, and if it still isn't clear, consider posting the first 5 or 10 lines of the stack trace and other pertinent info (don't post the whole thing, there's tons of info in there that won't help - but you have to figure out which 1% is important :-) )

Kevin Day
A: 

Are you using a Browser widget and executing javascript in the Browser widget? If so, then there are bugs in some versions of SWT that causes the JVM to crash in native code, in various Windows libraries.

Two examples (that I opened) are bug 217306 and bug 127960. These two bug reports are not the only bug reports of the JVM crashing in SWT, however.

If you aren't using the Browser widget then these suggestions won't help you. In that case, you can search for a list of SWT bugs causing a JVM crash. If none of those are your issue, then I highly recommend that you open a bug report with SWT.

Eddie
A: 

I use JS and swt.browser inside. got folloing problem too. God.

siginfo: ExceptionCode=0xc0000005, ExceptionInformation=0x00000008 0x72f03d08

Registers: EAX=0x7ffad000, EBX=0x00000000, ECX=0x40000000, EDX=0x00000000 ESP=0x0b6be660, EBP=0x0b6be688, ESI=0x72f03d08, EDI=0x0b6be6d4 EIP=0x72f03d08, EFLAGS=0x00010202

Top of Stack: (sp=0x0b6be660) 0x0b6be660: 7739c3b7 0033051c 0000001c 00000000 0x0b6be670: 00000750 72f03d08 dcbaabcd 00000000 0x0b6be680: 0b6be6d4 72f03d08 0b6be700 7739c484 0x0b6be690: 72f03d08 0033051c 0000001c 00000000 0x0b6be6a0: 00000750 00000000 0033051c 076fc300 0x0b6be6b0: 00000024 00000001 00000000 00000000 0x0b6be6c0: 00000030 ffffffff ffffffff 7739c43a 0x0b6be6d0: 00000000 00000000 0b6be734 00000000

Instructions: (pc=0x72f03d08) 0x72f03cf8:
[error occurred during error reporting, step 100, id 0xc0000005]

Stack: [0x0b680000,0x0b6c0000), sp=0x0b6be660, free space=249k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C 0x72f03d08 C [USER32.dll+0x1c484] C [USER32.dll+0x1ca68] C [USER32.dll+0x1ce7a] C [ntdll.dll+0x2ec9e] j org.eclipse.swt.widgets.Control.destroyWidget()V+14 j org.eclipse.swt.widgets.Shell.destroyWidget()V+5

xblue