Since a few days htop's memory stats are broken. Total memory is correct but the used memory says it's 16 Zettabyte? Normal top is doing fine.
Affects me too (sometimes memory may have been displayed correctly) on FreeBSD 13.1-RELEASE-p5.
This has been an issue in FreeBSD since last year, and is being tracked upstream. It appears some fixes are in place if you want to build from git, but we will have to wait for maintainers to update ports from upstream otherwise.
(In reply to edenist-fbz from comment #2) sorry, forgot to add the link to the github issue... https://github.com/htop-dev/htop/issues/1039
https://github.com/htop-dev/htop/compare/3.2.2...main There's a 3.2.2 release including the fix of this issue. I'll update ports later.
Created attachment 240124 [details] htop 3.2.2
Should this be MFH'ed?
(In reply to Fernando Apesteguía from comment #6) Yes, I think so.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=270568a0481eb3d4e1f4b9aab86e54e341aad4a9 commit 270568a0481eb3d4e1f4b9aab86e54e341aad4a9 Author: Hung-Yi Chen <gaod@hychen.org> AuthorDate: 2023-02-13 14:52:15 +0000 Commit: Fernando Apesteguía <fernape@FreeBSD.org> CommitDate: 2023-02-14 12:25:53 +0000 sysutils/htop: update to 3.2.2 This fixes a problem with memory showing 16.0Z of memory PR: 269494 Reported by: mbeis@xs4all.nl MFH: 2023Q1 (bugfix release) sysutils/htop/Makefile | 2 +- sysutils/htop/distinfo | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-)
Committed, Thanks!
A commit in branch 2023Q1 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=b54763d2a73da3a5f4147eaae79a38d11770cfc9 commit b54763d2a73da3a5f4147eaae79a38d11770cfc9 Author: Hung-Yi Chen <gaod@hychen.org> AuthorDate: 2023-02-13 14:52:15 +0000 Commit: Fernando Apesteguía <fernape@FreeBSD.org> CommitDate: 2023-02-14 12:27:30 +0000 sysutils/htop: update to 3.2.2 This fixes a problem with memory showing 16.0Z of memory PR: 269494 Reported by: mbeis@xs4all.nl MFH: 2023Q1 (bugfix release) (cherry picked from commit 270568a0481eb3d4e1f4b9aab86e54e341aad4a9) sysutils/htop/Makefile | 2 +- sysutils/htop/distinfo | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-)
The issue persists - it seems. OS: FreeBSD X 13.1-RELEASE-p6 FreeBSD 13.1-RELEASE-p6 GENERIC amd64 htop ver: 3.2.2 (installed through pkg)
(In reply to Ozgur Konstantin Kazancci from comment #11) Yeah here too. After a reboot it looks fine, but after a while it flips to "16.0Z". Maybe when some part of memory is used?
that's because the fix isn't in 3.2.2: https://github.com/htop-dev/htop/compare/3.2.2...main we could pull the patch into our port, or we ask upstream for another release
(In reply to Mina Galić from comment #13) > the fix isn't in 3.2.2 True. <https://github.com/htop-dev/htop/compare/3.2.1...3.2.2>
Created attachment 240242 [details] Patch with cherry picked patch Would you mind testing this new version of the port to apply the patch that seems to fix the issue?
(In reply to Fernando Apesteguía from comment #15) Thanks! (I'll leave it for someone else to test; I'm accustomed to 3.3.0 from source.)
Please, can anyone of the reporters that were able to see the wrong behavior check if it still happens with the new patch? Thanks.
Seems ok now. Thanks!
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=daf1fd1e557dfb3d1ca4f1a18494cda77d966644 commit daf1fd1e557dfb3d1ca4f1a18494cda77d966644 Author: Fernando Apesteguía <fernape@FreeBSD.org> AuthorDate: 2023-02-24 16:30:19 +0000 Commit: Fernando Apesteguía <fernape@FreeBSD.org> CommitDate: 2023-02-24 16:30:19 +0000 sysutils/htop: memory shows 16.0Z of memory Cherry pick patch that fixes the issue since it wasn't included in the 3.2.2 release by upstream. PR: 269494 Reviewed by: mbeis@xs4all.nl sysutils/htop/Makefile | 4 ++++ sysutils/htop/distinfo | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-)
Committed, Thanks for testing it!