Skip to content

测试修复:补强 PR715 worker 初始化失败处理 - #718

Merged
feixi139 merged 1 commit into
PFCCLab:mainfrom
feixi139:fix-pr715-correctness
Aug 21, 2026
Merged

测试修复:补强 PR715 worker 初始化失败处理#718
feixi139 merged 1 commit into
PFCCLab:mainfrom
feixi139:fix-pr715-correctness

Conversation

@feixi139

Copy link
Copy Markdown
Collaborator

背景

PR715 增加了 worker slot 初始化失败退避、退役和超时诊断,但仍存在部分初始化边界问题:

  • 多进程诊断命令可能累计阻塞 watchdog。
  • preparation 队列投递失败后,slot 未完整进入初始化失败状态机。
  • init_failed 后 wrapper 进程可能仍然存活。
  • slot 被 quarantine 时,serviceable 判定可能错误忽略仍在执行的 busy task。

修改内容

  • 为初始化超时诊断增加 10 秒总预算和统一 deadline。
  • preparation 队列失败时记录初始化失败次数,并回收 child、wrapper。
  • init_failed 后如果 wrapper 仍存活,强制终止。
  • 修正 has_serviceable_slots(),保留 busy slot 的在途任务,同时忽略已 quarantine 的 slot。

验证

  • pre-commit run --files engineV4.py
  • python -m py_compile engineV4.py
  • git diff --check

以上检查均已通过。

@feixi139
feixi139 merged commit f18e6c0 into PFCCLab:main Aug 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant