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
CPU usage leak #379
Comments
I think this should be fixed in the latest development branch. Can you try
|
Sorry, meant to say in the beginning that I was running on develop branch. :-) |
Ok, what widgets are you using?
|
##-> Screens
screens = [
Screen(
top=bar.Bar(widgets=[
widget.GroupBox(**Theme.groupbox),
widget.Prompt(),
widget.WindowName(**Theme.widget),
widget.CPUGraph(graph_color='18BAEB', fill_color='1667EB.3', **Theme.graph),
widget.MemoryGraph(graph_color='00FE81', fill_color='00B25B.3', **Theme.graph),
#widget.CurrentLayout(**Theme.widget),
widget.Systray(**Theme.systray),
#widget.Sep(**Theme.sep),
widget.BatteryIcon(**Theme.battery),
widget.Battery(**Theme.battery_text),
#widget.Sep(**Theme.sep),
widget.Volume(theme_path='/usr/share/icons/Humanity-Dark/status/24/', **Theme.widget),
widget.Clock(fmt='%a %d %b %I:%M %p', **Theme.widget),
], **Theme.bar),
),
Screen(
top=bar.Bar(widgets=[
widget.GroupBox(**Theme.groupbox),
widget.WindowName(**Theme.widget),
#widget.CurrentLayout(**Theme.widget),
], **Theme.bar),
)
] |
@tych0 Any thoughts on which widget might be causing the leak? I can just start removing them in a binary-search pattern to narrow it down, but since it takes several hours for the leak to be noticeable, that could take a while without a hint. |
I've disabled the graph and battery indicator widgets, and the leak seems to be gone. I'll try re-enabling the battery indicator and seeing what happens. |
@tych0 Still leaks with only the battery indicator (i.e. not the graph) enabled. I'll leave them both off again and see if that confirms the problem. |
Hi David, Which Battery indicator are you using, text, icon or both? I use Text and have not noticed any memory issues with it. On 18 March 2014 12:18, David Simon notifications@github.com wrote:
Craig |
I was using both. I've verified that there is no leak when they're both disabled. I'll try just enabling the icon one. |
Hi David, On Wed, Mar 19, 2014 at 06:26:32AM -0700, David Simon wrote:
Thanks, that would be great. Both icons are using code that is fairly \t |
@tych0 I have verified that the leak occurs even if only the icon indicator is enabled, though it is a significantly slower leak. There's got to be a better way to instrument this. :-| What profiler tool for Python is useful for this sort of thing? |
I'm running on the v0.7.0 tag and both @DavidMikeSimon you can run qtile with
And after you stop qtile, you can inspect /some/file.profile with RunSnakeRun (or KCachegrind, but I have a KDE aversion). |
I also had this problem with the text Battery widget. Qtile was trying to open a non-existent file to get the battery status (only a snippet of strace output, it will try to open each file more than 80 times):
Setting battery_name to BAT1 at the widget creation fixed it for me. |
Fix! #472 |
Failing to find a valid file for the battery widget files means it will retry later for no good reason - and each of those attempts will modify the global BATTERY_INFO_FILES list, adding one filename at the beginning The fix is simple, just make a copy of that list before modifying, and additionally set a "negative cache" of filenames to avoid repeating Thanks DavidMikeSimon for reducing this bug to this widget, and blotus for pointing at the file open errors.
Running qtile master. Over a timespan of about 24 hours, qtile's CPU usage rises from trivially low to nearly 100%. In the worst stages, qtile is non-responsive to keyboard shortcuts, forcing me to kill it externally.
The text was updated successfully, but these errors were encountered: