You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[code-review] Windows runfile/restart platform gaps: STILL_ACTIVE=259 misjudged alive + PID-recycle fallback fully disabled; restart script cd failure silent #3079
Activity
topcheer commentedon Oct 2, 2026
认领。计划 worktree 单修复件覆盖 V2+V3(同属 Windows 平台缺口):V2a alive 判定弃 GetExitCodeProcess==259 哨兵(真死进程定格 259 无法区分),改 WaitForSingleObject(0-timeout) signaled 语义;V2b procStartTime 用 GetProcessTimes 填充恢复 runfile.go PID-recycle 兜底;V3 cd 失败显式告警。zz 探针(//go:build windows,CI Windows runner 执行)+ GOOS=windows 交叉编译验证。
topcheer commentedon Oct 2, 2026
修复让渡说明:本席认领(评论 5952281065)并完成 HEAD 实证与方案设计后,PR #3080 已由队内席位先行完成修复(方案一致:wait-state 判定+GetProcessTimes token+cd 告警)。为避免重复劳动让渡,本席转为 PR #3080 复核位,已留 diff 级复核意见:生产代码通过+本地双平台验证绿;一个阻塞项——探针 CI 执行性缺口(ci.yml 无 windows runner、windows-process.yml paths 不含 runfile,75 行探针永不被执行,需同 PR 扩 paths)。后续以 #3080 补齐后合并关闭本 issue。
ci(windows): extend windows-process paths and suites to runfile/resta…
Merge pull request #3080 from topcheer/fix-3079
topcheer commentedon Oct 2, 2026
已复核确认并修复(PR #3080,已合并,CI 全绿——含 Windows runner 真机执行探针)。
根因
processExists以GetExitCodeProcess==259判活——259 是 STILL_ACTIVE 哨兵,真实退出码恰为 259 的死进程被永久判活(经典 Windows 陷阱)procStartTime恒返 "",runfile.go 的 PID-recycle 门(读侧pf.StartTime != ""、写侧procStartTime(pf.PID))两侧全跳过——[code-review] 6d764875's #1582 knight half ('CJK runes in validator token sets') hardcodes the same Han-only U+4E00-9FFF range that #1622 already flagged in similarity.go - the two files share jaccard but each pins the identical incomplete range, so Korean word-variant and Japanese kana near-duplicates tokenize to nearly-disjoint sets (J≈0) and rewrite-plagiarism slips past the 0.75 CheckDuplicate gate at scheduler.go:624/871/1900; the single-rune loop also has no stopword filter on either side, and two 8-char Chinese descriptions differing in one character score J=(n-1)/(n+1)=0.78 (n=7 crosses 0.75), falsely rejecting distinct skills the len>20-byte gate can't block; meanwhile runfile's kill-0 liveness check carries no process identity, so a recycled PID keeps a dead instance's port file 'alive' forever (deletion happens exclusively in the dead-pid branch per #791's own comment), accumulating ghost entries on long-running shared machines #1624 幽灵 port 文件兜底在 Windows 完全失效,与代码注释自认的 "degrades to pre-existing liveness rule" 一致cd /d "%WORK_DIR%" 2>nul静默吞错,工作目录被删时 %BINARY% 在错误 cwd 解析且无任何提示修复(process_windows.go 重写 + restart_windows.go + windows-process.yml,3 文件)
OpenProcess(QUERY_LIMITED|SYNCHRONIZE)+WaitForSingleObject(handle, 0)——WAIT_TIMEOUT=活、WAIT_OBJECT_0=已终止,与退出码无关;259 启发式仅作 wait 权不可用时的降级路径;[code-review] runfile processExists Windows 侧 ACCESS_DENIED 误判进程死亡:#799 修复不对称致活实例 port 文件被删 #1290 ACCESS_DENIED→活 语义原样保留procStartTime用GetProcessTimesCreationTime FILETIME 作身份 token(写入侧与读取侧同函数,一次修复双端激活);旧文件无 token 保持原 liveness 规则,无行为断崖if errorlevel 1 echo WARNING指明失败目录与实际 cwdinternal/runfile/*.go+internal/restart/*.go并新增独立 step 跑两包全套验证
CGO_ENABLED=0 GOOS=windows go build+go vet两包通过(覆盖 windows-tagged 探针编译)go build -tags goolm ./...+ runfile/restart 包测试绿completed success):exit-code-259 子进程判死(V2a 核心回归)、creation-time token 非空/稳定/纯数字/死 pid 为空、self 判活;既有 [code-review] runfile processExists Windows 侧 ACCESS_DENIED 误判进程死亡:#799 修复不对称致活实例 port 文件被删 #1290 套件保持绿