Check for a running process should be more fine-grained
Metadata
Current evaluation
Enhancement to verify PID is a Python process via /proc/<pid>/cmdline instead of just checking PID existence, avoiding 60s delay on PID reuse. Open 1010 days with no comments or implementation.
Suggested action: close stale
Reason: This enhancement has been open for 1010 days with zero comments and no implementation. The code still shows the original behavior (craft_providers/lxd/launcher.py:688 only checks Path(f'/proc/{pid}').exists() without verifying the process is Python). While the issue is technically still valid, the complete lack of maintainer engagement or discussion over nearly 3 years indicates it's no longer a priority.
Impact:
40
Quick Win:
28.0
Staleness:
85
Complexity:
30
Confidence:
75
Support Request:
10
Issue body
### What needs to get done
Improve the granularity of the check that checks if the process that launched an instance is still active.
Currently, craft-providers will only check that the PID that created an instance exists. This could be improved by checking that `/proc/<pid>/cmdline` is a python process.
Suggested by @syu-w in https://github.com/canonical/craft-providers/pull/464#discussion_r1408411018
### Why it needs to get done
If the PID that launched the instance is currently in-use by another process, it may add a 60 second delay before the instance is auto-cleaned.
Consider a scenario where craft-providers created a base instance with pid 100, but the instance was not fully setup and pid 100 is now assigned to another active process (due to a reboot or the pid counter being reset).
### Current behavior
1. Craft-providers sees the base instance is not ready and pid 100 is active
2. Craft-providers waits for the instance to be ready. If it is not ready and the instance's timer hasn't changed in 60 seconds, then it auto-cleans the instance.
### New behavior
1. Craft-providers sees the base instance is not ready and that pid 100 is active but not a python process.
2. Craft-providers immediately auto-cleans the instance.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen3.6-35b-a3b-mtp-q6 |
Impact:
40
Quick Win:
28.0
Staleness:
85
Complexity:
30
Confidence:
75
Support Request:
10
|
close stale | Enhancement to verify PID is a Python process via /proc/<pid>/cmdline instead of just checking PID existence, avoiding 60s delay on PID reuse. Open 1010 days with no comments or implementation. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
85
Complexity:
20
Confidence:
80
Support Request:
0
|
needs triage | Enhancement to improve PID reuse detection by checking process command line instead of just existence. Open for 2.5 years with no maintainer discussion, comments, or assignee. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
85
Complexity:
20
Confidence:
75
Support Request:
0
|
needs triage | Enhancement to refine process existence checks in craft-providers by verifying the PID runs a Python process, preventing unnecessary auto-cleanup delays when PIDs are reused. Currently unassessed with no maintainer comments. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
75
Complexity:
20
Confidence:
85
Support Request:
0
|
needs triage | Enhancement to improve process existence checks in craft-providers by verifying the PID runs a Python process, preventing unnecessary delays when PIDs are reused. Currently untriaged with no maintainer comments. |
Update history
No update history recorded yet.
Related issues
No related issues found above the similarity threshold.