We've had a complaint against SunStudio, 6624797, where it was discovered that
when an application is run under the IDE it's current/soft file descriptor
limit (usually 256) is equal to the max/hard limit (usually 65K).
This caused the application running under the IDE some grief.
A truss of the VM shows that it ups the current limit here:
=>[1] _setrlimit()
[2] os::init_2()
[3] Threads::create_vm(JavaVMInitArgs*,int*)
[4] JNI_CreateJavaVM()
[5] main()
IMO the VM should remember the original soft limit and restore it between when
it forks and execs.
---------------------------------------------------------
Incidentally to this I noticed that after a fork the VM will call
fcntl(FD_CLOEXEC) 65K times. Surely this is not an insubstantial time.
Cannot the VM runtime issue the fcntl(FD_CLOEXEC) right after each open/
accept etc?
when an application is run under the IDE it's current/soft file descriptor
limit (usually 256) is equal to the max/hard limit (usually 65K).
This caused the application running under the IDE some grief.
A truss of the VM shows that it ups the current limit here:
=>[1] _setrlimit()
[2] os::init_2()
[3] Threads::create_vm(JavaVMInitArgs*,int*)
[4] JNI_CreateJavaVM()
[5] main()
IMO the VM should remember the original soft limit and restore it between when
it forks and execs.
---------------------------------------------------------
Incidentally to this I noticed that after a fork the VM will call
fcntl(FD_CLOEXEC) 65K times. Surely this is not an insubstantial time.
Cannot the VM runtime issue the fcntl(FD_CLOEXEC) right after each open/
accept etc?
- relates to
-
JDK-6670965 (launcher) Runtime.exec inherits LD_LIBRARY_PATH modifications from java process
-
- Closed
-