mirror of
https://github.com/kvcache-ai/AgentENV.git
synced 2026-11-05 01:17:36 +00:00
[PR #266] [MERGED] fix: wait for daemon exit during server shutdown #302
Labels
No labels
bug
documentation
enhancement
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kvcache-ai/AgentENV#302
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/kvcache-ai/AgentENV/pull/266
Author: @zlzGithub-0801
Created: 9/9/2026
Status: ✅ Merged
Merged: 9/9/2026
Merged by: @yingdi-shan
Base:
main← Head:fix/wait-for-ublk-daemon-exit📝 Commits (1)
d3020dbfix: wait for daemon exit during server shutdown📊 Changes
1 file changed (+62 additions, -0 deletions)
View changed files
📝
storage/ublk-daemon/src/client.rs(+62 -0)📄 Description
What
Wait for the ublk daemon process to fully exit before completing server shutdown.
Why
The daemon may acknowledge shutdown before finishing cleanup. If the server restarts during this window, the old daemon can remove the new daemon's Unix socket, causing subsequent requests to fail.
Related issue
Closes #158
Scope and non-goals
This change only coordinates shutdown between the server and its managed ublk daemon. It does not add daemon auto-restart or change systemd configuration.
Design and behavior changes
The daemon watchdog publishes a retained exit notification after
child.wait()completes.shutdown()sends the shutdown request and then waits for that notification.Compatibility and operations
Validation
make fmtmake clippymake test-unitmake -C services test(required whenservices/changes)maketargetSkipped checks and reasons:
No generated code, services, documentation, or performance-sensitive behavior changed.
Risks and reviewer notes
The server shutdown now waits until the daemon process has actually exited.
Checklist
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.