Skip to content
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

File Descriptor Leak during Rename Operations in Large Files #36

Open
ESSO0428 opened this issue Jan 26, 2024 · 0 comments
Open

File Descriptor Leak during Rename Operations in Large Files #36

ESSO0428 opened this issue Jan 26, 2024 · 0 comments

Comments

@ESSO0428
Copy link

Hello

I've encountered a potential resource management issue in lsp-lens.nvim that seems to occur during rename operations in large files.

Issue Description

In a Django project, specifically while working with a views.py file approximately 900 lines long, I used both lsp rename and %s to rename variables and strings (related to modifying column names in queries). Post these operations, including after undoing the changes, the file descriptor count (lsof -p nvim_pid | wc -l) drastically increased and did not decrease, reaching up to 1069. This led to the following error, rendering many plugins nearly dysfunctional:

Error detected while processing InsertLeave Autocommands for "*":
Error executing lua callback: Vim:E903: Process failed to start: too many open files: "/usr/bin/zsh"
stack traceback:

Steps to Reproduce

Open a large Python file (like view.py in a Django project) with lsp-lens.nvim enabled.

Perform rename operations using lsp.buf.rename() or %s/string_a/string_b/g.
Observe the file descriptor count increase, with subsequent errors.
Environment
Neovim version:
NVIM v0.9.4
Build type: Release
LuaJIT 2.1.1692716794

Operating System: Ubuntu 20.04.6 LTS on Windows 10 x86_64
This issue appears to be a file descriptor leak, particularly noticeable in large files during and after rename operations. It seems resources aren't being released properly after these operations.

I would appreciate any assistance or insights you can provide to help resolve this issue. Thank you for your contributions to this plugin.

Lastly, I want to express my appreciation for the creation of this interesting and useful plugin. It has been an invaluable tool in my development workflow. Thank you for your hard work and dedication to the Neovim community.

Best regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant