[2.0 rc.13 + next] Aborted document closes a live-hole channel twice
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 55/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- typescript
- 领域
- backend
调研方向
The issue does not name Solid source files; start by reading the server-side streaming and live-channel cleanup paths implicated by the reproduction. Run the standalone repro.test.ts from the linked reproduction setup with a Solid HEAD build, then compare normal completion with abort followed by producer completion. Done means aborting and later completing the producer does not throw, while normal cleanup still works.
由索引模型根据 Issue 内容生成。
描述
Describe the bug
Abort followed by producer completion should clean up once. Instead an uncaught Controller is already closed TypeError escapes the document live channel.
Your Example Website or App
Steps to Reproduce the Bug or Issue
- Use the source below with the selected Solid build (complete setup is linked above).
import { createMemo } from "solid-js";
import { renderToStream } from "@solidjs/web";
import { frameTransformDirectResult } from "@solidjs/web/frames/server";
export function startDocument(values: () => AsyncIterable<number>) {
const Component = frameTransformDirectResult(
() => {
const value = createMemo(values);
return <b>{value()}</b>;
},
{ id: "minimal" },
);
const controller = new AbortController();
let html = "";
const stream = renderToStream(() => Component(), {
signal: controller.signal,
onError() {},
});
stream.pipe({
write: (chunk) => {
html += String(chunk);
},
end() {},
});
// After the first value, abort(), then finish the source.
// Source completion throws "Controller is already closed".
return { abort: () => controller.abort(), html: () => html };
}
- Requires server-side streaming. Pass an async generator that yields 1 and then waits. Once 1 has streamed, call the returned
abort(), then release the generator. The normal-completion control cleans up once.
Expected behavior
Expected: Abort and later producer completion clean up without an uncaught exception.
Actual: Producer completion throws TypeError: "Controller is already closed".
Platform
- Solid:
solid-js/@solidjs/webnext at3086f1b77cd7b0431d3a7f768c2984c335758633; comparison2.0.0-rc.13. Signals, compiler and diagnostics match the selected Solid build. - OS: macOS 26.6.2 (25G83); browser cases: system Google Chrome 155.0.8059.40. Server-only/type checks run in Bun 1.4.2.
- Builds/comparison: Development, production, and observe fail on HEAD and rc.13. Observe is the production runtime with optional instrumentation.
Additional context
Aborting one document should close its live channel once. Double close rejects with an invalid stream state during cleanup.
Related: #3768
Full automated reproduction
One-command setup, run and expected output.
Copy the standalone folder into a fresh Bun project. The visible source above is executed by these tests; the additional files supply the required HTTP, compilation, and browser setup.
bun init -y
bun add [email protected] @solidjs/[email protected] @solidjs/[email protected] @solidjs/[email protected] @solidjs/[email protected]
bun add -d playwright
bun run link-head.ts /absolute/path/to/built/solid
BUILD_MODE=development bun test ./repro.test.ts
The link command selects a built Solid HEAD checkout; omit it for rc.13. Repeat with BUILD_MODE=production for the production comparison. Browser tests use system Google Chrome.
- 主要语言
- TypeScript
- 星标
- 36.1k
- 派生
- 1.1k
- 平均合并
- 11 小时 25 分钟
- 30 天内合并 PR
- 345
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
solidjs/solid 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 35/100
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 12/100
维护者通常 1 天内回复
-
Select loses its bound value when options load asynchronously可能已有人在做 @MokiMeow 今天认领。 未关闭
难度 3/5 半天 新手友好度 45/100
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 18/100
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 24/100
维护者通常 1 天内回复
相似的 Issue
-
[Docs] README: FAQ setup command, IDA in the intro, Node badge可能已有人在做 @akram1089 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
[Feature]: [P3] engine-rs: the package source hash should ignore line endings and untracked files未关闭
难度 2/5 1-3 小时 新手友好度 70/100
maniator/verticopolis#880 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
-
难度 2/5 1-3 小时 新手友好度 62/100
siyuan-note/siyuan#20353 ·
维护者通常 1 天内回复
-
afk-ok area:data-quality importer size:S
难度 2/5 1-3 小时 新手友好度 82/100
enorm-labs/event-junkie#3027 ·
维护者通常 1 天内回复