Repository navigation
Description
Summary
The existing 4.2 Family nightly loses both AP CN processes to OOMKilled / exit 137 at a 55 GiB memory limit. The first kill occurs during a 50-client ALTER MODIFY COLUMN workload and interrupts its SQL connections, before this FullConcurrent job begins its create/drop-account cases.
Archived pre-OOM Go live-heap profiles are dominated by Catalog metadata allocation paths. This is a concrete availability failure with a useful memory attribution, not yet proof of a Catalog memory leak, incorrect GC, or a newly introduced code regression.
Branch / version / environment
- Branch: 4.2-dev; tested MO:
260678bace0177678255089a23d0fe7d54cfc745. - Run 40897692071; AP full Concurrent job 123756680761.
- Namespace
mo-42-family-40897692071-1; topology 1 TP CN + 2 AP CN. - Each AP CN: 14 CPU, 55 GiB, requests=limits;
GOMEMLIMIT=25000MiB, cache 16 GiB. GOMEMLIMIT is a Go runtime target, not an all-memory hard cap. - This report is pinned to the tested SHA. Current 4.2 head has not been rerun for this investigation.
Observed timeline
All times are 2026-10-29 UTC; add eight hours for Oct 30 CST.
| UTC | Event |
|---|---|
| Before FullConcurrent | Exact run-owned account-prefix entry cleanup succeeds: before_count=0, remaining_count=0. This says nothing about other Family tenants or prior catalog versions. |
| 21:57:01 / 22:02:14 | create_drop_table / create_drop_table_high start, followed by other existing DDL cases. |
| 22:34:19 | alter_modify_column starts: 50 clients, five-minute duration, AP workload. |
| 22:39:21 | AP nightly-regression-dis-ap-cn-qw44z is OOMKilled, exit 137; the same second, active ALTER requests report Communications link failure. |
| 22:46:21 | First FullConcurrent create_drop_account case starts, after the first OOM. |
| 22:51:51 | High-concurrency account case starts. Its subsequent cleanup finds 3,357 run-owned accounts and fails; final remaining count is unknown. |
| 23:15:23 | AP nightly-regression-dis-ap-cn-dm4sx is OOMKilled, exit 137. |
Both AP pods have restartCount=1; the other seven main containers have zero restarts in the final native resource receipt. Both AP pods being Ready later does not erase the kills. The second event is not a clean zero-residue reproduction, and the first event being earlier than this job's account cases does not prove there were no concurrent metadata changes elsewhere in the Family.
The MODIFY selector itself uses table_{id} with IDs 1–100; a failing statement is ALTER TABLE table_13 MODIFY COLUMN col2 VARCHAR(25) NOT NULL. Its native summary records 84,878 successful operations and 35 errors. This bounds this selector's table pool, not the whole Family's Catalog or retained DDL history.
Memory evidence
TKE Prometheus container_memory_working_set_bytes, sampled every 15 seconds over 22:10–23:20, reaches approximately 53.76 GiB for qw44z and 54.37 GiB for dm4sx. These sampled values are not the exact OOM-time peak or a measurement of Go heap alone.
Archived Pyroscope memory:inuse_space:bytes:space:bytes, isolated by namespace and AP pod, before each kill:
| Pod / UTC profile window | Catalog allocation path |
|---|---|
| qw44z, 22:36:30–22:39:15 | disttae.applyToCatalogCache subtree accounts for 81.95% of sampled Go live-heap bytes. Self contributions include ParseTablesBatchAnd 29.83%, plan.Property.Unmarshal 27.29%, ConstraintDef.UnmarshalBinary 17.73%, getTableDef 4.89%. |
| dm4sx, 23:12:30–23:15:15 | The same subtree accounts for 84.68%; the principal metadata allocation paths recur. |
These percentages are of the merged profile samples, not instantaneous RSS. Do not interpret the sum across profile snapshots as one process's resident bytes, or sum inclusive frames on top of their children. An in-use allocation stack identifies allocation origin, not the retaining reference/root or whether its lifetime is invalid. Native/cache allocations also exist, so Catalog percentages cannot be applied to total container memory.
The next distinction is necessary Catalog/MVCC retention versus avoidable duplication/late reclamation versus missing metadata-pressure admission. No live heap dump, manual GC, workload rerun or environment modification was performed here.
Primary evidence / replay recipe
- Native pod/resource artifact 12940696731:
pods.jsoncontains exact limits,lastState.terminated.reason=OOMKilled, exit codes and timestamps. - FullConcurrent artifact 12940776272:
alter_modify_column.log, case timeline, exact-owned account cleanup receipts and failure records. Avoid reposting raw log headers containing test credentials. - TKE Grafana: Loki namespace
mo-42-family-40897692071-1, the exact pod names and pre-OOM windows above. The actual Pyroscope heap selector for the first event is{service_name="mo-42-family-40897692071-1/main",pod="nightly-regression-dis-ap-cn-qw44z"}; the second uses the same service with podnightly-regression-dis-ap-cn-dm4sx.
The captured scenario is the existing Weekly AP full Concurrent sequence under the same Family configuration. For a small controlled follow-up, retain the actual DDL shape and prior metadata history, run the table-DDL sequence with/without the other Family workloads, and measure Catalog objects/versions and live heap across explicit quiescence. A standalone ALTER loop has not yet been shown to reproduce this; restarting with an empty Catalog is not an equivalent control.
Expected behavior
Bound/reclaim metadata growth or reject work safely when the applicable resource boundary is reached, preserving CN availability. This does not require unlimited DDL to succeed inside 55 GiB. Verification must include the original concurrent workload and the memory/availability outcome, not only that the CN becomes Ready again.
Existing tracking and why a new issue
- Closed #28367 is the closest history, with similar Catalog profiles. Its closure explicitly covers nightly account-residue mitigation, not a kernel memory fix, and requests a separate evidence-backed kernel issue for subsequent OOM. This first kill precedes the current job's account cases; the later failed cleanup remains a separate confounder.
- Open #23777 concerns tenant-aware Catalog subscriptions; it is related design background, not a demonstrated fix for this incident.
- #29275 covers large-Catalog recovery/admission stalls without an OOM in its reported event. #30293 concerns a different MOI metadata-discovery/FK-amplification scenario. Neither establishes the cause here.
Open and closed issues were checked for the exact stack and neighboring DDL/Catalog/OOM failures. No current issue precisely tracking this incident was found. The confirmed facts are the kills, SQL interruption and pre-kill Catalog-heavy live allocations; the retaining mechanism, first-bad commit, regression status and Main applicability remain to be established.
Activity
fix(catalog): prevent property amplification across ALTER rewrites (#…
MatrixAdventurer commentedon Nov 11, 2026
【只读核实·部分修复】
过去 48h 内相关修复已合并多条:#32458/#32460(workspace 在途 vector 数据量约束,11-10 07:39/07:40Z 合并)与 #32465(base=main,11-10 11:14Z 合并,Fixes #32463)。
#32465 修的是确认存在的一条放大路径:反复 in-place ALTER 会把 relkind/rel_createsql/rel_comment 追加回 StreamConfigsDef 持久化属性。实现:新增 pkg/catalog/table_properties.go 的 AppendStreamConfigProperties,在 cache.getTableDef 与 txnTable.GetTableDef 两处投影恢复 catalog 列边界;UT 覆盖两个读取端、planner/engine 转换、历史重复约束(含 disttae/cache/table_properties_test.go TestAppendStreamConfigProperties 等),BVT 断言重复 ALTER 下序列化元数据有界;PR 自述 host50 连续 100 次 MODIFY 后 constraint bytes 298/298/298。
还缺:①#32465 自述不构成本 OOM 事件根因结论,55GiB 分布式复现未按修复重跑;②PR 明言不含 Main/4.2 RSS 差异全貌,且未见其回合 4.2-dev;③Issue 正文列的 first-bad commit、内存滞留机制与 regression 认定仍待逐项回答。建议在 4.2 侧复现环境重跑后再评估关闭。
本操作由LW授权的MOI智能体提交
[4.2-dev] fix(catalog): prevent property amplification across ALTER r…