RFR: 8307058: Implementation of Generational ZGC [v6]
Yadong Wang
yadongwang at openjdk.org
Fri May 5 06:31:45 UTC 2023
On Fri, 5 May 2023 05:17:44 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:
>> test/hotspot/gtest/gc/z/test_zForwarding.cpp line 68:
>>
>>> 66:
>>> 67: bool reserved = os::attempt_reserve_memory_at((char*)ZAddressHeapBase, ZGranuleSize, false /* executable */);
>>> 68: ASSERT_TRUE(reserved);
>>
>> Hi,
>> Thanks for the great work!
>> I have performed some tests on linux-riscv64 Hifive Unmatched board. So far, I only witnessed one gtest failure:
>>
>>
>> $ make test TEST=gtest:ZForwardingTest
>> Building target 'test' in configuration 'linux-riscv64-server-release'
>> Test selection 'gtest:ZForwardingTest', will run:
>> * gtest:ZForwardingTest/server
>>
>> Running test 'gtest:ZForwardingTest/server'
>> Note: Google Test filter = ZForwardingTest*
>> [==========] Running 4 tests from 1 test suite.
>> [----------] Global test environment set-up.
>> [----------] 4 tests from ZForwardingTest
>> [ RUN ] ZForwardingTest.setup_vm
>> test/hotspot/gtest/gc/z/test_zForwarding.cpp:68: Failure
>> Value of: reserved
>> Actual: false
>> Expected: true
>> [ FAILED ] ZForwardingTest.setup_vm (0 ms)
>> [ RUN ] ZForwardingTest.find_empty_vm
>> [ OK ] ZForwardingTest.find_empty_vm (1 ms)
>> [ RUN ] ZForwardingTest.find_full_vm
>> [ OK ] ZForwardingTest.find_full_vm (8 ms)
>> [ RUN ] ZForwardingTest.find_every_other_vm
>> [ OK ] ZForwardingTest.find_every_other_vm (0 ms)
>> [----------] 4 tests from ZForwardingTest (761 ms total)
>>
>> [----------] Global test environment tear-down
>> ERROR: RUN_ALL_TESTS() failed. Error 1
>> [==========] 4 tests from 1 test suite ran. (762 ms total)
>> [ PASSED ] 3 tests.
>> [ FAILED ] 1 test, listed below:
>> [ FAILED ] ZForwardingTest.setup_vm
>>
>> 1 FAILED TEST
>> Finished running test 'gtest:ZForwardingTest/server'
>> Test report is stored in build/linux-riscv64-server-release/test-results/gtest_ZForwardingTest_server
>>
>> ==============================
>> Test summary
>> ==============================
>> TEST TOTAL PASS FAIL ERROR
>>>> gtest:ZForwardingTest/server 4 3 1 0 <<
>> ==============================
>> TEST FAILURE
>>
>>
>> The gtest failed this assertion where 'reserved' return by function os::attempt_reserve_memory_at is false.
>> I find the reason is that the mmap call at the bottom returns a different address instead of the requested one (ZAddressHeapBase). I think that is possible since we are not sure if the requested address is available before the mmap call, right? So I guess we might need some changes here for this gtest.
>
> Thanks for reporting. It would be interesting to see what address you get and compare it to the range [ZAddressHeapBase, ZAddressHeapBase+ZAddressOffsetMax).
We emailed to erik to discuss this issue two months ago, and maybe he missed it.
ZForwardingTest does not guarantee a successful invoke of os::commit_memory for ZAddressHeapBase, and we saw some conflicts between ZAddressHeapBase and the metadata address space on the RISC-V hardware of 39-bits virtual address. There is no failure in the normal initialization phase of JVM, because the commit order of them is guaranteed.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13771#discussion_r1185738633
More information about the serviceability-dev
mailing list