question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Long pauses / freezing on Linux

See original GitHub issue

There are no errors in the error log for this condition, so I’m not sure how to begin troubleshooting it.

On a newly installed Linux Mint 20 (XFCE) system, MacBook3,1 from 2007 with 6GBs of RAM.

Symptoms:

Entire UI just stops updating and is unresponsive. If I press any keys those actions will all be performed after the freeze is over.

I’ve counted freeze durations of up to 20 seconds. Many of around 5-10 seconds.

This is with the refresh rate generally set to 2000ms (2 seconds).

I manually updated psutil using the instructions you provided, so the versions are:

bpytop version: 1.0.20
psutil version: 5.7.2

When this happens there is no sign of the CPU being overwhelmed with activity, nor any sign of unusual disk activity.

I can only surmise the bpytop (or some subcomponent like psutil) is encountering some sort of race condition in the background. Besides implementing time-based logic in the code that counts how long each function takes to respond and throws errors when it is longer than expected, I’m not sure how to even begin figuring out what is happening.

I haven’t noticed any similar symptoms in any other GUI or terminal application. Only bpytop seems to be behaving this way. And I haven’t seen this as far as I know on other systems I have available.

Starting with an empty error log, I ran bpytop --debug just long enough to experience an obvious long freeze, then exited. It didn’t take long. This is the resulting log:

23/08/20 (22:40:20) | INFO: New instance of bpytop version 1.0.20 started with pid 33142
23/08/20 (22:40:20) | INFO: Loglevel set to DEBUG
23/08/20 (22:40:20) | DEBUG: Using psutil version 5.7.2
23/08/20 (22:40:20) | DEBUG: CMD: /usr/local/bin/bpytop --debug
23/08/20 (22:40:22) | DEBUG: Collect and draw completed in 0.397569 seconds
23/08/20 (22:40:23) | DEBUG: Init completed in 2.752632 seconds
23/08/20 (22:41:05) | INFO: Exiting. Runtime 0:00:45 

Seems to have no information about what is happening.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:18 (17 by maintainers)

github_iconTop GitHub Comments

1reaction
aristocratoscommented, Sep 12, 2020

@RedBearAK We can leave this open for the time being since it isn’t solved, and if others experience the same problems they’ll hopefully report it here.

Hopefully then we can pinpoint exactly where the slowdown is happening. If it even is just one function, could be that most psutil functions are slowed down since most of them read from /proc. And since I can’t reproduce this myself, it’s pretty hard writing and testing fixes for it.

1reaction
aristocratoscommented, Aug 25, 2020

My OCD wants you to think about using the more “orderly” format, but I doubt it will ever be a big deal either way.

Changing it now would certainly be confusing with different versions having different formats, but hopefully people shouldn’t even need to reading the error.log if I keep my coding clean 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

X/Troubleshooting/Freeze - Ubuntu Wiki
Freezes that occur when the machine has been idle, that aren't due to OpenGL screensavers, may indicate bugs in how DPMS is working....
Read more >
Random freeze bug. Any idea how to fix it on Linux?
I have to use the reset button on my PC when this happens in EVERSPACE. (2) and (3) are happening for a long...
Read more >
What to do when a Linux desktop freezes?
You can try Ctrl + Alt + * to kill the front process (Screen locking programs on Xorg 1.11) or Ctrl + Alt...
Read more >
System freezes after more than 208 days uptime | Support
The freeze/crash can happen anytime after 208 days uptime. It cannot happen before the system reaches 208 days uptime.
Read more >
[Solved] System freeze randomly / Kernel & Hardware / Arch ...
It can happen after 3min of working, or after 10h or more. It is most often caused when I "really" want to work...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found