RFR: 8263236: runtime/os/TestTracePageSizes.java fails on old kernels [v3]

Aleksey Shipilev shade at openjdk.java.net
Thu May 6 10:13:03 UTC 2021


On Thu, 6 May 2021 10:02:45 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> Aleksey Shipilev has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains five additional commits since the last revision:
>> 
>>  - Merge branch 'master' into JDK-8263236-trace-page-sizes
>>  - Merge branch 'master' into JDK-8263236-trace-page-sizes
>>  - Merge branch 'master' into JDK-8263236-trace-page-sizes
>>  - Make jcheck happy: remove the TAB
>>  - 8263236: runtime/os/TestTracePageSizes.java fails on old kernels
>
> I notice that the failures are like this with debug turned on:
> 
> 
> From logfile: [0.004s][info][pagesize] CodeHeap 'non-nmethods':  min=4M max=8M base=0x00007fffd9200000 page_size=2M size=8M
> From smaps: [7fffd9200000, 7fffd9600000) anonHugePages = 0 pageSize=4KB isTHP=false isHUGETLB=false
> 
> 
> 
> From logfile: [0.011s][info][pagesize] Block Offset Table: req_size=2580K base=0x00007fffd7400000 page_size=2M alignment=2M size=4M
> From smaps: [7fffd7400000, 7fffd7600000) anonHugePages = 0 pageSize=4KB isTHP=false isHUGETLB=false
> 
> 
> So these probably are not committed yet, because `-XX:+AlwaysPreTouch` (set by test) do not affect them. (sighs)

> @shipilev, do you know which change did break the test again, I did a few different cleanup that are related.

Don't know yet. But I think this kind of failure highlights that tracking `AnonHugePages` is not fool-proof either: we implicitly rely on allocations/commit happen in that area to have AHP != 0. Which is doable for Java heap with `-XX:+AlwaysPreTouch`, but not for VM areas. There are various -XX:+Zap* flags, but they do not cover every VM area. 

> @shipilev, that sounds like a valid theory. But not sure why that should have changed recently.

I am now not even sure that the test passed reliably during my first attempt. All 6 subtests intermittently pass/fails with this patch.

Let me mull over this a bit. Maybe the saner way out would be checking the kernel version and bailing on older kernels.

-------------

PR: https://git.openjdk.java.net/jdk/pull/3415


More information about the hotspot-runtime-dev mailing list