[Windows] Transient ffmpeg/ffprobe spawn failures (EBUSY/ETXTBSY) fail the whole render with a bare "spawn EBUSY" — no retry, no context
维护者通常 1 天内回复
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 38/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- typescript
- 领域
- backend
调研方向
Start by tracing the three spawn paths in packages/engine/src/utils/runFfmpeg.ts, packages/producer/src/services/audioExtractor.ts, and packages/producer/src/services/render/audioPadTrim.ts. Verify how each reports spawn errors, then check the surrounding test setup before defining coverage for transient retries and exhausted failures. Done means the affected Windows spawn failures retry with backoff and exhausted errors include the binary path, errno, and file-lock hint.
由索引模型根据 Issue 内容生成。
描述
Describe the bug
On Windows, spawning the managed ffmpeg/ffprobe binaries can fail transiently with EBUSY/ETXTBSY when the executable file is briefly locked — overwhelmingly antivirus real-time scanning a just-written or just-executed exe, occasionally a lingering handle from a concurrent sibling invocation (a single render shares one managed ffmpeg binary across many stages: media probing, frame extraction, audio mix, encode).
When that happens, the whole render fails with a bare, context-free error and there is no retry:
Error: spawn EBUSY
We observed this repeatedly in an Electron integration of the producer: a Delivery transcode step used the same managed ffmpeg.exe seconds before the render pipeline started; the render then failed on its first ffmpeg/ffprobe spawn and the user-facing export was lost. Re-running the export afterwards succeeded — confirming the condition is transient.
Root cause
All three spawn sites surface the raw child-process error without classification or retry:
packages/engine/src/utils/runFfmpeg.ts— the spawn error arrives inside theManagedChildProcessoutcome (reason: "spawn_error", rawerror).packages/producer/src/services/audioExtractor.ts(runFFmpeg) —ffmpeg.on("error", reject).packages/producer/src/services/render/audioPadTrim.ts(runFfprobeJson) — throwsoutcome.errorraw.
Node reports these as Error: spawn EBUSY (with .code set), so neither the user nor the logs can tell which binary, which stage, or that the condition usually clears on retry.
Expected behavior
- A transient file-lock spawn failure should be retried a few times with a short backoff — a fresh spawn almost always succeeds once the AV scan finishes.
- When retries are exhausted, the error should name the binary and the errno, and hint at the usual cause.
Environment
- Windows 11 x64 (applicable to any Windows host with real-time AV scanning)
- Producer used via an embedded runtime, ~v0.8.40
ffmpeg.exe/ffprobe.exeresolved via managed binary paths
Proposed fix
A shared engine helper, withTransientSpawnRetry, that:
- classifies
EBUSY,ETXTBSY,EAGAIN,EMFILE,ENFILEas transient file-lock errnos; - re-runs the caller's existing spawn-and-wait flow with exponential backoff (250 ms base, up to 3 attempts) and logs each retry with the binary path;
- enriches exhausted failures with the binary path, errno, and a "transient file lock (often antivirus real-time scanning)" hint;
- wraps the caller's flow rather than the raw
spawn()call, so a healthy spawn keeps its exact synchronous timing.
A PR is on the way.
- 主要语言
- TypeScript
- 星标
- 54.1k
- 派生
- 4.9k
- 平均合并
- 7 小时 29 分钟
- 30 天内合并 PR
- 778
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
heygen-com/hyperframes 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 85/100
heygen-com/hyperframes#5027 ·
维护者通常 1 天内回复
-
fix(producer): propagate useGpu to HDR layered streaming encoder可能已有人在做 @Monster-GM 于 1 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 87/100
heygen-com/hyperframes#5002 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
heygen-com/hyperframes#4702 · 1 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
Studio catalog prompt editor has no accessible name可能已有人在做 @lorenzozanee 于 11 天前认领。 未关闭bug difficulty/easy triage/ready
难度 2/5 1-3 小时 新手友好度 78/100
heygen-com/hyperframes#4384 ·
维护者通常 1 天内回复
-
lint: validate composition variables declared on supported root elements可能重新可做 关联的 PR 已关闭且未合并。 未关闭bug difficulty/easy triage/ready
难度 2/5 1-3 小时 新手友好度 88/100
heygen-com/hyperframes#4383 ·
维护者通常 1 天内回复
查看 heygen-com/hyperframes 的全部 Issue
相似的 Issue
-
perf(core): getComments() runs the approved count and the comment list as two sequential queries未关闭area/core bot:bug bot:working
难度 2/5 1-3 小时 新手友好度 76/100
emdash-cms/emdash#3905 · 2 条评论 ·
维护者通常 1 天内回复
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
难度 1/5 1 小时以内 新手友好度 90/100
lingdojo/kana-dojo#31728 · 1 条评论 · 5 个 reaction ·
维护者通常 1 天内回复
-
selective-claw: freshTailTurns=0 keeps ALL turns verbatim and summarizes none (slice(-0) === slice(0))可能已有人在做 @zjncs 今天认领。 未关闭component:tokenless
难度 2/5 1-3 小时 新手友好度 80/100
agentic-os-org/ANOLISA#6112 · 1 条评论 ·
维护者通常 1 天内回复
-
bug needs triage
难度 2/5 1-3 小时 新手友好度 75/100
rjsf-team/react-jsonschema-form#5439 ·
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复