Skip to content

fix: watchdog restart gap, SHM cleanup, inter_process logger#45

Merged
manupawickramasinghe merged 1 commit into
devfrom
fix/watchdog-shm-cleanup
Jun 10, 2026
Merged

fix: watchdog restart gap, SHM cleanup, inter_process logger#45
manupawickramasinghe merged 1 commit into
devfrom
fix/watchdog-shm-cleanup

Conversation

@manupawickramasinghe

Copy link
Copy Markdown
Member

Fix 1 (watchdog.py): Add _restart_times dict to track detector restart times. Skip the stuck-detection check for 35 seconds after a restart is initiated, preventing the watchdog from missing a dead detection gap while start_or_restart() kills the old process (up to 30s).

Fix 2 (app.py): Wrap shm.unlink() in try/except OSError so one failed unlink does not block cleanup of remaining shared memory segments.

Fix 3 (inter_process.py): Use module-level logger.warning() instead of logging.warning() for consistent log routing.

Please read the contributing guidelines before submitting a PR.

Proposed change

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code
  • Documentation Update

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to discussion with maintainers (required for any large or "planned" features):

For new features

  • There is an existing feature request or discussion with community interest for this change.
    • Link:

AI disclosure

  • No AI tools were used in this PR.
  • AI tools were used in this PR. Details below:

AI tool(s) used (e.g., Claude, Copilot, ChatGPT, Cursor):

How AI was used (e.g., code generation, code review, debugging, documentation):

Extent of AI involvement (e.g., generated entire implementation, assisted with specific functions, suggested fixes):

Human oversight: Describe what manual review, testing, and validation you performed on the AI-generated portions.

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I can explain every line of code in this PR if asked.
  • UI changes including text have used i18n keys and have been added to the en locale.
  • The code has been formatted using Ruff (ruff format frigate)

Fix 1 (watchdog.py): Add _restart_times dict to track detector restart
times. Skip the stuck-detection check for 35 seconds after a restart is
initiated, preventing the watchdog from missing a dead detection gap
while start_or_restart() kills the old process (up to 30s).

Fix 2 (app.py): Wrap shm.unlink() in try/except OSError so one failed
unlink does not block cleanup of remaining shared memory segments.

Fix 3 (inter_process.py): Use module-level logger.warning() instead of
logging.warning() for consistent log routing.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 10, 2026 19:26

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@manupawickramasinghe manupawickramasinghe merged commit cf6609c into dev Jun 10, 2026
@github-actions

Copy link
Copy Markdown

PR template validation failed

This PR was automatically closed because the description does not follow the pull request template.

Issues found:

  • No Type of change selected. Please check at least one option.
  • No AI disclosure option selected. Please indicate whether AI tools were used.
  • No Checklist items checked. Please review and check the items that apply.

Please update your PR description to include all required sections from the template, then reopen this PR.

If you used an AI tool to generate this PR, please see our contributing guidelines for details.

@manupawickramasinghe manupawickramasinghe deleted the fix/watchdog-shm-cleanup branch June 10, 2026 19:27
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.

2 participants