SWE-smith command timeouts leave child processes running
维护者通常 3 天内回复
评估
调研方向
Find smith_agent._run() and inspect how it launches bash -c with a timeout. Start by reading the existing subprocess tests, then run the two regressions described in the issue: a foreground shell with descendants and descendants that keep captured pipes open. Done means timed out commands terminate their process group while preserving exit code 124 and the existing timeout message.
由索引模型根据 Issue 内容生成。
描述
smith_agent._run() executes bash -c with subprocess.run(timeout=...). On timeout, Python kills the shell process, but its child commands can survive. The helper returns exit code 124 while those commands continue modifying /testbed during later turns or evaluation. The final pytest evaluation uses the same helper, so its worker processes can also outlive the evaluation timeout.
I reproduced this on bc3a9e8 with a temporary Python command that waits and then writes a marker:
# slow_command.py
from pathlib import Path
import time
time.sleep(2)
Path("late-write").write_text("command still running")
Calling _run("python slow_command.py && echo done", timeout=1) reports a timeout after about one second, but late-write appears afterward. The && keeps the shell as a separate parent. A background child can also hold the captured output pipes open after the shell exits.
Expected behavior: timing out an agent command should terminate its process group before the next action begins, while retaining the existing timeout message and exit code 124.
A focused POSIX fix and real subprocess regressions are ready. Two original regressions fail on main: foreground shell → child → grandchild, and descendants holding pipes after the shell exits. Additional tests cover normal output/status, a process-group exit race, startup failure, and discarded non-UTF-8 timeout output.
This was found during a follow-up audit of the coding example with AI assistance, which was also used for the fix and review. The reproduction uses temporary local files and CPU subprocesses; it does not run a SWE-smith dataset rollout.
- 主要语言
- Python
- 星标
- 18.9k
- 派生
- 1.7k
- 平均合并
- 5 天 18 小时
- 30 天内合并 PR
- 12
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/agent-lightning 的其他 Issue
-
Local workers fail for non-coroutine awaitable run results可能已有人在做 @cccccindy-hub1 于 1 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
microsoft/agent-lightning#666 ·
维护者通常 3 天内回复
-
RayPPOTrainer._dump_generations() missing gts argument in _train_step call可能已有人在做 @yunkai-yyk 于 265 天前认领。 未关闭bug v0.x verl
难度 1/5 1 小时以内 新手友好度 68/100
microsoft/agent-lightning#492 ·
维护者通常 3 天内回复
-
enhancement store v0.x
难度 2/5 1-3 小时 新手友好度 62/100
microsoft/agent-lightning#372 · 10 条评论 ·
维护者通常 3 天内回复
-
Prompt-token deduplication drops distinct image-conditioned transitions可能已有人在做 @liuzhengyang699 于 5 天前认领。 未关闭
难度 4/5 1-2 天 新手友好度 20/100
microsoft/agent-lightning#695 ·
维护者通常 3 天内回复
-
Training can admit batches beyond trainer.total_epochs可能已有人在做 @liuzhengyang699 于 5 天前认领。 未关闭
难度 4/5 3-5 天 新手友好度 30/100
microsoft/agent-lightning#693 ·
维护者通常 3 天内回复
查看 microsoft/agent-lightning 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
django-cms/djangocms-frontend#413 ·
-
难度 2/5 1-3 小时 新手友好度 82/100
NanmiCoder/MediaCrawler#1004 ·
-
难度 2/5 1-3 小时 新手友好度 72/100
facebookresearch/xformers#1417 ·
-
question
难度 1/5 1 小时以内 新手友好度 68/100
vllm-project/vime#524 ·
维护者通常 7 天内回复
-
难度 2/5 1-3 小时 新手友好度 73/100
FinanceFlash/unvibecode#675 ·
维护者通常 1 天内回复