Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4296365

The JVM crashed with "HotSpot Virtual Machine Error"

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 2.0
    • 1.0.1
    • hotspot
    • rc1
    • x86
    • windows_nt
    • Verified

      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.

            busersunw Btplusnull User (Inactive)
            mchamnessunw Mark Chamness (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: