Skip to content

fix(ipc): mark supervised processes dead for prometheus - #7017

Open
Ricky-7-Yan wants to merge 1 commit into
livekit:mainfrom
Ricky-7-Yan:fix/prometheus-process-teardown
Open

fix(ipc): mark supervised processes dead for prometheus#7017
Ricky-7-Yan wants to merge 1 commit into
livekit:mainfrom
Ricky-7-Yan:fix/prometheus-process-teardown

Conversation

@Ricky-7-Yan

Copy link
Copy Markdown

Summary

  • restore the Prometheus multiprocess teardown hook that was added in Configure Prometheus in multi process mode #3565 and later lost during the 1.3.0 process rewrite
  • call mark_process_dead(pid) after the supervised child is joined and before its Process handle is closed
  • keep teardown fail-open and add regression coverage to the existing supervised-process lifecycle test

This intentionally does not implement wildcard deletion of every *_<pid>.db file; that broader policy is separate from prometheus_client's documented dead-process hook.

Fixes #7006.

Testing

  • focused supervised-process teardown pytest: 1 passed
  • ruff check livekit-agents/livekit/agents/ipc/supervised_proc.py tests/test_supervised_proc_memory.py
  • ruff format --check livekit-agents/livekit/agents/ipc/supervised_proc.py tests/test_supervised_proc_memory.py
  • python -m py_compile livekit-agents/livekit/agents/ipc/supervised_proc.py tests/test_supervised_proc_memory.py
  • git diff --check

The focused test used the current source and test files against the released livekit-agents==1.7.1 dependency set because GitHub's filtered blob transport was intermittently resetting on this Windows host.

@Ricky-7-Yan
Ricky-7-Yan requested a review from a team as a code owner August 27, 2026 15:45
@CLAassistant

CLAassistant commented Aug 27, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

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.

Regression: mark_process_dead dropped in 1.3.0 — prometheus multiprocess files accumulate forever

2 participants