Skip to content

fix(installer): detect stale background-task pids - #2901

Open
patil2001 wants to merge 1 commit into
Osmantic:mainfrom
patil2001:fix/bk2/bg-stale-pid
Open

fix(installer): detect stale background-task pids#2901
patil2001 wants to merge 1 commit into
Osmantic:mainfrom
patil2001:fix/bk2/bg-stale-pid

Conversation

@patil2001

Copy link
Copy Markdown
Contributor

Summary

bg_task_status used os.kill(pid,0) alone, which only proves some process
owns the number: a reaped and recycled pid is reported running, so
bg_task_wait spins to its 1200s timeout instead of completing. Record the
process start time at registration and only treat a live pid as the task
when its start time still matches.

AI Assistance

AI helped draft; I reviewed every hunk and ran the checks below.

Release Lane

  • Stable hotfix targeting release/2.6.x
  • Mainline change targeting main
  • Next-minor work targeting the next feature/minor release
  • Not sure; reviewer should help classify

Changed Surface

  • Docs only
  • Tests only
  • Dashboard UI
  • Dashboard API / host agent
  • Installer / bootstrap / lifecycle
  • Docker Compose / service manifests
  • Model routing / Hermes / capabilities
  • Network exposure / auth / proxy
  • Dependencies / runtime wiring

Risk And Validation

  • Risk level: Low
  • Validation run:
    • git diff --check
    • Focused tests listed below

Commands/results:

�[0;31m\u2717�[0m live task not reported running (rc=1)

Operational Change Check

  • This is an operational change and validation is recorded above.

bg_task_status used os.kill(pid,0) alone, which only proves some process
owns the number: a reaped and recycled pid is reported running, so
bg_task_wait spins to its 1200s timeout instead of completing. Record the
process start time at registration and only treat a live pid as the task
when its start time still matches.
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