RFR (XS): 8193105: Print error code when map_memory_to_file() fails
kim.barrett at oracle.com
Wed Dec 6 19:18:25 UTC 2017
> On Dec 6, 2017, at 6:31 AM, David Holmes <david.holmes at oracle.com> wrote:
> On 6/12/2017 9:25 PM, David Holmes wrote:
>> Hi Sangheon,
>> On 6/12/2017 5:46 PM, sangheon.kim wrote:
>>> Hi all,
>>> Could I have some reviews for this change?
>>> JDK-8190308 (Implementation: JEP 316: Heap Allocation on Alternative Memory Devices) introduced a new test(TestAllocateHeapAt.java) but it is failing on Solaris-Sparc with fastdebug build. But unfortunately there's no error print when related function fails.
>>> This proposal is simply adding error code print for further investigation of JDK-8192871(TestAllocateHeapAt fails), not change its logic.
>>> CR: https://bugs.openjdk.java.net/browse/JDK-8193105
>>> Webrev: http://cr.openjdk.java.net/~sangheki/8193105/webrev.0
>>> Testing: hs-tier1
>> ! vm_exit_during_initialization(err_msg("Error in mapping Java heap at the given filesystem directory. error(%d)", ret));
>> You should use strerror(ret) to print a readable error string here.
> Except you can't because on OSX util_posix_fallocate doesn't necessarily return an error code! That's another bug in this particular so-called "posix" function! :(
I agree that’s “another bug”.
I’m okay with Sangheon’s change as-is, in order to more quickly make progress on 8192871.
There should be a follow-on bug to fix the OSX implementation of util_posix_fallocate and use strerror in that error message.
More information about the hotspot-runtime-dev