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

VSCode Perl::LanguageServer causes a process that consumes CPU #642

Open
adefaria opened this issue Nov 22, 2023 · 2 comments
Open

VSCode Perl::LanguageServer causes a process that consumes CPU #642

adefaria opened this issue Nov 22, 2023 · 2 comments

Comments

@adefaria
Copy link

When running Perl::LanguageServer inside of VSCode there is a master perl that consumes about 100% of a CPU. Initially, this process fires off a number of pls processes, apparently parsing all of the Perl modules it can find and communicating that data to the master perl process bloating it up to 1.5G in my case. OK, I understand that. There's a lot of Perl code here. However, after it settles down and the pls processes go away the master perl process continues to chew on about 100% of one CPU, even if VSCode is essentially idle.

top - 10:47:37 up 14:32,  1 user,  load average: 0.09, 0.19, 0.22
Tasks: 204 total,   3 running, 201 sleeping,   0 stopped,   0 zombie
%Cpu(s): 22.5 us,  4.3 sy,  0.1 ni, 72.8 id,  0.0 wa,  0.2 hi,  0.1 si,  0.0 st
MiB Mem :   7685.1 total,    427.8 free,   3963.5 used,   3293.8 buff/cache
MiB Swap:   1024.0 total,    942.9 free,     81.1 used.   3405.2 avail Mem 

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND                                                                                                                                                                                  
   4635 root      20   0 2069884   1.5g   8496 R  99.7  20.6 863:12.92 perl                                                                                                                                                                                     
   4220 root      20   0 1070064 198816  47200 S   2.0   2.5   0:51.59 node                                                                                                                                                                                     
   2021 root      20   0  895920  97960  16820 S   1.3   1.2   2:44.30 python3                      

Closing VSCode causes the master perl process to go away.

An strace of the master perl reveals:

select(16, [3 5 8], [], NULL, {tv_sec=3600, tv_usec=0}) = 1 (in [5], left {tv_sec=3599, tv_usec=999999})
select(16, [3 5 8], [], NULL, {tv_sec=3600, tv_usec=0}) = 1 (in [5], left {tv_sec=3599, tv_usec=999999})
select(16, [3 5 8], [], NULL, {tv_sec=3600, tv_usec=0}) = 1 (in [5], left {tv_sec=3599, tv_usec=999999})
select(16, [3 5 8], [], NULL, {tv_sec=3600, tv_usec=0}) = 1 (in [5], left {tv_sec=3599, tv_usec=999999})
select(16, [3 5 8], [], NULL, {tv_sec=3600, tv_usec=0}) = 1 (in [5], left {tv_sec=3599, tv_usec=999999})

over and over again.

Perl version: 5.36.0
OS: CloudLinux: 8.8 (also experienced on AlmaLinux 8.8 and CentOS 7)

@adefaria adefaria changed the title VSCode Perl::LangaugeServer causes process that consumes cpu VSCode Perl::LanguageServer causes process that consumes cpu Nov 22, 2023
@adefaria adefaria changed the title VSCode Perl::LanguageServer causes process that consumes cpu VSCode Perl::LanguageServer causes process that consumes CPU Nov 22, 2023
@adefaria adefaria changed the title VSCode Perl::LanguageServer causes process that consumes CPU VSCode Perl::LanguageServer causes a process that consumes CPU Nov 22, 2023
@eitsupi
Copy link
Contributor

eitsupi commented Nov 22, 2023

I suppose you are on a wrong repo.
This repository is not for Perl.

@adefaria
Copy link
Author

Can it be moved? Where's the correct repo?

Ah, found it. Sorry. Didn't see this wasn't for Perl.

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