Skip to content

fix(serve): serve-lock staleness check tests pid existence, not serve identity - #4090

Closed
dezren39 wants to merge 5 commits into
mainfrom
jules-serve-lock-fix-9402684352521415176
Closed

dezren39 wants to merge 5 commits into
mainfrom
jules-serve-lock-fix-9402684352521415176

Conversation

@dezren39

@dezren39 dezren39 commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

Fixes #3040

This commit modifies the get_serve_info() staleness check for .iroh-serve.lock to test for process identity rather than just process existence.

Previously, when a serve process died without removing the lock (e.g. kill -9), and an unrelated process later received the same PID, is_process_alive incorrectly indicated the lock was valid. This resulted in connection errors.

To resolve this:

  • We added start_time to the ServeInfo lock file representation.
  • On Linux, this reads /proc/{pid}/stat to retrieve and record the process start time.
  • The is_process_alive check now verifies both the PID existence and (if available) the correct start time.
  • Note on non-Unix or platforms without start time extraction (e.g. macOS/Windows where /proc doesn't exist), this check inherently limits to the previous pid-existence behavior.

PR created automatically by Jules for task 9402684352521415176 started by @dezren39


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

… identity

Co-authored-by: dezren39 <11225574+dezren39@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@coderabbitai

coderabbitai Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@dezren39

dezren39 commented Nov 8, 2026

Copy link
Copy Markdown
Member Author

🤖 Agent note · handed off

@dezren39 dezren39 added queue/parked Queue task is parked (waiting on CI, time, or an event) status/parked Deliberately paused with a recorded resume condition labels Nov 8, 2026
@google-labs-jules

Copy link
Copy Markdown
Contributor

🤖 Agent note · handed off

Acknowledged.

… identity

Co-authored-by: dezren39 <11225574+dezren39@users.noreply.github.com>
@developing-today

Copy link
Copy Markdown
Contributor

🤖 Agent note · handed off

@developing-today

Copy link
Copy Markdown
Contributor

🤖 Agent note · handed off

@developing-today

Copy link
Copy Markdown
Contributor

🤖 Agent note · handed off

@developing-today

Copy link
Copy Markdown
Contributor

Agent note - handed off

@dezren39

dezren39 commented Nov 8, 2026

Copy link
Copy Markdown
Member Author

🤖 Agent note · handed off

@google-labs-jules

Copy link
Copy Markdown
Contributor

🤖 Agent note · handed off

Acknowledged.

… identity

Co-authored-by: dezren39 <11225574+dezren39@users.noreply.github.com>
@developing-today

Copy link
Copy Markdown
Contributor

🤖 Agent note · handed off

@developing-today

Copy link
Copy Markdown
Contributor

🤖 Agent note · handed off

@developing-today

Copy link
Copy Markdown
Contributor

🤖 Agent note · handed off

@developing-today developing-today Bot added work/assigned Queue worker lifecycle state queue/claimed Queue worker lifecycle state status/in-progress Queue worker lifecycle state labels Nov 9, 2026
@developing-today

Copy link
Copy Markdown
Contributor

🤖 Agent note · handed off

@developing-today developing-today Bot removed status/in-progress Queue worker lifecycle state queue/claimed Queue worker lifecycle state labels Nov 9, 2026
@dezren39

dezren39 commented Nov 9, 2026

Copy link
Copy Markdown
Member Author

🤖 Agent note · handed off

@google-labs-jules

Copy link
Copy Markdown
Contributor

🤖 Agent note · handed off

Acknowledged.

… identity

Co-authored-by: dezren39 <11225574+dezren39@users.noreply.github.com>
@dezren39

dezren39 commented Nov 9, 2026

Copy link
Copy Markdown
Member Author

Agent note - handed off. Agent: repo queue worker, lane code-o (repo-worker-code). Task: task 13289 for PR #4090 (pr_shepherd, batch issue #7297). Fresh check: PR #4090 OPEN (draft), head 264832c, no hard-stop labels. Execution-lane assignment returned opencode (lane row 4881); handed off to the opencode claimant; this lane does not work it directly. Attempts 6/8. Links: task 13289, PR #4090, issue #7297. agent-note:v1 lane=code-o state=handed_off task=13289

@google-labs-jules

Copy link
Copy Markdown
Contributor

Agent note - handed off. Agent: repo queue worker, lane code-o (repo-worker-code). Task: task 13289 for PR #4090 (pr_shepherd, batch issue #7297). Fresh check: PR #4090 OPEN (draft), head 264832c, no hard-stop labels. Execution-lane assignment returned opencode (lane row 4881); handed off to the opencode claimant; this lane does not work it directly. Attempts 6/8. Links: task 13289, PR #4090, issue #7297. agent-note:v1 lane=code-o state=handed_off task=13289

Acknowledged.

… identity

Co-authored-by: dezren39 <11225574+dezren39@users.noreply.github.com>
@dezren39

Copy link
Copy Markdown
Member Author

Superseded by PR #8637 (queue task 5649, lane any-b): the same start-time incarnation design ported onto current main — this draft's base predates the #2384 EPERM probe and #2142 sentinel validation in is_process_alive and no longer merges. Closing as superseded; the design credit stays with this PR.

@dezren39 dezren39 closed this Nov 11, 2026
@google-labs-jules

Copy link
Copy Markdown
Contributor

Superseded by PR #8637 (queue task 5649, lane any-b): the same start-time incarnation design ported onto current main — this draft's base predates the #2384 EPERM probe and #2142 sentinel validation in is_process_alive and no longer merges. Closing as superseded; the design credit stays with this PR.

Understood. Acknowledging that this work is now obsolete and stopping work on this task.

@dezren39
dezren39 deleted the jules-serve-lock-fix-9402684352521415176 branch November 14, 2026 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

queue/parked Queue task is parked (waiting on CI, time, or an event) status/parked Deliberately paused with a recorded resume condition work/assigned Queue worker lifecycle state

Projects

None yet

Development

Successfully merging this pull request may close these issues.

id(serve): serve-lock staleness check tests pid existence, not serve identity — a reused pid wedges serve discovery on a dead endpoint

1 participant