Skip to content

liquid: FSST = and != grow an entry by 160 KiB uncharged #78

Closed

Description

@zfarrell

Found by a memory-accounting audit of 8b3c813. The tests are on branch audit/memory-tests and fail on main today; check out that branch to run them. File and line links point at that commit.

What goes wrong.

  • The first = or != predicate with a non-empty literal on an FSST string entry builds a compressor and keeps it in the entry. The inferred owner is compressor: OnceLock<Compressor> in vortex encodings/fsst/src/array.rs:465,554.
  • The entry's charge never changes. The growth happens once per entry, lasts until the entry is dropped, and is not triggered by <, LIKE or = ''.

Evidence.

  • Exactly 163,840 bytes of growth (65,536×2 + 2,048×16) on every fixture.
  • On a hex16 column charged 90,975 bytes, that is 1.8x the entry's whole charge.
  • Second and third evaluations add 0.

Tests.

Test File Command Flags
audit_fsst_eq_predicate_does_not_grow_the_array src/core/src/liquid_array/size_audit.rs:876 cargo +1.96.0 test -p liquid-cache --lib audit_fsst_eq_predicate_does_not_grow_the_array -- --nocapture
audit_fsst_not_eq_predicate_does_not_grow_the_array src/core/src/liquid_array/size_audit.rs:881 cargo +1.96.0 test -p liquid-cache --lib audit_fsst_not_eq_predicate_does_not_grow_the_array -- --nocapture

Not inline: it needs a 100-line shared helper and the counting allocator.

Flags: P probabilistic (a pass after a fix only means the race wasn't hit), F interleaving forced by a test hook, L Linux only, D needs Docker, M measurement only, C control (passes by design).

Activity

  1. added
    bugSomething isn't working
    memoryMemory accounting or memory usage
    on Nov 17, 2026
  2. added a commit that references this issue on Nov 18, 2026
    7efa988
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingmemoryMemory accounting or memory usage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions