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

High CPU and memory usage on a specific condition on Linux #1267

Open
hikyae opened this issue Mar 31, 2025 · 1 comment
Open

High CPU and memory usage on a specific condition on Linux #1267

hikyae opened this issue Mar 31, 2025 · 1 comment

Comments

@hikyae
Copy link

hikyae commented Mar 31, 2025

Code editor

Vim 9.1

Platform

Arch Linux

Version

5.4.3

What steps will reproduce the bug?

  1. Create a directory
    mkdir a
  2. Move to the directory
    cd a
  3. Create a sub directory whose name begins with "."(dot)
    mkdir .a
  4. In the sub directory, create a symbolic link that refers to root directory
    ln -s / .a/a
  5. Create the minimum vimrc(here it's named reproduce.vim) as follows (I use vim-plug for plugin manager)
call plug#begin()
Plug 'prabirshrestha/vim-lsp'
call plug#end()
if executable('bash-language-server')
  autocmd User lsp_setup call lsp#register_server({
        \ 'name': 'bash-language-server',
        \ 'cmd': {server_info->[&shell, &shellcmdflag, 'bash-language-server start']},
        \ 'allowlist': ['sh', 'bash'],
        \ })
endif
  1. Create and open a simple shell script with vim -u reproduce.vim -N justecho.sh
#!/bin/sh

echo hi
 
  1. Just wait a few seconds and the CPU fan starts to spin up

How often does it reproduce? Is there a required condition?

Those steps above always reproduce the issue.

What is the expected behavior?

My CPU is still calm

What do you see instead?

Wasted high CPU and memory usage

Additional information

Renaming the hidden directory to non-hidden directory avoids the phenomenon.
mv .a a

I've found the bug while I was editing a shell script in my home directory which has .wine directory.

@PeterSaan
Copy link

I'm having the same issue with nvim. It appears that something with shellcheck is causing the problem.
I'll leave a link to what seems to be the same issue on shellcheck's repo here

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

2 participants