bash-lsp / bash-language-server

A language server for Bash

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

High CPU utilization on all CPU cores for process mads-hartmann.bash-ide-vscode

palansher opened this issue · comments

Code editor

vscode 1.82.3

Platform

Linux ubuntu

Version

5.0.0 or not installed. There is no difference.

What steps will reproduce the bug?

Just open VSCODE on SSH remote with this extension installed

After closing VSCODE the high CPU persists.
sudo reboot (rebooting server) does not help

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

No conditions. CPU load is presented every time.

What is the expected behavior?

low CPU utilization

What do you see instead?

image

All CPUs loaded from 35% to 85%

I can only stop it by disabling the extension and reloading VSCODE.

Additional information

Bash IDE v1.39.0

shellcheck --version
ShellCheck - shell script analysis tool
version: 0.8.0

No bash files opened
No activities in VSCode

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.3 LTS
Release: 22.04
Codename: jammy

In the project there are about 100 small bash files. I suppose problem persists even I remove these files, just keeping extension installed and enabled.

PS1: sometimes, closing VSCODE stops CPU utilizations by these processes, sometimes even not.

PS2: Just got in VSCODE output console:


<--- Last few GCs --->

[422844:0x706bff0]   598758 ms: Mark-sweep 3769.5 (4128.8) -> 3758.4 (4128.1) MB, 2345.0 / 0.0 ms  (average mu = 0.099, current mu = 0.046) task; scavenge might not succeed
[422844:0x706bff0]   598803 ms: Scavenge 3771.6 (4128.1) -> 3760.1 (4128.1) MB, 6.5 / 0.0 ms  (average mu = 0.099, current mu = 0.046) task; 
[422844:0x706bff0]   598852 ms: Scavenge 3772.1 (4128.1) -> 3761.3 (4129.1) MB, 8.0 / 0.0 ms  (average mu = 0.099, current mu = 0.046) task; 


<--- JS stacktrace --->

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
 1: 0xb7d990 node::Abort() [/home/vladp/.vscode-server/bin/fdb98833154679dbaa7af67a5a29fe19e55c2b73/node]
 2: 0xa88a17  [/home/vladp/.vscode-server/bin/fdb98833154679dbaa7af67a5a29fe19e55c2b73/node]
 3: 0xd76390 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/home/vladp/.vscode-server/bin/fdb98833154679dbaa7af67a5a29fe19e55c2b73/node]
 4: 0xd76737 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/home/vladp/.vscode-server/bin/fdb98833154679dbaa7af67a5a29fe19e55c2b73/node]
 5: 0xf540d5  [/home/vladp/.vscode-server/bin/fdb98833154679dbaa7af67a5a29fe19e55c2b73/node]
 6: 0xf54fd8 v8::internal::Heap::RecomputeLimits(v8::internal::GarbageCollector) [/home/vladp/.vscode-server/bin/fdb98833154679dbaa7af67a5a29fe19e55c2b73/node]
 7: 0xf65473  [/home/vladp/.vscode-server/bin/fdb98833154679dbaa7af67a5a29fe19e55c2b73/node]
 8: 0xf662e8 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/home/vladp/.vscode-server/bin/fdb98833154679dbaa7af67a5a29fe19e55c2b73/node]
 9: 0xfd55a4 v8::internal::ScavengeJob::Task::RunInternal() [/home/vladp/.vscode-server/bin/fdb98833154679dbaa7af67a5a29fe19e55c2b73/node]
10: 0xe45dbb non-virtual thunk to v8::internal::CancelableTask::Run() [/home/vladp/.vscode-server/bin/fdb98833154679dbaa7af67a5a29fe19e55c2b73/node]
11: 0xbe8954  [/home/vladp/.vscode-server/bin/fdb98833154679dbaa7af67a5a29fe19e55c2b73/node]
12: 0xbebdbe node::PerIsolatePlatformData::FlushForegroundTasksInternal() [/home/vladp/.vscode-server/bin/fdb98833154679dbaa7af67a5a29fe19e55c2b73/node]
13: 0x168a756  [/home/vladp/.vscode-server/bin/fdb98833154679dbaa7af67a5a29fe19e55c2b73/node]
14: 0x169cc74  [/home/vladp/.vscode-server/bin/fdb98833154679dbaa7af67a5a29fe19e55c2b73/node]
15: 0x168b0be uv_run [/home/vladp/.vscode-server/bin/fdb98833154679dbaa7af67a5a29fe19e55c2b73/node]
16: 0xab99bd node::SpinEventLoop(node::Environment*) [/home/vladp/.vscode-server/bin/fdb98833154679dbaa7af67a5a29fe19e55c2b73/node]
17: 0xbc38c4 node::NodeMainInstance::Run() [/home/vladp/.vscode-server/bin/fdb98833154679dbaa7af67a5a29fe19e55c2b73/node]
18: 0xb362d8 node::LoadSnapshotDataAndRun(node::SnapshotData const**, node::InitializationResult const*) [/home/vladp/.vscode-server/bin/fdb98833154679dbaa7af67a5a29fe19e55c2b73/node]
19: 0xb3a766 node::Start(int, char**) [/home/vladp/.vscode-server/bin/fdb98833154679dbaa7af67a5a29fe19e55c2b73/node]
20: 0x7f1ac1348d90  [/lib/x86_64-linux-gnu/libc.so.6]
21: 0x7f1ac1348e40 __libc_start_main [/lib/x86_64-linux-gnu/libc.so.6]
22: 0xab681c  [/home/vladp/.vscode-server/bin/fdb98833154679dbaa7af67a5a29fe19e55c2b73/node]
[Info  - 5:43:11 PM] Connection to server got closed. Server will restart.
true
[Info  - 5:43:11 PM] 14:43:11.566 INFO BackgroundAnalysis: resolving glob "**/*@(.sh|.inc|.bash|.command)" inside "file:///home/vladp/dev/learn/rebrain"...
[Warn  - 5:43:12 PM] 14:43:12.075 WARNING ⛔️ ShellCheck: disabling linting as no executable was found at path 'shellcheck'

Same here, I get high CPU utilization and bls refuses to exit and just times out. Completely unusable.

I also have this issue, but I'm using neovim nightly. It sent all my cpu cores, memory, and swap to 100% usage and I could only solve the issue by rebooting. I didn't have this problem until today (October 11th).

Only solution is to downgrade to before the 5.0.0 releases. I dont see any commits that are big, its mostly just bumping dependencies so some bug was probably introduced some where. But 4.10.2-1 does not have this issue as far as I can tell

Only solution is to downgrade to before the 5.0.0 releases.

Would you pls advise how to downgrade it? It seems vscode installs only last version.

a quick google brought me to vsixhub.com where you could manually download the extension or maybe from releases here? idk exactly, I use Helix/Neovim and I just used the downgrade command to roll back.

I downgraded to client 1.37 and bash-language-server@4.9.2
The same issue with CPU utilization.