[jdk11u-dev] RFR: 8253795: Implementation of JEP 391: macOS/AArch64 Port [v7]
Ahmed Muhsin
duke at openjdk.java.net
Mon Jan 24 18:22:11 UTC 2022
On Thu, 20 Jan 2022 15:43:46 GMT, Vladimir Kempik <vkempik at openjdk.org> wrote:
>> Initial version of JEP-391 backport to jdk11u.
>> Build system changes are mostly clean, except cds disabling part, it's copy&paste from aix part.
>> Things needing attention: os_bsd_aarch64.cpp and W^X transitions.
>> serviceability agent is mostly clean.
>> This passed GHA_tier1 testing.
>> Full regression testing is running now on Azul's infra, will report/update PR when done.
>> **Update: TCK passed, full regression testing is fine on intel platforms, macos/aarch64/openjdk11 is good compared to macos/aarch64/zulu11**
>> Sharing this PR slightly earlier to let other interested parties to run the tests too.
>> Example of cross-building on intel mac (needs Xcode12/13):
>> sh configure --with-boot-jdk=/Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home/ --with-build-jdk=/Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home/ --disable-warnings-as-errors --openjdk-target=aarch64-apple-darwin --with-extra-cflags='-arch arm64' --with-extra-ldflags='-arch arm64' --with-extra-cxxflags='-arch arm64'
>
> Vladimir Kempik has updated the pull request incrementally with one additional commit since the last revision:
>
> Ignore TestOnError.java on macos_aarch64
I have some more test results that I want to share incase anyone has any insight while I continue to analyze the results on my own:
### 1. On Mac OS 11.0.0 a random crash occurs when executing jtreg tests:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGBUS (0xa) at pc=0x000000013000bbfc, pid=15124, tid=39975
#
# JRE version: OpenJDK Runtime Environment Microsoft-30340 (11.0.14+9) (build 11.0.14+9-LTS)
# Java VM: OpenJDK 64-Bit Server VM Microsoft-30340 (11.0.14+9-LTS, mixed mode, tiered, compressed oops, g1 gc, bsd-aarch64)
# Problematic frame:
# j java.lang.ProcessImpl.forkAndExec(I[B[B[BI[BI[B[IZ)I+0 java.base at 11.0.14
#
# Core dump will be written. Default location: /cores/core.15124
#
# An error report file with more information is saved as:
# /Users/az_devops_agent/agent/_work/57/jdk/JTwork/scratch/hs_err_pid15124.log
Could not load hsdis-aarch64.dylib; library not loadable; PrintAssembly is disabled
#
# If you would like to submit a bug report, please visit:
# https://github.com/microsoft/openjdk/issues
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
- Scenarios where crash occurs:
- During the execution of a test. In which case jtreg will return a result of `Failed` and continue executing tests.
- After a test has finished executing. In this case, jtreg has just finished executing a test and returned the test result for it. This crash would then occur and jtreg stops without executing anymore tests.
- The crash is intermittent; most of the tests will run without experiencing this crash if I rerun them enough times.
- This behavior does not occur on Mac OS 12.0.1
- This behavior does not occur on my local build of JDK17u for any OS version.
Here is an example core dump of a crash that occurred when attempting to run `applications/ctw/modules/jdk_scripting_nashorn.java`: [forkAndExec_coredump.log](https://github.com/openjdk/jdk11u-dev/files/7927720/forkAndExec_coredump.log)
### 2. Failing hotspot/runtime/NMT tests:
runtime/NMT/BaselineWithParameter.java
runtime/NMT/CommitOverlappingRegions.java
runtime/NMT/HugeArenaTracking.java
runtime/NMT/JcmdBaselineDetail.java
runtime/NMT/JcmdDetailDiff.java
runtime/NMT/JcmdScale.java
runtime/NMT/JcmdScaleDetail.java
runtime/NMT/JcmdSummaryClass.java
runtime/NMT/JcmdSummaryDiff.java
runtime/NMT/MallocRoundingReportTest.java
runtime/NMT/MallocSiteTypeChange.java
runtime/NMT/MallocStressTest.java
runtime/NMT/MallocTestType.java
runtime/NMT/MallocTrackingVerify.java
runtime/NMT/ReleaseNoCommit.java
runtime/NMT/SafepointPollingPages.java
runtime/NMT/SummarySanityCheck.java
runtime/NMT/ThreadedMallocTestType.java
runtime/NMT/ThreadedVirtualAllocTestType.java
runtime/NMT/UnsafeAllocMemory.java
runtime/NMT/VirtualAllocAttemptReserveMemoryAt.java
runtime/NMT/VirtualAllocCommitMerge.java
runtime/NMT/VirtualAllocCommitUncommitRecommit.java
runtime/NMT/VirtualAllocTestType.java
All of those tests fail because because of the same assert:
# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc: SuppressErrorAt=/virtualMemoryTracker.cpp:516
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (/Users/ahmed/Documents/dev/repos/jdk11u-rebase/src/hotspot/share/services/virtualMemoryTracker.cpp:516), pid=20257, tid=26115
# assert(committed_size > 0 && is_aligned(committed_size, os::vm_page_size())) failed: Must be
#
# JRE version: OpenJDK Runtime Environment (11.0.14) (fastdebug build 11.0.14-internal+0-adhoc.ahmed.jdk11u-rebase)
# Java VM: OpenJDK 64-Bit Server VM (fastdebug 11.0.14-internal+0-adhoc.ahmed.jdk11u-rebase, mixed mode, tiered, compressed oops, g1 gc, bsd-aarch64)
# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
Unsupported internal testing APIs have been used.
# An error report file with more information is saved as:
# /Users/ahmed/Documents/dev/repos/jdk11u-rebase/build/macosx-aarch64-normal-server-fastdebug/test-support/jtreg_test_hotspot_jtreg_runtime_NMT/scratch/hs_err_pid20257.log
#
# If you would like to submit a bug report, please visit:
# https://bugreport.java.com/bugreport/crash.jsp
#
- This occurs on Mac 11.0.0 and 12.0.1
- This does not occur on my local build of JDK17u
Here is an example core dump of a crash that occurred when attempting to run `runtime/NMT/VirtualAllocTestType.java`: [assertCrash_coredump.log](https://github.com/openjdk/jdk11u-dev/files/7927880/assertCrash_coredump.log)
-------------
PR: https://git.openjdk.java.net/jdk11u-dev/pull/715
More information about the jdk-updates-dev
mailing list