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

UseParNewGC causes OutOfMemoryError

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 1.4.2
    • hotspot
    • None
    • gc
    • sparc
    • solaris_7

      Bug Description: $cat sb.java

      import java.util.Vector;

      public class sb extends Thread {
        public static void main(String[] strings) {
          for (int i = 0; i < 20; i++) {
            sb var_sb = new sb();
            var_sb.start();
          }
        }

        public void run() {
          doit();
        }

        void doit() {
          for (int i = 0; i < 100000000; i++)
            dosb();
        }

        void dosb() {
          Vector vector = getFilledVector();
          StringBuffer stringbuffer = new StringBuffer();
          for (int i = 0; i < 200000; i++)
            stringbuffer.append(".");
          try {
            Thread.sleep(100);
          } catch (InterruptedException interruptedexception) { }
        }

        Vector getFilledVector() {
          Vector vector = new Vector();
          for (int i = 0; i < 200; i++)
            vector.add(Integer.toString(i));
          return vector;
        }
      }

      $>uname -a
      SunOS hppdl694 5.8 Generic_108528-14 sun4u sparc SUNW,Ultra-4
      $>java -server -XX:+UseParNewGC sb

      Exception java.lang.OutOfMemoryError: requested 589832 bytes for promotion. Out of swap space?

      Description :-

      ParNewGC will abort if it fails in promotion. It should recover
      from the situation and perform Full GC as ParallelGC does.

      Still fails with Mustang

      ###@###.### 2005-2-08 19:12:28 GMT

            Unassigned Unassigned
            ksoshals Kirill Soshalskiy (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: