VScode rg process taking all the CPU - visual-studio-code

My VScode is behaving strangely. When I checkout or pull with many changes in files, it creates many processes called rg that drain the CPU to 100% usage. This problem persists even if I kill the VScode, I have to manually kill the processes.
I found some old threads about disabling symlinks with "search.followSymlinks": false but it didn't help. Might it be some indexing problem?
I have noticed that initializing js/ts language features is spinning but never completes and the whole UI lags. Happy to provide more details like extensions, etc.
I couldn't find a thread with the same problem around 2021/22 so sorry if duplicated.

Related

How to make Libfuzzer run without stopping similar to AFL?

I have been trying to fuzz using both AFL and Libfuzzer. One of the distinct differences that I have come across is that when the AFL is executed, it runs continuously unless it is manually stopped by the developer.
On the other hand, Libfuzzer stops the fuzzing process when a bug is identified.I know that it allow the addition of parallel fuzzing through the jobs=N command, however those processes still stop when a bug is identified.
Is there any reason behind this behavior?
Also, is there any command that allows the Libfuzzer to run continuously unless the developer stops the fuzzing process?
This question is old but I also was in need to run libFuzzer without stopping.
It can be accomplished with the flags -fork=<N of jobs> combined with -ignore_crashes=1.
Be aware that now Ctrl+C doesn't work anymore. It is considered as a crash and just spawns a new job. But I think this is a bug, see here.

vs-code taking exorbitant amount of CPU

I'm consistently having problems with VS-Code taking up tons of CPU:
Now maybe this is just what VS-Code needs but what is processing? Is there a way to break this down by extensions? Is there any other thing I should be checking?
Note: i have already set "terminal.integrated.cursorBlinking": false which at least used to cause perf problems in vs-code [issue]
The macOS process explorer shows these VS Code processes:
this is after I restarted and reduced down to a single session so CPU isn't at the moment a problem ... I'm just showing this as I'd really like to map these "helper" processes to the various extensions but can't find any way to do it.
on closer examination, it's apparent that the extensions are not 1:1 with helper processes so this mapping is not proving to be super useful yet

Unusual spikes in CPU utilization in CentOS 6.6 while starting pycharm

my system since last couple of days is behaving strangely. I am a regular user of pycharm software, and it used to work on my system very smoothly with no hiccups at all. But since last couple of days, whenever I start pycharm, my CPU utilization behaves strangly, like in the image: Unusual CPU util
I am confused as when I go to processes or try ps/top in terminal, there are no process which is utilizing cpu more then 1 or 2%. So I am not sure where these resources are getting consumed.
By unusual CPU util I mean, That first CPU1 is getting used 100% for couple or so minutes, then CPU2. Which is, only one cpu's utilization goes to 100% for sometime followed by other's. This goes on for 10 to 20 minutes. then system comes back to normal.
P.S.: I don't think this problem is related to pycharm, as I face similar issues while doing other work also, just that I always face this with pycharm for sure.
POSSIBLE CAUSE: I suspect you have a thrashing problem. The CPU usage of your applications are low because none of them are actually getting much useful work done. All the processing is being taken up by moving memory pages to and from the disk. Your CPU usage probably settles down after a time because your application has entered a state where its memory working set has shrunk to a point where it all can be held in memory at one time.
This has probably happened because one of the apps on your machine is handling a larger data set than before, and so requires more addressable memory. Another possibility is that, for some reason, a lot more apps are running on your machine.
POTENTIAL SOLUTION: There are several ways you can address this. The simplest is to put more RAM on your machine. If this doesn't work or isn't possible, you'll have to figure out which app is the memory hog. You may simply have to work with smaller problems/data-sets or offload some of the apps onto a different box.
MIGRATING CPU LOAD: Operating systems will move tasks (user apps, kernel) around for many different reasons. The reasons can range anywhere from it being just plain random to certain apps having more of their addressable memory in one bank vs another. Given that you are probably doing a lot of thrashing, I'm not surprised that the processor your app is running is randomized over time.

After supervisord crash, how to restart without killing all process?

I have an issue where supervisord is crashing due to out of memory conditions. I know what is causing this (other processes consuming too much memory), but it's going to take a little time to fix. In the meantime, I would like to bring supervisor back up if it crashes. The problem here seems to be that it will not pick up where it left off and forgets about all the existing processes. It seems to just attempt to restart all processes instead of recognizing that they were already running.
Is this a problem in my config (pid files not in the right place or something, it seems correct though) or is this just how supervisord works? Are there any workarounds to get the manager process to continue where it left off before it crashed?

Is there a way to interrupt Eclipse when it is hanging (eg, on content assist)

I'm using the Scala plugin, and it sometimes likes to hang and spin a rainbow wheel (Mac wait icon) for a long time. It's very annoying. Is there something like a "Control C" for the current thread? I'd like a way to tell Eclipse to kill the current UI command. This would help when use plugins that are not as polished as the one for Java.
There is no such feature and I would not hold your breath waiting for one. Unlike system processes that exist independent of each other, threads are entangled. Force killing a thread is very likely to corrupt various data structures and leave Eclipse process in a bad state.
Various API techniques exist to allow for cancellation of an operation, but they all rely on the running operation to actively check for cancellation request and safely shutdown. Not much help for dealing with unpolished plugins, since graceful handling of cancellation in all cases tends to be implemented as part of polishing.