Nimblesite / Nimblesite/SharpLsp
Sidecar process-tree cleanup on Windows: no Job Object / tree kill, no parent-death watchdog
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 132
- Forks
- 5
- Avg merge
- 6h 24m
- Merged PRs (30d)
- 27
Description
From the multi-agent Windows-robustness audit (adversarially verified findings).
Host side (src/sidecar/manager.rs ~216, ~300): killing a sidecar kills only the direct child. When the spawn fallback is dotnet run, the real sidecar is a grandchild and survives — still owning the named pipe, so the respawn collides with it. Roslyn BuildHost / MSBuild worker children are orphaned the same way. Windows needs a Job Object (or equivalent tree kill) so the whole tree dies with the child.
Sidecar side (sidecars/SharpLsp.Sidecar.Common/SidecarHost.cs ~124): if the host dies hard before the IPC connect, the sidecar waits on AcceptStreamAsync forever — no parent-process watchdog. Every hard host crash leaks a .NET process holding the pipe name.
Fix directions: assign the child to a Job Object with JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE on Windows; pass the host PID to the sidecar and have it exit when the parent exits (Process.GetProcessById + Exited, or WaitForSingleObject on the parent handle).
Related: #150–#155 (sidecar lifecycle hardening). Found while fixing #110 follow-ups.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read src/sidecar/manager.rs around lines 216 and 300, then inspect sidecars/SharpLsp.Sidecar.Common/SidecarHost.cs around line 124. Trace the Windows spawn and cleanup paths first; done means the host cleanup terminates the complete sidecar tree and the sidecar exits when its parent dies, including before IPC connection.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, rust
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100