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

When too many threads are created, JVM crashes with "ChunkPool::allocate. Out of swap space?"

XMLWordPrintable

    • generic
    • generic

      When allocating threads from the following code:

      try {
          for ( ;; ) {
              new Thread(someRunnable).start();
          }
      catch ( OutOfMemoryError e ) {
          // ask threads to die
      }

      ...HotSpot may crash with the following output:

      linux-amd64:

      [2007-09-05T22:43:59.42] Java HotSpot(TM) 64-Bit Server VM warning: Attempt to allocate stack guard pages failed.
      ...<the message repeats>...
      [2007-09-05T22:43:59.47] #
      [2007-09-05T22:43:59.47] # An unexpected error has been detected by Java Runtime Environment:
      [2007-09-05T22:43:59.47] #
      [2007-09-05T22:43:59.47] # java.lang.OutOfMemoryError: requested 32744 bytes for ChunkPool::allocate. Out of swap space?
      [2007-09-05T22:43:59.47] #
      [2007-09-05T22:43:59.47] # Internal Error (allocation.cpp:120), pid=4845, tid=1084438880
      [2007-09-05T22:43:59.47] # Error: ChunkPool::allocate
      [2007-09-05T22:43:59.47] #
      [2007-09-05T22:43:59.47] # Java VM: Java HotSpot(TM) 64-Bit Server VM (1.6.0_05-ea-b02 compiled mode linux-amd64)
      ...
      [2007-09-05T22:43:59.89] Java HotSpot(TM) 64-Bit Server VM warning: Attempt to deallocate stack guard pages failed.
      ...<the same message again>...

      linux-i586:

      [2007-09-05T22:48:06.68] #
      [2007-09-05T22:48:06.68] # An unexpected error has been detected by Java Runtime Environment:
      [2007-09-05T22:48:06.68] #
      [2007-09-05T22:48:06.68] # java.lang.OutOfMemoryError: requested 32756 bytes for ChunkPool::allocate. Out of swap space?
      [2007-09-05T22:48:06.68] #
      [2007-09-05T22:48:06.68] # Internal Error (allocation.cpp:120), pid=8721, tid=3986754464
      [2007-09-05T22:48:06.68] # Error: ChunkPool::allocate
      [2007-09-05T22:48:06.68] #
      [2007-09-05T22:48:06.68] # Java VM: Java HotSpot(TM) Client VM (1.6.0_05-ea-b02 interpreted mode linux-x86)
      [2007-09-05T22:48:06.68] # If you would like to submit a bug report, please visit:
      [2007-09-05T22:48:06.68] # http://java.sun.com/webapps/bugreport/crash.jsp
      [2007-09-05T22:48:06.68] #

      solaris-i586:

      [2007-09-05T23:00:49.18] [thread 4093 also had an error]
      [2007-09-05T23:00:49.18] [thread 4077 also had an error]
      [2007-09-05T23:00:49.18] [thread 4061 also had an error]
      [2007-09-05T23:00:49.18] #
      [2007-09-05T23:00:49.18] # An unexpected error has been detected by Java Runtime Environment:
      [2007-09-05T23:00:49.18] #
      [2007-09-05T23:00:49.18] # SIGBUS[thread 4076 also had an error]
      [2007-09-05T23:00:49.18] [thread 4095 also had an error]
      [2007-09-05T23:00:49.18] [thread 4079 also had an error]
      [2007-09-05T23:00:49.18] [thread 4063 also had an error]
      [2007-09-05T23:00:49.18] [thread 4094 also had an error]
      [2007-09-05T23:00:49.18] [thread 4078 also had an error]
      [2007-09-05T23:00:49.18] [thread 4062 also had an error]
      [2007-09-05T23:00:49.18] [thread 4060 also had an error]
      [2007-09-05T23:00:49.18] [thread 2 also had an error]
      [2007-09-05T23:00:50.21]

      and

      [2007-09-05T23:02:15.24] Java HotSpot(TM) Client VM warning: Unexpected Signal 10 occured under user-defined signal handler 0xd23614a8
      [2007-09-05T23:02:15.24] [thread 2 also had an error]
      [2007-09-05T23:02:15.24] [thread 3954 also had an error]

      and

      [2007-09-05T23:07:04.94] #
      [2007-09-05T23:07:04.94] # An unexpected error has been detected by Java Runtime Environment:
      [2007-09-05T23:07:04.94] #
      [2007-09-05T23:07:04.94] # java.lang.OutOfMemoryError: requested 32756 bytes for ChunkPool::allocate. Out of swap space?
      [2007-09-05T23:07:04.94] #
      [2007-09-05T23:07:04.94] # Internal Error (allocation.cpp:120), pid=1237, tid=3
      [2007-09-05T23:07:04.94] # Error: ChunkPool::allocate
      [2007-09-05T23:07:04.94] #
      [2007-09-05T23:07:04.94] # Java VM: Java HotSpot(TM) Tiered VM (1.6.0_05-ea-b02 interpreted mode solaris-x86)
      [2007-09-05T23:07:04.94] # An error report file with more information is saved as:
      [2007-09-05T23:07:04.94] #
      [2007-09-05T23:07:04.94] # If you would like to submit a bug report, please visit:
      [2007-09-05T23:07:04.94] # http://java.sun.com/webapps/bugreport/crash.jsp
      [2007-09-05T23:07:04.94] #

            coleenp Coleen Phillimore
            kshiroko Kirill Shirokov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: