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

Extreme (over 1000%, literally) CPU Usage #1294

Closed
ethical-haquer opened this issue Aug 23, 2023 · 13 comments · Fixed by #1332
Closed

Extreme (over 1000%, literally) CPU Usage #1294

ethical-haquer opened this issue Aug 23, 2023 · 13 comments · Fixed by #1332
Assignees
Labels
bug TYPE: a report on something that isn't working

Comments

@ethical-haquer
Copy link

ethical-haquer commented Aug 23, 2023

What happened:
I was using my computer, in fact I was experiencing This VS Code bug, so I was following the steps to solve that issue. Then, my laptop's fans kicked on. I though it was VS Code again, but nope, htop said it was Portmaster. At the worst part, Portmaster had over a dozen processes running, with one using 1048% of the CPU. My laptop has 12 Intel® Core™ i7-10710U CPU @ 1.10GHz, and 30 Gbs of memory. All of the CPUs were in the red zone.

What did you expect to happen?:
Well, I guess I expected Portmaster to use less than 1000% of the CPU. :)

How did you reproduce it?:
By starting Portmaster again.

Debug Information:
Waiting for it to do it again so I can get the logs...

What I saw when I first opened htop:
Screenshot from 2023-08-22 20-00-21

What I saw 40 seconds later, after trying to restart Portmaster (from the GUI):
Screenshot from 2023-08-22 20-01-43

What I saw after quitting the top Portmaster process from htop:
Screenshot from 2023-08-22 20-02-30

@ethical-haquer ethical-haquer added the bug TYPE: a report on something that isn't working label Aug 23, 2023
@ethical-haquer
Copy link
Author

After looking at the screenshots more, it appears that the original Portmaster process didn't even make onto the first screenshot, but then jumped up to first place 40 seconds later (look at the TIME each process had been running). Also it was spawning more processes suddenly?

@ethical-haquer
Copy link
Author

Update:
I restarted Portmaster, and it did the same thing again. At least getting logs, etc. will be easy. :)

@Raphty
Copy link
Member

Raphty commented Aug 23, 2023

At least getting logs, etc. will be easy. :)

that would be a great start, can you pleas provide the debug info taken during such an incident.
https://wiki.safing.io/en/FAQ/DebugInfo

@ethical-haquer
Copy link
Author

At least getting logs, etc. will be easy. :)

that would be a great start, can you pleas provide the debug info taken during such an incident. https://wiki.safing.io/en/FAQ/DebugInfo

Thanks for the quick reply! I have restarted it again and am just waiting for it to do it again so I can get the logs. 😄

@ethical-haquer
Copy link
Author

Also, is there any way to get the previous logs from Portmaster? Like are they saved after Portmaster has been restarted, and the computer has been logged-out of? I know I really should have just got the logs when the issues were happening 😊 , but I wasn't able to load the Portmaster UI due to how sluggish my system was, or something.

@ethical-haquer
Copy link
Author

Alright, so after looking at this it appears that all of the Portmaster logs are located here:
/opt/safing/portmaster/logs/
Let me know if any of those could be helpful.

@Raphty
Copy link
Member

Raphty commented Aug 25, 2023

thanks, but the debug info during the event is what I am looking for :D thanks

@dhaavi
Copy link
Member

dhaavi commented Aug 25, 2023

If you experience this again, please get the debug info, but also collect a CPU profile.

Docs: Get CPU Profile
You might need to enable Developer Mode to access the API directly.

@ethical-haquer
Copy link
Author

Thanks! I'll be sure to do that if it ever happens again. 😄

@Daniil-Demyanenko
Copy link

Confirm. Loads ryzen 7 6800H at 100%. This doesn't happen very often, usually after updating several tabs in the browser. More often it takes about 18-20%.
RAM -- 16GB.
OS -- Manjaro KDE.
I attach a link to the archive with debug-info and log:

LOGS.zip

@ethical-haquer
Copy link
Author

Maybe I experienced this: #1312. I had just updated Portmaster that day. 🤷‍♂️

@Raphty
Copy link
Member

Raphty commented Sep 13, 2023

@ethical-haquer are you also on manjaro? and are you using the manjaro packaged version?

Manjaro is packaging PM themselves.

@ethical-haquer
Copy link
Author

@ethical-haquer are you also on manjaro? and are you using the manjaro packaged version?

Manjaro is packaging PM themselves.

Nope. I'm using Debian 11, PureOS to be exact. I believe I used the portmaster-installer.deb to install Portmaster, as I have that file.

dhaavi added a commit that referenced this issue Sep 28, 2023
@dhaavi dhaavi linked a pull request Sep 28, 2023 that will close this issue
@dhaavi dhaavi self-assigned this Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug TYPE: a report on something that isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants