JDK-4296365 : The JVM crashed with "HotSpot Virtual Machine Error"
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 1.0.1
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_nt
  • CPU: x86
  • Submitted: 1999-12-02
  • Updated: 1999-12-03
  • Resolved: 1999-12-03
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
2.0 rc1Fixed
Related Reports
Relates :  
Relates :  
Description
Name: mc57594			Date: 12/02/99

java version "1.2.2"
HotSpot VM (1.0.1, mixed mode, build g)

Java crashes with this:

#
# HotSpot Virtual Machine Error, EXCEPTION_ACCESS_VIOLATION
#
# Error ID: 4F533F57494E13120E435050028D
#

I haven't been able to nail it down to a small code
fragment yet (right now its maybe 20KLOC), but ...
    *) I am running on a _dual_ Penitum-II.
       We don't seem to get nearly as many crashes
       on our single processor machines (or the
       users don't mention it).

    *) I was running JPython at the time in a very tight
       inner loop.

I'm not sure that a small fragment will show this problem ...

==========================================================
From: "Roulo
To: "'chamness'"
Subject: I've got a code fragment that reproduces JVM crashing bug 98459
Date: Wed, 1 Dec 1999 14:39:27 -0800 

Mark,
    I can now reproduce the JVM crashing!!!!!!!!!!!

The code to do it is:
================================================================
package com.klatencor.cougar.machine.devicecomm.avc;

import javax.swing.*;

public class Foo
{
    static short[] cacheData = new short[500000];

    static private int[] lengths =
    {
        1, 10, 100, 1000, 10000, 100000
    };

    static public void main(String[] args) throws Exception
    {
        JFrame frame = new JFrame();
        final JTextArea textArea = new JTextArea();
        JScrollPane scroll = new JScrollPane(textArea);
        frame.getContentPane().add(scroll);
        frame.setSize (300, 300);
        frame.setVisible (true);

        for (int t = 0; t < 4; ++t)
        {
            new Thread(new Runnable()
            {
                public void run ()
                {
                    try
                    {
                    int j = 0;        
                    while (true)
                    {
                        for (int i = 0; i < lengths.length; ++i)
                        {
                            final int jj = j;
                            short[] data = new short[lengths[i]];
                            for (int z = 0; z < data.length; ++z)
                                data[z] = (short)(4000 + i + z);

                            short[] data2 = new short[lengths[i]];
                            for (int i1 = 0; i1 < data.length; ++i1)
                                cacheData[(i1 + 50000) % cacheData.length] =
data[i1];

//                            avc.implWrite (500000, data);

                            for (int i2 = 0; i2 < data.length; ++i2)
                                data2[i2] = cacheData[(i2 + 50000) %
cacheData.length];

//                            avc.implRead (500000, data2);

                            SwingUtilities.invokeAndWait (new Runnable()
                            {
                                public void run()
                                {
                                    textArea.append ("Made some progress..."
+ jj + "\n");
                                }
                            });
                        }
                        ++j;
                    }
                    }
                    catch (Exception e)
                    {
                    }
                }
            }).start();
        }
    }
}

I run it like this:
    java com.klatencor.cougar.machine.devicecomm.avc.Foo

It rarely makes it to 500 cycles of j on my Dual Windows NT Machine.
============================================================================
=============        
This reliably crashes on Dual Processor machines and does
not seem to crash on Single Processor machines.  My theory
is that there is a very subtle bug in the object allocation
code for the VM or in the GC code for the VM where someone
assumed that an action was atomic because there was only
one program counter.  On Single Processor machines this is
true, but not on SMP boxes.

Please let me know if you can reproduce this yourself with
my code fragment.  If I don't hear from you in a few days,
I'll resubmit this with the code fragment (so that it can
be fixed).

I also have a question: Do the JVM regression tests you (plural)
run include SMP Windows NT machines?

-Thanks,
	Mark Roulo

(Review ID: 98459) 
======================================================================
From: "Roulo
To: "'chamness'"
Subject: RE: (Review ID: 98459) The JVM crashed with "HotSpot Virtual 
Machine Error"
Date: Thu, 2 Dec 1999 15:56:36 -0800 

Mark,

> As you probably know, jdk1.3 (kestrel-beta) uses a completely
> new version of hotspot.  If you test with that version, please 
> let me know your results.
    I've tested with JDK1.3beta1.  It does not crash :-).

> The bug report you submitted has been determined to
> be a new bug. It has been entered into our internal
> bug tracking system with the assigned Bug Id: 4296365
    Okay.  Thanks.

    I'm still wondering, though, do you know if the
    normal JDK regression tests include testing on
    SMP Windows machines?  I'm not criticizing, but
    I am trying to understand how this bug managed to
    go undetected.

-Mark R.


Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: 2.0_rc1 FIXED IN: 2.0_rc1 INTEGRATED IN: 2.0_rc1 VERIFIED IN: 2.0_rc1 kestrel
14-06-2004

EVALUATION I tried the bug with the following JDK/Hotspot on dual PIII NT 4.0 sp5: 1.2.1/1.0 Does not happen 1.2.2/1.0.1 Happens 1.2.2/2.0RC1 Does not happen 1.3/client Does not happen The bug seems to have been fixed with newer versions of hotspot. See Workaround for suggestion on making the bug go away.
11-06-2004

WORK AROUND Name: mc57594 Date: 12/02/99 None. BTW, this is also a problem with HotSpot 1.0. I'm testing 2.0beta and also the VM (but not the classes) that comes with 1.3beta and I'll follow up when I have the results... And now a followup: HotSpot 2.0beta crashes much faster with this:# # HotSpot Virtual Machine Error, EXCEPTION_ACCESS_VIOLATION # # Error ID: 4F533F57494E13120E43505002D9 # And the VM from JDK1.3beta1 (but running with the 1.2.2 classfiles) does this: # # HotSpot Virtual Machine Error, EXCEPTION_ACCESS_VIOLATION # # Error ID: 4F533F57494E13120E43505002B0 # ====================================================================== To run the test with 1.0.1 and 1.2.2 jdk. java -XX:-UseOnStackReplacement
11-06-2004