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

power widget consumes all RAM #134

Closed
victorz opened this issue Jun 9, 2020 · 5 comments
Closed

power widget consumes all RAM #134

victorz opened this issue Jun 9, 2020 · 5 comments
Assignees
Labels
area:devices Related to sources of data area:widget About a specific widget bug Something isn't working dep:battery os:linux state:confirmed Reproduced
Milestone

Comments

@victorz
Copy link

victorz commented Jun 9, 2020

I first tried running gotop --layout kitchensink but nothing is displayed in the terminal, and my RAM usage shoots to maximum usage (have to stop the process at about 28/32 GB usage due to fear of system locking...). I then tried echo '3:power' | gotop -l - and the same thing happens.

Apologies if this is already resolved. I tried searching the commit history for "power", "RAM", and "memory"-related commit messages, but couldn't find anything relevant.

gotop version: v4.0.0 (20200607T220622)
OS/Arch: GNU/Linux 5.6.15-arch1-1
Terminal emulator: gnome-terminal
Any relevant hardware info: 32 GB 3200 MHz RAM, AMD Ryzen 9 3900X 12-core
tmux version: 3.1b
~/.local/state/gotop/errors.log: N/A -- it doesn't exist.

Please let me know if you need any more information from me and I shall try to provide it for you.

@xxxserxxx
Copy link
Owner

@victorz My environment is almost identical to yours, and I can't replicate this, so we'll have to dig deeper.

  • Which package did you install?
    • From AUR? gotop, gotop-bin, or gotop-git?
    • Did you download one of the prebuilt binaries?
    • Did you compile it yourself?
  • We have identical kernels & OSes; you have more memory (I have 8 on my laptop)
  • Our CPUs differ; my laptop has an Intel CPU & 8 cores -- you have 12
  • I tried in gnome-terminal 3.36.2-1, with (and without) tmux 3.1b
  • Does gotop work without the kitchensink layout?
  • It should start immediately, so if it doesn't you can ^c it -- would you mind running it with:
    echo power | gotop -l -
    
    and see if that works?
  • Did you get the error log message from gotop --list paths?

The difference could be in the CPU, but that would be strange. I may provide a small program to see what the power subsystem is reporting to see if there's any leads there.

Thanks for the report.

@xxxserxxx xxxserxxx self-assigned this Jun 9, 2020
@xxxserxxx xxxserxxx added area:devices Related to sources of data area:widget About a specific widget bug Something isn't working dep:battery needs:question Further information is requested os:linux labels Jun 9, 2020
@victorz
Copy link
Author

victorz commented Jun 9, 2020

@xxxserxxx Fellow Archer! I'll try my best to answer your questions below:

  • Installed from AUR, the gotop-bin package.
  • I also tried inside and outside of tmux
  • gotop does work without the kitchensink layout; the default, minimal, and battery layouts work fine (even if I don't have a battery on this desktop PC)
  • I tried echo power | gotop -l - and it does the same thing. Just a blank terminal and the memory starts to get eaten, fast. I am unable to ^C out of the process, so I have to e.g. pkill gotop from somewhere else.
  • Not sure I fully understand the question regarding gotop --list paths, but there are no error messages in ~/.cache/gotop/errors.log, nor in ~/.local/state/gotop/errors.log. Both files exist now though, but are empty. There are also some *.0, *.1, and *.2 files in those same directories, but they are either empty or one actually had a message regarding negative amount of sent network data. 🤷‍♂️ Don't think it's relevant.

I hope this helps!

@xxxserxxx
Copy link
Owner

Hmm. I re-installed, this time from gotop-bin and -- as expected -- got the same version:

gotop v4.0.0 (20200607T220622)

I'm still not having trouble running it in gnome-terminal, so we're going to have to try a program. Can you compile Go code?

gotop --list paths tells you the path to the error log that it's writing to. That's the path you want to use; it should be in .cache, but since not everybody uses XDG, it can vary; XDG can even be replaced in Arch.

Did you ever create a gotop.conf file? It would be in ~/.config/gotop/gotop.conf if it exists. Are you running gotop with any command line parameters?

This tarball has a very small program to dump out the information from the battery library. Can you run it?

tar xzf gotop-battery.tar.gz
cd gotop-battery
cat main.go    # 22 LOC
go run .

and paste the results? Or let me know if it hangs?

gotop-battery.tar.gz

@xxxserxxx xxxserxxx added this to the v4.0.2 milestone Jun 12, 2020
@victorz
Copy link
Author

victorz commented Jun 18, 2020

Thanks for getting back to this! Sorry I didn't reply sooner!

Did you ever create a gotop.conf file? It would be in ~/.config/gotop/gotop.conf if it exists. Are you running gotop with any command line parameters?

No to both -- I have no config file and I'm not running it using any command line options apart from those I listed in the issue description, so it's completely vanilla.

This tarball has a very small program to dump out the information from the battery library. Can you run it?

tar xzf gotop-battery.tar.gz
cd gotop-battery
cat main.go    # 22 LOC
go run .

and paste the results? Or let me know if it hangs?

gotop-battery.tar.gz

That program does not hang, and runs with the following output:

% go run .
entering test
got 0 battsexiting successfully

0 batteries seems reasonable as I have a desktop computer. (Probably not the main take-away from this output though lol) 👍

@xxxserxxx
Copy link
Owner

Hm. I don't know that I've ever run the power widget on a machine without a battery, so that's a good lead, thanks. Not sure why it would act that way, but it helps if I can reproduce it, and this may help me do that.

Since you don't have a battery, the power widget does nothing for you. May I recommend creating your own layout that doesn't have that widget, which would eliminate dead space?

Detailed instructions are here, but in short:

  1. Download the kitchensink layout; name it whatever
  2. Delete the line containing power
  3. Run gotop -l <whatever>, where <whatever> is in either the current directory, or $XDG_CONFIG_DIR/gotop.

@xxxserxxx xxxserxxx added state:confirmed Reproduced and removed needs:question Further information is requested labels Jun 22, 2020
@xxxserxxx xxxserxxx modified the milestones: v4.0.2, v4.1.0 Aug 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:devices Related to sources of data area:widget About a specific widget bug Something isn't working dep:battery os:linux state:confirmed Reproduced
Projects
None yet
Development

No branches or pull requests

2 participants