Bug 269494 - sysutils/htop: memory shows 16.0Z of memory
Summary: sysutils/htop: memory shows 16.0Z of memory
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Fernando Apesteguía
URL: https://github.com/htop-dev/htop/pull...
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-11 14:47 UTC by Marco Beishuizen
Modified: 2023-02-24 16:36 UTC (History)
7 users (show)

See Also:
gaod: maintainer-feedback+
grahamperrin: maintainer-feedback? (gaod)
fernape: merge-quarterly+


Attachments
htop 3.2.2 (819 bytes, patch)
2023-02-13 07:01 UTC, Hung-Yi Chen
no flags Details | Diff
Patch with cherry picked patch (1.49 KB, patch)
2023-02-18 18:13 UTC, Fernando Apesteguía
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marco Beishuizen 2023-02-11 14:47:27 UTC
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.
Comment 1 Damien 2023-02-12 15:06:59 UTC
Affects me too (sometimes memory may have been displayed correctly) on FreeBSD 13.1-RELEASE-p5.
Comment 2 edenist-fbz 2023-02-12 23:52:41 UTC
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.
Comment 3 edenist-fbz 2023-02-12 23:53:28 UTC
(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
Comment 4 Hung-Yi Chen 2023-02-13 03:47:50 UTC
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.
Comment 5 Hung-Yi Chen 2023-02-13 07:01:45 UTC
Created attachment 240124 [details]
htop 3.2.2
Comment 6 Fernando Apesteguía freebsd_committer freebsd_triage 2023-02-13 14:57:17 UTC
Should this be MFH'ed?
Comment 7 Hung-Yi Chen 2023-02-13 17:10:26 UTC
(In reply to Fernando Apesteguía from comment #6)
Yes, I think so.
Comment 8 commit-hook freebsd_committer freebsd_triage 2023-02-14 12:30:48 UTC
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(-)
Comment 9 Fernando Apesteguía freebsd_committer freebsd_triage 2023-02-14 12:32:05 UTC
Committed,

Thanks!
Comment 10 commit-hook freebsd_committer freebsd_triage 2023-02-14 12:32:50 UTC
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(-)
Comment 11 Ozgur Konstantin Kazancci 2023-02-18 08:44:32 UTC
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)
Comment 12 Marco Beishuizen 2023-02-18 11:35:56 UTC
(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?
Comment 13 Mina Galić freebsd_triage 2023-02-18 11:40:58 UTC
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
Comment 14 Graham Perrin freebsd_committer freebsd_triage 2023-02-18 12:54:10 UTC
(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>
Comment 15 Fernando Apesteguía freebsd_committer freebsd_triage 2023-02-18 18:13:35 UTC
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?
Comment 16 Graham Perrin freebsd_committer freebsd_triage 2023-02-18 18:54:13 UTC
(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.)
Comment 17 Fernando Apesteguía freebsd_committer freebsd_triage 2023-02-24 12:17:52 UTC
Please, can anyone of the reporters that were able to see the wrong behavior check if it still happens with the new patch?

Thanks.
Comment 18 Marco Beishuizen 2023-02-24 16:18:44 UTC
Seems ok now. Thanks!
Comment 19 commit-hook freebsd_committer freebsd_triage 2023-02-24 16:36:28 UTC
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(-)
Comment 20 Fernando Apesteguía freebsd_committer freebsd_triage 2023-02-24 16:36:31 UTC
Committed,

Thanks for testing it!