Gemfire: Silent Data Corruption During Snappy Decompression on Azul Zing 21
search cancel

Gemfire: Silent Data Corruption During Snappy Decompression on Azul Zing 21

book

Article ID: 449896

calendar_today

Updated On:

Products

VMware Tanzu Gemfire

Issue/Introduction

Upgrading applications to Azul Zing 21 (JDK 21) introduces silent data corruption during decompression operations when using the org.iq80.snappy:snappy:0.4 library. This creates a risk of downstream propagation and persisting corrupted states to disk stores.

Environment

 

All supported Gemfire versions running the specific configuration below.

  • JVM Platform: Azul Zing 64-Bit Tiered VM (Zing25.08.400.0+4, JDK 21.0.10)

  • Garbage Collector: GPGC/C4 (Generational Pauseless / Concurrent Compacting GC)

Cause

Root Cause: A memory race condition between Falcon JIT-compiled raw sun.misc.Unsafe memory writes in org.iq80.snappy.SnappyDecompressor and

concurrent array object relocation by Azul’s C4 (GPGC) Garbage Collector.

Trigger: When Azul’s C4 collector relocates the target byte array mid-decompression,Falcon-compiled native code continues writing data directly to the stale memory address

using un-guarded Unsafe offsets. Meanwhile, the Java object reference points to the newly allocated, zero-initialized page.

Impacted Scope: Any service running org.iq80.snappy 0.4 on Zing 21 with active concurrent C4 garbage collection.

Resolution

Immediate Remediation (Production Workaround)

Apply the JVM JIT exclusion flag across all service launch configurations running on Azul Zing
21:

Impact: Forces SnappyDecompressor to run in interpreted/C1 mode.
Trade-off: Negligible-to-minor throughput impact on decompression, but guarantees
100% data integrity.


Long-Term Remediation

  1. Upgrade Snappy Dependency: Upgrade org.iq80.snappy from 0.4 to 0.5+ or migrate to
    aircompressor / standard Java ByteBuffer implementations. Newer versions use safer,
    GC-compatible memory abstraction patterns.
  2. Azul Support Engagement: Open an official case with Azul Systems referencing this
    issue: "Falcon JIT unsafe loop compilation omitting C4 object relocation barriers in
    org.iq80.snappy.SnappyDecompressor"
    .
  3. Fleet Audit: Scan production codebases for legacy sun.misc.Unsafe usage (e.g.,
    off-heap caches, custom serialization libraries) that may be susceptible to similar memory
    race conditions under Zing 21 C4 GC.

Additional Information