Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

DuckDB helper crashes lose their cause and are reported as a "row cap clamp" in sql_materialize

オープン
#1,494 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
半日
初心者へのやさしさ
55/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
sql, typescript
領域
backend, databases

調査の方向性

Start in packages/drivers/src/local-engine.ts: the helper is spawned with stderr ignored near line 416, and the exit handler near line 438 reports only a generic message, so capture stderr and the exit code/signal there. Then check packages/opencode/src/altimate/tools/sql-materialize.ts around lines 321-328, where a failed pre-flight count is reported as a row cap clamp. Done when killing the helper with SIGKILL produces an error naming the signal, and a pre-flight crash in sql_materialize surfaces as a crash rather than a cap clamp.

索引モデルが issue の本文から書いたものです。

説明

Problem

When the DuckDB helper process dies (typically out of memory on a heavy join), the tool reports only "helper process exited unexpectedly"; in sql_materialize the crash occurs during the pre-flight count and is presented as a cap problem.

Mechanism

  • The helper is spawned with stderr: "ignore" (packages/drivers/src/local-engine.ts:416); the exit handler reports only "helper process exited unexpectedly" (:438) without exit code or signal.
  • In sql_materialize the failed count falls into "Pre-flight estimate unavailable (...); extraction row cap clamped to 200,000 rows" (packages/opencode/src/altimate/tools/sql-materialize.ts:321-328).
  • No DuckDB memory_limit or temp_directory is set.

Evidence

7 crashes in 7 sessions, each after 32-150 s (about 460 s total), all from json_each over a 277,813-row scratch table with correlated EXISTS/LIKE. Scratch tables survived (the file database reopened), and each crash restarted the helper.

Impact

About 460 s of wasted time; the model cannot tell OOM from a bad query, and the misleading cap message hides the cause.

Proposed fix

  • Capture helper stderr and exit code/signal; report "DuckDB helper killed (signal / out of memory)".
  • Configure memory_limit and temp_directory sized to the host.
  • Never describe a crash as a cap clamp; propagate the crash error.

Acceptance check

Killing the helper mid-query (SIGKILL) yields an error naming the signal; a pre-flight crash in sql_materialize surfaces as a crash, not a cap clamp.

主要言語
TypeScript
スター
810
フォーク
121
平均マージ
1日 10時間
マージ済み PR(30日)
89

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

AltimateAI/altimate-code のほかの issue

AltimateAI/altimate-code の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。