JDK-6381152 : Small program run from a large Java process fails unless 2X expected swap space is available.
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.lang
  • Affected Version: 5.0u6
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris_10
  • CPU: x86
  • Submitted: 2006-02-03
  • Updated: 2010-08-06
  • Resolved: 2006-02-06
Related Reports
Duplicate :  
Runtime.exec() fails when running a small program from a large Java process unless more than 2X the swap space needed for the large Java process is available. This violates reasonable expectations for resource usage and impacts the useability of Java on Solaris for large memory server applications. It has previously been proposed that posix_spawn (3C), system (3C) or popen(3C) be used to replace the current implementation of Runtime.exec() with fork() in order to correct this problem for hosted JVM's. However, to date this remedy has not been applied. See attachment for test case. Problem is was found on the 32 bit and 64-bit JVM from JDK 1.5.0_06 running on a four-way, 8G Opteron box under Solaris 10.

EVALUATION This is a library, not a hotspot issue. Redirecting. I agree it is a dup of 5049299. In general, it should not be the JDK's job to work around native OS limitations. Nevertheless, we should try to use posix_spawn on Solaris 10. This is quite risky, so we should aim for doing this early in dolphin.