-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rg takes up all memory (>10GB) #11173
Comments
@albertz This looks like it should be filed on https://github.com/microsoft/vscode-ripgrep . This has nothing to do with the Python Extension. If you disagree please let us know. |
@karthiknadig Ok, I will do. However, one thing: The workaround I tried with |
/cc @rchiodo Since the question is about |
Not sure why |
@rchiodo Yes exactly. The linked code line exactly causes the memory issue. Also, |
We're calling a VS code API there. This one:
So it looks like it should be using the default excludes. Looking at the code in VS code, it looks like it might be a bug in how they handle it. |
What are the default excludes? |
I don't think there are any. That's the bug. You'd have to ask VS code to know for sure. |
As a follow-up for the |
Environment data
Version: 1.44.0
Commit: 2aae1f26c72891c399f860409176fe435a154b13
Date: 2020-04-08T08:23:56.137Z
Electron: 7.1.11
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Darwin x64 17.7.0
ms-python.python
"python.jediEnabled"
set to; more info How to update the language server to the latest stable version #3977): Jedi is enabled.python.languageServer
setting: MicrosoftVia.
Expected behaviour
It should run without crashing the system due to running out-of-memory (OOM).
Actual behaviour
The
rg
process takes a lot of memory (>10GB). In the extreme case, it crashes the whole system.Steps to reproduce:
(Start VSCode with SSH extension. This is probably not relevant. This is just needed in my case because the project directory is on the Linux server.)
Open a very big project directory (containing several 100GB, many thousand files, slow to access via NFS).
See
ps axu
on the Linux SSH server, and search for therg
process by VSCode:The
cwd
of that process is a VSCode setup, which is the very big project directory. Many of the files are behind some symlinks, but I partly want to follow symlinks. (I'm not sure how to selectively disable to not follow some of the symlinks.)I think the issue is that the directory is just very big.
I happened already multiple times that the Linux server became unresponsive because all memory was occupied, and luckily the Linux OOM killer killed
rg
and the system recovered a while later. This is what I see indmesg -T
:In any case, this should never happen (crashing my whole system because OOM), even if the user opens a immensely huge directory (or let's say an infinite big virtual FUSE directory).
I tried to have this in the
.vscode/settings.json
but this does not seem to have an effect:Logs
Nothing relevant.
The text was updated successfully, but these errors were encountered: