Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#1,494 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
Mezza giornata
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
sql, typescript
Ambito
backend, databases

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
TypeScript
Stelle
810
Fork
121
Merge medio
1g 12h
PR unite (30g)
94

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di AltimateAI/altimate-code

Tutte le issue di AltimateAI/altimate-code

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.