battleblow / openjdk-jdk11u

BSD port of OpenJDK 11
GNU General Public License v2.0
9 stars 8 forks source link

Increase the minimum stack size for a VM thread #82

Closed battleblow closed 5 years ago

battleblow commented 5 years ago
  java -XX:VMThreadStackSize=64 -version

with the error:

  [0.005s][warning][os,thread] Failed to start thread - pthread_create failed (EAGAIN) for attributes: stacksize: 64k, guardsize: 4k, detached.
  #
  # There is insufficient memory for the Java Runtime Environment to continue.
  # Cannot create worker GC thread. Out of system resources.
  # An error report file with more information is saved as:
  # <path>/hs_err_pidXXXXX.log

With this change java just exits:

  The VMThreadStackSize specified is too small. Specify at least 128k
  Error: Could not create the Java Virtual Machine.
  Error: A fatal exception has occurred. Program will exit.

This allows test/hotspot/jtreg/runtime/Thread/TooSmallStackSize.java to pass