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

Crash with Cpu Isolation #9

Closed
xxxserxxx opened this issue Feb 15, 2020 · 8 comments
Closed

Crash with Cpu Isolation #9

xxxserxxx opened this issue Feb 15, 2020 · 8 comments
Labels
bug Something isn't working dep:gopsutil needs:question Further information is requested
Milestone

Comments

@xxxserxxx
Copy link
Owner

- Arch Linux 4.17.14
- Fish & Bash
- Termite
- Gotop 1.4.1

Behavior:
Isolating CPU cores via Cpuset (cset) results in Gotop crashing on initializing.
This does not happen if Gotop is already running and isolation is achieved afterwards.
Only after isolating cores before running Gotop, does Gotop crash

It throws the following exception

~> Gotop
Error caught. Exiting program.

Issue with CPU percentages.

Diagnostics:
self.Count: 2
gopsutil.Counts(): 2
len(percents): 8
percents: [20.000000000004547 0 0 0 16.494845360824865 0 0 0]
self.interval: 1s

panic: 1

goroutine 6 [running]:
github.com/cjbassi/gotop/src/utils.Error(0x5845e0, 0xf, 0xc420202000, 0x83)
	/home/cjbassi/.local/src/github.com/cjbassi/gotop/src/utils/utils.go:49 +0x23f
github.com/cjbassi/gotop/src/widgets.(*CPU).update(0xc4201cada0)
	/home/cjbassi/.local/src/github.com/cjbassi/gotop/src/widgets/cpu.go:57 +0x646
created by github.com/cjbassi/gotop/src/widgets.NewCPU
	/home/cjbassi/.local/src/github.com/cjbassi/gotop/src/widgets/cpu.go:38 +0x2f4

To me, at least, this is very low priority, but I stumbled across it while messing around with Cset.
So I figured I'd report it anyways.
I have a feeling any CPU isolation would result in the same problem, since It doesn't like not being able to read/interact as nicely with the isolated cores.

Interestingly enough, Htop doesn't seem to have a problem with reporting the isolated cores.
Might be worth while checking out how they handle that.

@xxxserxxx
Copy link
Owner Author

Android 8.1 aarch64
Termux
apt-get install golang
gotop 1.5.0

Same error.

@xxxserxxx xxxserxxx added bug Something isn't working dep:gopsutil needs-info labels Feb 15, 2020
@xxxserxxx
Copy link
Owner Author

@joeky888 Could you clarify what environment you're running gotop with? And are you also using cpu isolation?

@xxxserxxx
Copy link
Owner Author

Could you clarify what environment you're running gotop with?

Android app Termux https://play.google.com/store/apps/details?id=com.termux
gotop 1.5
go 1.11.1
apt install golang clang
go get -u github.com/cjbassi/gotop

Crash on startup.

And are you also using cpu isolation?

Nope.

@xxxserxxx
Copy link
Owner Author

@joeky888 Thanks for the info. Even though you're getting the same error, I think these are separate issues and it would be best if you created a new issue for the error you're getting. And also include the details of your OS/platform etc and the exact error gotop is giving you. Thanks!

@xxxserxxx
Copy link
Owner Author

if you created a new issue for the error

Ok I'll do it.

Same error happens on arm64 Yocto Linux.

@xxxserxxx
Copy link
Owner Author

@VGrol So if I have this right, running gotop on isolated cores should cause it to only utilize those cores, but it should still display all of them in the graph? And you're saying htop displays all the cores?

@xxxserxxx xxxserxxx added this to the v4.2.0 milestone Jun 2, 2020
@xxxserxxx xxxserxxx added needs:question Further information is requested and removed needs:info labels Jun 11, 2020
@xxxserxxx
Copy link
Owner Author

@VGrol -- if you're still using gotop, can you check this again with a recent release (>3.5)? If you don't see it any more, please let me know. If you do, can you please post your cpu set configuration that reproduces the issue? I've been unable to reproduce this binding gotop to a single CPU:

sudo cset set --cpu 1 --mem 0 --set gotop 
sudo cset proc -s gotop -e ./gotop

It may have been OBE in the intervening years.

Original ticket.

@xxxserxxx xxxserxxx modified the milestones: v4.2.0, v4.0.2 Jul 25, 2020
@xxxserxxx xxxserxxx modified the milestones: v4.0.2, v4.1.1 Aug 25, 2020
@xxxserxxx
Copy link
Owner Author

No response for 6 months; closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dep:gopsutil needs:question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant