[2.0] A long memo chain overflows the stack in the commit/settle path
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 22/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- javascript, typescript
- Ambito
- frontend
Direzione di ricerca
The bug is in the commit and settle walks, including settlePendingSource and the staged-error marking, which recurse once per memo node in the reactive graph. Start by reading those functions in the reactive core and reproducing with a warm-built chain of about 8,000 memos over a rejecting async source. Done means the walks are iterative with an explicit stack and the error surfaces as E:boomA at that depth.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What happens
A chain of createMemo nodes over an async source, read under <Errored> with isPending, overflows the call stack in the commit/settle path once the chain is long enough.
- On
next, a warm-built chain of about 8,000+ memos surfacesE:Maximum call stack size exceededas the rendered error, in place of the source's own error. - With #4582 (the settle walk also stage-marks chain nodes via
stageMark), the walk recurses through chains too. At about 15,000 nodes it silently drops the stagedE:boomAframe instead of erroring.
Real apps rarely build chains this deep, but the error should be the source's (boomA), never a stack overflow, and a frame should never be dropped without an error.
Repro shape
- Make an async source that rejects with
new Error("boomA"). - Build a chain of N
createMemonodes, each reading the previous one, after the source has a first value (warm build). - Read the last memo under an
Erroredboundary, together withisPending(last), in a render effect that records frames. - Trigger the rejecting flight and flush.
With N ≈ 8,000 on next, the recorded error is Maximum call stack size exceeded. Expected: E:boomA.
Likely fix direction
Make the commit/settle walks (including settlePendingSource and the staged-error marking) iterative with an explicit stack, instead of recursing per node.
Found during review of #4582. It doesn't block that PR, because next already fails at a shallower depth.
- Lingua principale
- TypeScript
- Stelle
- 36.2k
- Fork
- 1.1k
- Merge medio
- 9h 56m
- PR unite (30g)
- 487
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di solidjs/solid
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 22/100
I maintainer di solito rispondono entro 1 giorno
-
What gets passed to the `when` prop of a `Show` still gets executed twice on SSRForse già presa @brenelz l’ha presa 5 giorni fa. Aperta1.x
Difficoltà 3/5 1-2 giorni Idoneità per principianti 52/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di solidjs/solid
Issue simili
-
[Text] Add Reading Time & Word Count Estimator for Reflection Notes in src/lib/text/reading-time.tsApertaarea:core beginner-friendly community contributions-welcome difficulty:easy enhancement good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
[fullsend] E2E: scorecard — filecheck GitLab entity metrics unavailable due to initialDelay timingApertae2e-failure ready-to-code
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
redhat-developer/rhdh-plugin-export-overlays#4698 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
devswha/herdr-web-ui#2884 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
b:minor bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
software-mansion/argent#1771 ·
I maintainer di solito rispondono entro 1 giorno