Skip to content

[Bug]: 4.2-dev AP CN OOMKilled during Wiki 10M l2_filter_threshold/pre recall at 100 concurrency #33643

Todo

Description

@Ariznawlll

Description

In the 4.2-dev TKE Weekly Family run below, an AP CN was OOMKilled while executing the Wiki 10M IVFFlat l2_filter_threshold / mode=pre recall workload. Client connections were lost in the same second, the six-mode IVF evidence became incomplete, and the shared resource-health gate failed.

This report tracks the availability failure and the exact workload/resource timeline. It does not assert a memory leak, a particular allocating component, an introducing PR, or the same root cause as any related issue.

Environment

Workload

The failing case is l2_filter_threshold-pre in the Wiki 10M 768d six-mode recall job:

  • 10,000 queries per round, two rounds expected
  • 100 concurrent workers
  • k=10
  • probe_limit=5
  • ivf_preload_entries=0
  • file_id membership filter plus l2_distance(...) <= 2.5
  • BY RANK WITH OPTION 'mode=pre'

Timeline and actual behavior

  1. The IVF job started at 2026-12-01T18:59:50Z and reached the l2_filter_threshold-pre case after the other modes had completed.
  2. At 2026-12-01T19:11:39.324Z, the first recorded client failure was MySQL error 2013: Lost connection to MySQL server during query. Additional clients immediately reported InterfaceError.
  3. Kubernetes pod status records the AP CN main container terminating at 2026-12-01T19:11:39Z with exit code 137 and reason OOMKilled. The replacement container started at 19:11:40Z.
  4. The quality receipt recorded expected=10000, completed=10000, failed=10000, and connection_errors=100. QPS and recall were reported as zero, and the second round was missing.
  5. The independent Wiki result audit rejected the case as INCOMPLETE / invalid_quality_receipt; the six-mode inventory therefore failed. This is an availability/evidence failure, not a verified numerical recall regression.
  6. At the final resource gate, all 9 pods were Running and Ready, but the affected AP CN had restartCount=1 and lastState.terminated.reason=OOMKilled, so the resource gate failed.

The other five modes in the same six-mode job passed, including l2_filter_threshold-post. This shows that the cluster was not permanently unavailable, but does not prove that only the threshold-PRE mode can trigger the incident.

Evidence

  • Run-owned artifacts:
    • tke-family-weekly-shadow-1x2-weekly-ivf-46674761869-1
    • tke-family-weekly-shadow-1x2-resource-46674761869-1
  • pods.json records for the affected main container:
    • lastState.terminated.exitCode=137
    • lastState.terminated.reason=OOMKilled
    • lastState.terminated.finishedAt=2026-12-01T19:11:39Z
    • state.running.startedAt=2026-12-01T19:11:40Z
  • The IVF quality receipt and wiki_run_report.json preserve the failing client timestamps, query counts, missing second round, and incomplete audit status.

Stability / historical context

  • From 2026-11-22 through 2026-11-30, the comparable scheduled/manual runs that reached these steps passed both the IVF six-mode job and shared resource-health gate. The 2026-11-28 scheduled run skipped them after an earlier build-stage failure.
  • A 2026-10-29 run (40897692071) also failed the resource-health gate and the same two IVF audit/inventory steps. Its detailed evidence is no longer available, so it cannot yet be established as the same OOM or root cause.
  • The current incident therefore appears intermittent rather than demonstrated on every run.

Expected behavior / acceptance

Under the supported Family workload and configured resource limits, the AP CN should remain available, or reject work and recover memory without an uncontrolled OOM restart.

A fix verification should include:

  1. The same topology and l2_filter_threshold-pre workload completing both 10,000-query rounds with zero connection failures.
  2. Complete six-mode audit evidence and no AP CN OOM/restart during or after the Family workload.
  3. Container working-set, native malloc, and Go heap timelines around the workload, showing that memory is bounded and recovers after the workload.
  4. Repeated focused runs, because the incident is intermittent; a single green nightly is not sufficient proof.

Related issues

These are related by workload or symptom, but this report does not claim duplicate root causes:

Next investigation

  • Capture the affected AP CN's previous-container logs and container working-set timeline before 19:11:39Z.
  • Compare native malloc:inuse_space and Go memory:inuse_space before and during the threshold-PRE round, including after the workload stops.
  • Identify concurrent foreground/background work, merges, cache activity, and the exact query execution/profile at the OOM window.
  • Re-run the same SHA and mode in isolation and within the Family flow, with a no-threshold/control mode, before attributing the OOM to a specific component or PR.

Activity

  1. added
    kind/bug
    on Dec 2, 2026
  2. added theissue type on Dec 2, 2026
  3. added this to the MO-202612 milestone on Dec 2, 2026
  4. LeftHandCold commented on Dec 2, 2026

    @LeftHandCold
    Collaborator

    The direct parent and merge of #33514 isolate the change to the Wiki pre-ranking primary-key producer. Both builds ran the nightly SQL shape on the same 32,768-row fixture with a BIGINT primary key, a secondary index on file_id, VECF32(768), eight IVF lists and probe_limit=5. The comparison uses file_id=20000000, an upper L2 bound of 2.5 on the same vector as ORDER BY, and LIMIT 10 BY RANK WITH OPTION 'mode=pre'.

    Measurement Parent 95679da Merge cc55300
    PK producer 6,553 PKs directly from idx_file Secondary index plus a base-vector scan and distance predicate
    Additional base scan input None 32,768 rows / 97.25 MiB of logical input, 24.36 MiB operator-reported memory
    Removing only the upper-bound predicate No additional base-vector scan No additional base-vector scan
    Peak RSS above phase start, 8 clients × 4 queries 6.3 MiB 139.3 MiB

    In the failing AP CN, 100 transactions entered the Wiki base-table read path during 03:11:29–31 CST on Dec 2, with 200,000 PKs apiece. At least 71 slow reads included roughly 25 MB ranges across 22 objects between 03:11:33 and 03:11:36. The container reached its 55 GiB limit and was OOMKilled at 03:11:39, coincident with the first disconnect. The last native-memory sample predates the read peak. Together these observations identify #33514 as the source of the read amplification and a high-confidence contributor to this kill. They leave the final allocation breakdown and a memory leak unproven.

    A whole-PR revert would restore a known short/wrong Top-K for filtered PRE queries. The fix under test keeps exact membership, moves the eligible upper bound to the synchronous lossless index entries, and preserves the legacy small-domain crossover. Full acceptance remains open on the two 10,000-query rounds, 100 clients, 55 GiB AP CNs and the resource-health gate.

    Planner change in #33514 · Failing Wiki job · AP resource-health evidence

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind/bugseverity/s-1

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions