JDK-8205335 : General purpose functions in os:: namespace should not exit the VM
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 11
  • Priority: P4
  • Status: Closed
  • Resolution: Won't Fix
  • Submitted: 2018-06-19
  • Updated: 2019-05-02
  • Resolved: 2019-02-05
Related Reports
Relates :  
Description
JDK-8190308 (Implementation: JEP 316: Heap Allocation on Alternative Memory Devices) causes the general purpose functions "os::reserve_memory_aligned" and "os::map_memory_to_file" to exit the VM in case of an error.

This, in my eyes, is an error, since general purpose function should under no circumstances exit the process.

In addition to that, we have "os::create_file_for_heap", which also exits the process. This is more ambivalent, since by its name it is no general purpose function but a "one-trick-pony"; the clear intention of this function is to create a memory range for one particular purpose - the java heap. But I still would very much prefer the function not exit the process.

Imho, in all these cases the decision of exiting the process should be done by the caller using this function.



Comments
Runtime Triage: This is not on our current list of priorities. We will consider this feature if we receive additional customer requirements.
05-02-2019

Oh, you are right, I removed 8193105 from the bug report.
29-08-2018

Agree with [~stuefe]. But JDK-8193105 didn't introduce any new exit path, it just added error code to print out.
28-08-2018