Harden the restart-test PID lookup: read hyperd's pid file instead of lsof, and name the expired readiness phase
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 35/100
Direção de pesquisa
Start by examining the restart-test helper on branch fix/uds-restart-linux-opus, especially the ConnectionEndpoint::DomainSocket PID lookup and wait_for_live_hyperd_after_kill. Compare head 1e5b78d with current main and rebase as needed. Done means the helper reads hyperd's PID file, confirms the process identity, reports which readiness phase expired, and the restart tests pass on Linux.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Context
The Linux restart-test failure on #304 was root-caused to lsof ORing its list-selection options: lsof -nP -t -c hyperd <socket path> returned every hyperd on the runner instead of the socket's owner, so the test SIGKILLed a different test's engine. Full analysis in #310.
#304 shipped the minimal fix (add -a so lsof ANDs its selectors), which is verified correct and green on all platforms. A second, independent investigation produced a more robust version that is worth folding in.
What to fold in
Branch fix/uds-restart-linux-opus, head 1e5b78d (based on e51fdefb, #304's pre-fix head — it will need rebasing onto current main, since #304's -a fix now occupies the same function).
1. Read hyperd's own PID lock file instead of shelling out to lsof.
Display for ConnectionEndpoint::DomainSocket renders "{directory}/{name}", and hyperd's PIDFile is directory + "/" + name + ".pid" — so <endpoint>.pid is exactly the authoritative file, under both the hyper and .s.PGSQL.<port> naming modes. Identity is then confirmed with ps -o comm= before the PID is returned (a stale file can name a recycled PID).
Why this is better than -a: it removes the OR/AND footgun entirely and drops the external-tool dependency for the socket path, reading the same source hyperd uses for its own cross-instance locking. -a is correct but leaves a sharp edge for the next person editing that helper.
2. Make the readiness helper name which phase expired.
wait_for_live_hyperd_after_kill currently fails with a bare "daemon should restart hyperd within 45s". That opacity is the reason this bug consumed two CI runs and two independent investigations — the message told us nothing about whether the old endpoint never died or the new one never came up. Returning an error that names the expired phase would have pointed straight at the mis-targeted kill.
This is the higher-value half of the change.
Verification already done
On 1e5b78d: three consecutive fully-green CI runs (34099539806, 34100732250, 34101708139), with the restart tests green in 6 of 6 ubuntu runs and completing in ~5-6s instead of burning the 45s budget.
Notes
- Test-only; no production code changes, so no changelog entry is required (AGENTS.md reminder 8).
- Optional and explicitly not recommended without new evidence: giving each spawned engine a fresh socket path per restart. After the fix, the SIGKILL→rebind-same-path route is genuinely exercised on Linux for the first time and passed 6/6, so that would be speculative complexity. Revisit only if a run ever shows a spawn failure with "domain socket is in use" — and the phase-naming errors above would say so explicitly rather than timing out silently.
- Linguagem predominante
- Rust
- Estrelas
- 3
- Forks
- 2
- Merge médio
- 1d 8h
- PRs com merge (30d)
- 13
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de tableau/hyper-api-rust
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
tableau/hyper-api-rust#294 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 45/100
tableau/hyper-api-rust#305 ·
Mantenedores costumam responder em até 1 dia
-
Windows Named Pipe: verify DACL denies other users, and measure read-path perf for MCP workloadsAberta
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 38/100
tableau/hyper-api-rust#302 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 72/100
tableau/hyper-api-rust#300 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 55/100
tableau/hyper-api-rust#299 ·
Mantenedores costumam responder em até 1 dia
Todas as issues de tableau/hyper-api-rust
Issues semelhantes
-
crate: spate-kafka documentation priority: medium
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 88/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 85/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
balovess/aria2_rust#88 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
Mantenedores costumam responder em até 1 dia
-
Shell `yoyo <verb> <sub>` missing its required argument prints usage and exits 0: `config get`Abertaagent-self
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 88/100
yologdev/yoyo-evolve#1154 ·