Revise ARM float/double accessors and ordering regressions (#419) - #860
peter-lawrey wants to merge 7 commits into
Conversation
Local addressment for the 2022-backlog PR programme (see .pr/NOTES.md). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Audit outcome: the volatile float/double accessors are in active use and ARMMemory provides custom unaligned implementations of the address-based read/writeVolatileFloat/Double, so the surface is kept and covered rather than deprecated. Adds UnsafeMemoryFloatTest and UnsafeMemoryDoubleTest by analogy with the existing Short/Int/Long tests, exercising the plain, unsafe, and volatile paths across UnsafeMemory and ARMMemory for direct, on-heap, and null-object addressing. Fixes #419 Co-Authored-By: Claude Opus 4.8 <noreply@noreply.anthropic.com>
|
Validation receipt, 13 September 2026. Review owner: Source: Executed on Linux amd64, OpenJDK 21.0.12+8-1-24.04-Ubuntu, Maven 3.9.11; started First attempt retained: the original clean verification failed before tests in Command and relevant execution logThe private worktree and cache paths are replaced by labelled placeholders. The isolated cache was already populated; resolved artifact hashes follow below. JAVA_HOME=/usr/lib/jvm/java-21-openjdk-amd64 mvn -B -o -ntp -X -Dmaven.repo.local=[isolated-maven-repository] -Dsurefire.rerunFailingTestsCount=0 -Dstyle.color=never clean verify -Dtest=UnsafeMemoryFloatTest,UnsafeMemoryDoubleTest,UnsafeMemoryOrderingLifecycleTestVerbatim configuration/result log lines, with local paths redacted: Surefire report content for both lifecycle controlsThe properties block and local path identifiers are removed; included test outcomes and diagnostic output are retained.
<testsuite xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://maven.apache.org/surefire/maven-surefire-plugin/xsd/surefire-test-report-3.0.xsd" version="3.0" name="net.openhft.chronicle.core.UnsafeMemoryOrderingLifecycleTest" time="0.189" tests="2" errors="0" skipped="0" failures="0">
<testcase name="partialStartupJoinsTheStartedWorkerBeforeFreeingNativeMemory" classname="net.openhft.chronicle.core.UnsafeMemoryOrderingLifecycleTest" time="0.094" />
<testcase name="interruptedOwnerJoinsWorkersBeforeFreeingNativeMemory" classname="net.openhft.chronicle.core.UnsafeMemoryOrderingLifecycleTest" time="0.083" />
</testsuite>Full selected-case manifest and compilation attempts
First PR attempt: Two matched develop compile controls: both Resolved test dependency SHA-256 manifestEarlier validation and discriminatorsThese are prior receipts inspected during this pass, not newly rerun full suites. Their recorded checkout SHAs precede the follow-up commits; keep them distinct from the clean published-head run above.
The earlier deliberate cleanup-removal mutation failed both lifecycle controls; this is a mutation discriminator, not an ARM-ordering reproduction: Historical description before 13 September corrections (superseded state)This preserves the earlier failures, dated check assessments and revision provenance. Draft/readiness statements below describe that older snapshot only. Refresh on 12 September 2026Merged develop Retained newer cleanup fixes. Full clean verify passed on Java 21: 2,202 reported tests, none skipped; the Java 8 assertions profile passed 328 selected float/double memory cases. These runs used Linux x86-64. Running the ARM implementation on x86 does not qualify ARM hardware. Local runs used Linux x86-64 and OpenJDK 21.0.12 unless Java 8 is explicitly stated (8u502). Reported test counts include skips. Commands requested zero Surefire reruns. Draft status and declared target are retained. Earlier implementation/review notes follow. Earlier validation and performance claims apply only to their stated revisions and are superseded by the current receipt above where they differ. What changedLocal WhyThis publishes the reviewed local solution for #419 so the implementation can be discussed in the normal review workflow. Review statusDraft — coherent local solution, not yet merge-ready. Before marking ready: Publish after the common gate; close after merge if no live accessor gap is found. Validation
TrackingFixes #419 This evidence supports author self-review. It does not waive required checks or certify merge readiness. No reviewer was requested and no review thread was resolved by this housekeeping pass. |
Dynamic factory summaries lose mode and offset details. Retain the last observed marker bits, acknowledgement and original worker exceptions, with a separate snapshot after both workers have joined. Log each completed case and the test JVM identity. Exercise an injected writer failure in the existing bounded native-memory control process. Production accessors, handshake count and deadline remain unchanged. Validation: Java 8 clean verify, 2205 tests, 10 skipped; Java 21 focused verify, 331 tests, none skipped. Both used effective retries of zero. These local x86 checks do not qualify ARM ordering or establish a repair.
Revise ARM float/double runtime accessors and retain the representation, addressing-mode and ordering regressions for #419. Aligned access uses the platform volatile primitive. Misaligned reads put the plain read before the acquire fence; misaligned writes put the release fence before the plain store. Misaligned access can tear and does not provide full volatile semantics.
The tests now allocate native storage inside the executed dynamic-test body and own both workers before startup. Cleanup stops and joins started workers before freeing storage, preserves primary failures and restores owner interruption. These changes are implemented; ARM hardware qualification is still outstanding.
Temporary diagnostics in 07ad47dfefa7 identify every completed ordering case, report the test JVM, retain the last observed marker bits and acknowledgement, and preserve worker exceptions with a separate memory snapshot after both workers join. Logging stays outside the active handshake. The existing subprocess controls now include an injected writer failure. Production accessors and test deadlines are unchanged; a diagnostic pass does not establish a repair.
Review map: ARM accessors, public contract, worker ownership and ordering tests, lifecycle controls.
Validation for
07ad47dfefa717449514b4ae6c2ad666ce31284con Linux amd64, with a dedicated Maven repository and effective test retries verified as zero:mvn -B -Dsurefire.rerunFailingTestsCount=0 clean verify-Dtest=UnsafeMemoryFloatTest,UnsafeMemoryDoubleTest,UnsafeMemoryOrderingLifecycleTestBoth runs executed all 168 local ordering cases and the three lifecycle/diagnostic controls. These x86 runs validate the diagnostic paths; ARM and Mac qualification of the pushed revision is pending.
Earlier receipt at
1a742c277b36and prior evidence: the first Java 21 clean attempt stopped at an ObjectUtils compilation error; one unchanged repeat passed all 330 selected cases, with no test retries or skips. Both matched develop compile controls passed. The intermittent compilation cause remains unclassified; the repeat is not a repair.Next owner:
peter-lawreymust self-review the ordering contract and native-memory lifetime, investigate the compilation failure and arrange ARM qualification. A second reviewer with memory-ordering expertise is to be chosen after that self-review. Keep draft pending ARM qualification; required checks and maintainer disposition remain merge gates.Refs #419.