Skip to content

Commit 9674fc5

Browse files
puzpuzpuzclaude
andcommitted
test(qwp): record JDK-8 verification of the recovery mmap-fault mechanism (#64 M2)
The recovery fix rests on HotSpot delivering a catchable InternalError (message containing "unsafe memory access operation") at an Unsafe access and on a direct try/catch catching it. Prior review verified this on JDK 17/21/25 and inferred JDK 8 from the adjacent pre-21 LTS releases, but JDK 8 is the shipping/CI source of truth and the original flake was on a JDK-8 ZFS runner, so it had to be checked there directly. Verified on Temurin 1.8.0_492: MmapSegmentRecoveryFaultTest passes 5/5 in both -Xint and JIT modes; HotSpot emits "a fault occurred in a recent unsafe memory access operation in compiled Java code"; a direct try/catch catches the fault in interpreter, C1, and C2 modes; isMmapAccessFault's shared fragment matches while the JDK 21+-only needle it replaced does not. The build-jdk8 CI job already runs this test on JDK 8 on every push, so the gate stays enforced. Documents the result in the test's class javadoc; no behavior change. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 4f78df2 commit 9674fc5

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

core/src/test/java/io/questdb/client/test/cutlass/qwp/client/sf/cursor/MmapSegmentRecoveryFaultTest.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,14 @@
6363
* so a reflection-based test spuriously fails on the shipping JDK 8/11/17
6464
* even though the direct-call production path catches it fine.</li>
6565
* </ul>
66+
* The fault-delivery mechanism the fix rests on was verified directly on the
67+
* shipping/CI Java floor -- JDK 8 (Temurin 1.8.0_492) -- not merely inferred
68+
* from the adjacent pre-21 LTS releases: the whole class passes there in both
69+
* interpreter ({@code -Xint}) and JIT modes, HotSpot emits the exact pre-21
70+
* message above, and a <i>direct</i> {@code try/catch} catches the fault in
71+
* interpreter, C1, and C2 modes. {@code isMmapAccessFault}'s shared
72+
* {@code "unsafe memory access operation"} fragment matches that message while
73+
* the JDK 21+-only needle it replaced does not -- the guard is live on JDK 8.
6674
* The unbacked tail is produced portably by truncating the file down (dropping
6775
* the tail blocks) and back up to the mapping size (leaving a sparse hole). A
6876
* hole-faulting filesystem (ZFS) then faults on the read exactly as in

0 commit comments

Comments
 (0)