-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Description
Is there an existing issue for this?
- I have searched the existing issues
OS/Web Information
- Web Browser: Chrome
- Local OS: macOS
- Remote OS: Ubuntu
- Remote Architecture: x64
code-server --version
: 4.92.2
Steps to Reproduce
- Launch code-server and open a directory of a FUSE file system.
- Repeatedly modify and save a file within that FUSE file system.
Observed Behavior:
During the file modification process, I noticed that there was a period when files could not be saved properly. Additionally, the CPU usage for the processes located at /usr/lib/code-server/lib/node and /usr/lib/code-server/out/node/entry spiked to 100%.
The tab bar consistently indicates that the file is being written, but the server logs do not show any corresponding write file actions. Meanwhile, code-server is saving my edits to ~/.local/share/code-server/User/Backups.
Troubleshooting Attempts:
To further investigate the issue, I used the perf tool to analyze the call chain, but I was unable to pinpoint the exact cause. Below is the flame graph of the program's execution:
Suspected Causes:
I suspect that the program may be caught in an infinite loop, leading to high CPU usage and file-saving issues. Although I reviewed the Node.js source code, I could not identify any explicit causes for an infinite loop. It seems likely that this problem could be related to the 'fs' library utilized by code-server.
I would appreciate any insights or suggestions from the community regarding this issue, especially if anyone has faced a similar problem or has experience with FUSE file systems in conjunction with code-server. Thank you!
Expected
Files should be saved without issues, and the CPU usage by code-server should remain stable.
Actual
Saving fails, and the code-server process consumes excessive CPU resources.
Logs
No response
Screenshot/Video
No response
Does this bug reproduce in native VS Code?
I did not test native VS Code
Does this bug reproduce in GitHub Codespaces?
I did not test GitHub Codespaces
Are you accessing code-server over a secure context?
- I am using a secure context.
Notes
I will provide all the information I know. Thank you!