Daemon resilience: over-cap connection evicts a healthy daemon (SIGKILL); corrupt index dead-ends; rm -rf of a large dir stalls indexing for minutes; rollback exits 0 while deferred #382
Labels
No labels
code-review
correctness
dos
performance
security
severity/high
severity/low
severity/medium
tech-debt
Kind/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
h-dv/code-index#382
Loading…
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?
Found by the 2026-10-15 review on 0.39.0. All of these are pre-existing. Related: #358, whose
idle_timeout_minkey is written byinitand never read.daemon/src/server.rs~212), andtakeover_decisionreturnsEvictThenAcquireafter a 2 s probe, so the healthy daemon is SIGKILLed. Executed in the review. Fix: answer over-cap connections with abusyframe, and never evict when a probe saw a full cap.index.dbis a dead end.warming_up … succeed automaticallyfor 60 s while the daemon dies about 0.1 s after each spawn, because the spawn poll never checks whether the child exited.doctorreports FAIL but gives no remedy.rm -rfof a large directory stalls indexing. notify-debouncer-full keeps a file-id cache whose removal scan is quadratic: 10k files take about 410 s, and 60k take more than 12 min and then overflow the queue. Fix:NoCacheon Linux.plugin rollbacksucceeds without doing anything. While a daemon runs it is deferred and does nothing, but exits 0. Fix: a non-zero exit, or a request the daemon acts on.daemon.lockis unlinked before the kernel lock is released, so two daemons can each own the root for a moment.Released in v0.40.0 (https://git.h-dv.de/h-dv/code-index/releases/tag/v0.40.0, PR #388, merge
a48fb945): a daemon at its connection cap answers "busy" and is never evicted by a takeover; a client waiting on a daemon it spawned stops when that daemon exits and reports why;daemon.locksurvives shutdown so a released project has one next owner; a damaged index in its own state directory is reset and rebuilt; mass deletes no longer stall the debouncer.