Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8205280 | 11.0.1 | Matthias Baesken | P3 | Resolved | Fixed | team |
In linux os::print_os_info, print info about a number of system parameters influencing thread creation on Linux.
We noticed the influence of these parameters when looking into an application creating over 10.000 threads on Linux at the same time. We got an OOM: unable to create new native thread which was caused by a failing pthread_create (error EAGAIN). The machine had plenty of memory, so we looked into various kernel params and in the end noticed that /proc/sys/kernel/pid_max was too low.
The other added parameters "threads-max" and "max_map_count" are also known to be related to problems when running with high thread numbers, so I add them too.
Example output added to the section 'system' of the hs_err file is:
/proc/sys/kernel/threads-max (system-wide limit on the number of threads):
256909
/proc/sys/vm/max_map_count (maximum number of memory map areas a process may have):
2147483647
/proc/sys/kernel/pid_max (system-wide limit on number of process identifiers):
81920
We noticed the influence of these parameters when looking into an application creating over 10.000 threads on Linux at the same time. We got an OOM: unable to create new native thread which was caused by a failing pthread_create (error EAGAIN). The machine had plenty of memory, so we looked into various kernel params and in the end noticed that /proc/sys/kernel/pid_max was too low.
The other added parameters "threads-max" and "max_map_count" are also known to be related to problems when running with high thread numbers, so I add them too.
Example output added to the section 'system' of the hs_err file is:
/proc/sys/kernel/threads-max (system-wide limit on the number of threads):
256909
/proc/sys/vm/max_map_count (maximum number of memory map areas a process may have):
2147483647
/proc/sys/kernel/pid_max (system-wide limit on number of process identifiers):
81920
- backported by
-
JDK-8205280 add more thread-related system settings info to hs_error file on Linux
- Resolved