JDK-8261899 : Improve warning for UseSHM failures
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 17
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • OS: linux
  • Submitted: 2021-02-17
  • Updated: 2021-02-17
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Relates :  
Relates :  
Description
When using shared memory segements (UseSHM) to get large pages there are typically to types of failures you get when trying to do a "mapping". It either fails with ENOMEM  or EPERM:
* ENOMEM will occur when there are no more large pages can be allocated.
* EPERM will occur if the process is not privileged and you have reached the "max locked memory" limit (ulimit -l)

It would be helpful for the user to better indicate this and instead of just printing the errno, give a better error message. 

Some good man pages to refer to:
> man shmget - Info on all errors
> man setrlimit - Info on locked mem limit