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

Infinite recursion with huge stack space crashes with ChunkPool::allocate

    XMLWordPrintable

Details

    • x86
    • windows_xp

    Description

      FULL PRODUCT VERSION :
      java version "1.6.0_02"
      Java(TM) SE Runtime Environment (build 1.6.0_02-b06)
      Java HotSpot(TM) Client VM (build 1.6.0_02-b06, mixed mode, sharing)

      FULL OS VERSION :
      Microsoft Windows XP Professionnal
      Version 5.1.2600 Service Pack 2 Nu 2600


      EXTRA RELEVANT SYSTEM CONFIGURATION :
      Processor x86 Family 15 Model 4 Stepping 9 GenuineIntel ~2992 Mhz
      HAL Version = "5.1.2600.2180 (xpsp_sp2_rtm.040803-2158)
      RAM 1 024,00 Mo
        Total VM 2,00 Go
      Available VM 1,95 Go
      Swap file 2,38 Go


      A DESCRIPTION OF THE PROBLEM :
      A dummy program with 2 classes : A creates B and B creates A producing an infinite loop.


      THE PROBLEM WAS REPRODUCIBLE WITH -Xint FLAG: Yes

      THE PROBLEM WAS REPRODUCIBLE WITH -server FLAG: Did not try

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      B.class is the bytecode.
      java -Xss250m B crashes.
      Reducing the stack size make a clean termination generating a Exception in thread "main" java.lang.StackOverflowError but no Stacktrace

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      Attached seperatly

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      public class B {
      static int nb;
      A va;
      B(){
      ++nb;
      try {
      va = new A();
      } catch (Exception e) {
      System.out.println("B "+nb);
      e.printStackTrace();
      }
      }
      public static void main(String[] args){
      B b=new B();
      }
      }
      public class A {
      B vb;
      static int na;
      A(){
      ++na;
      try {
      vb=new B();
      } catch (RuntimeException e) {
      System.out.println("A "+na);
      e.printStackTrace();
      }
      }
      }

      Then java -Xss250m B crashes.
      ---------- END SOURCE ----------

      Attachments

        Activity

          People

            coleenp Coleen Phillimore
            ndcosta Nelson Dcosta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: