-
Notifications
You must be signed in to change notification settings - Fork 37.4k
Description
Summary
Cursor/VS Code UI freezes repeatedly (0.1-2 seconds) when a workspace contains a directory with permission-denied files, even when the user never interacts with those files. The file watcher crashes, and ripgrep errors propagate in a way that blocks the renderer.
Environment
- Cursor 2.3.30
- Arch Linux (kernel 6.17.5-arch1-1)
- Workspace contains a
mongodb/data directory with ~192 files, some owned by root
Symptoms
- Constant UI freezes during normal editing
- Freezes last 0.5-2 seconds and occur frequently
- No obvious trigger - happens during typing, scrolling, etc.
Troubleshooting Steps Attempted
- Developer: Toggle Developer Tools → Performance tab: "Trace recording not supported" error
cursor --inspect=9222+ Chrome DevTools: "Could not load any node target"cursor --remote-debugging-port=9222: Flag not recognized- Checking default logs (
~/.config/Cursor/logs/): No freeze/hang information logged by default
What Finally Worked
Enabling the experimental renderer profiling setting:
"application.experimental.rendererProfiling": "on"This caused Cursor to log long tasks.
From ~/.config/Cursor/logs/<session>/window15/renderer.log:
[perf] Renderer reported VERY LONG TASK (208ms), starting profiling session '6924b0f0-8c96-4ace-a964-81bc8bb19b7c'
Evidence
In the same log session, found these errors:
File watcher crash (from ~/.config/Cursor/logs/<session>/main.log):
[UtilityProcess id: 13, type: fileWatcher, pid: 906341]: crashed with code 15 and reason 'killed'
Ripgrep permission errors (from ~/.config/Cursor/logs/<session>/window15/renderer.log):
Error initializing ignore mapping for .cursorignore: Error: Ripgrep failed (exit 2) with no results:
rg: ./mongodb/journal: Permission denied (os error 13)
rg: ./mongodb/.mongodb: Permission denied (os error 13)
rg: ./mongodb/diagnostic.data: Permission denied (os error 13)
Root Cause
The workspace contained a mongodb/ directory with files owned by root (a local MongoDB data directory). The file watcher and ripgrep attempted to access these files, failed with permission errors, and this somehow blocked the renderer thread causing UI freezes.
Fix
Added workspace settings to exclude the directory:
{
"files.watcherExclude": {
"**/mongodb/**": true
},
"search.exclude": {
"**/mongodb/**": true
}
}Issue
Permission-denied errors from the file watcher and ripgrep should not freeze the UI. The file watcher runs in a utility process, but errors still propagate to block the renderer thread.
Expected Behavior
File watcher and ripgrep permission errors should be handled gracefully without blocking the UI. The workaround (excluding directories via settings) confirms this is the cause.