-
-
Notifications
You must be signed in to change notification settings - Fork 9k
Memory leaks after deleted worktree enters infinite cleanup loop #57313
Copy link
Copy link
Closed as not planned
Closed as not planned
Copy link
Labels
area:performance/memory leakFeedback for memory leaksFeedback for memory leaksfrequency:uncommonBugs that happen for a small subset of users, special configurations, rare circumstances, etcBugs that happen for a small subset of users, special configurations, rare circumstances, etcpriority:P1Security holes w/o exploit, crash, install/update, sign-in, badly broken common featuresSecurity holes w/o exploit, crash, install/update, sign-in, badly broken common features
Metadata
Metadata
Assignees
Labels
area:performance/memory leakFeedback for memory leaksFeedback for memory leaksfrequency:uncommonBugs that happen for a small subset of users, special configurations, rare circumstances, etcBugs that happen for a small subset of users, special configurations, rare circumstances, etcpriority:P1Security holes w/o exploit, crash, install/update, sign-in, badly broken common featuresSecurity holes w/o exploit, crash, install/update, sign-in, badly broken common features
Type
Fields
Give feedbackNo fields configured for Bug.
Projects
StatusShow more project fields
No status
Reproduction steps
.codex/worktrees/<id>/repo/docs/file.md.~/Library/Logs/Zed/Zed.logand Activity Monitor.Current vs. Expected behavior
Current behavior: Zed repeatedly logs that the deleted single-file worktree root cannot be canonicalized, marks it deleted, then tries to close it again. The main Zed process grows to multiple GB of memory. In my case it reached ~3.7 GB physical footprint, mostly
IOSurface,MALLOC_SMALL, andMALLOC_TINY, while language-server children were only ~170 MB total.Expected behavior: once Zed detects that a persisted file/worktree path no longer exists, it should remove or invalidate that stale workspace/editor entry once, stop retrying it, and not retain several GB of main-process heap/graphics memory.
Zed version and system specs
Zed: v1.2.3+stable.273.ede077939fbe732d38afe7cf2576d3a19ef3ca57 (Zed)
OS: macOS 15.5
Memory: 24 GiB
Architecture: aarch64
Attach Zed log file
Zed.log
Relevant Zed settings
settings.json
Relevant Keymap
keymap.json
(for AI issues) Model provider details
No response
If you are using WSL on Windows, what flavor of Linux are you using?
None