Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 258112 - [patch] sys-process/htop-0.8.1: tree view malfunctions when started with hide_userland_threads=1
Summary: [patch] sys-process/htop-0.8.1: tree view malfunctions when started with hide...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Thomas Anderson (tanderson) (RETIRED)
URL: http://launchpadlibrarian.net/1965889...
Whiteboard:
Keywords: Inclusion
Depends on: 273770
Blocks:
  Show dependency tree
 
Reported: 2009-02-08 12:47 UTC by Israel G. Lugo
Modified: 2009-06-13 12:42 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Fix tree view when userland threads are hidden. (htop-0.8.1-fix-tree-view.patch,573 bytes, patch)
2009-02-08 12:53 UTC, Israel G. Lugo
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Israel G. Lugo 2009-02-08 12:47:44 UTC
This bug has already been filed in Ubuntu by Andy Brody: https://bugs.launchpad.net/ubuntu/+source/htop/+bug/298232

Quoting from Andy's description:
> When htop is started using a .htoprc file with "hide_userland_threads=1",
> tree view doesn't work. Enabling the view doesn't actually make a tree. It
> sorts processes appropriately (e.g. init is first), but there is no
> indentation.
> 
> Workaround:
> Unchecking "Hide userland threads" in the settings dialog fixes the problem
> for the current htop instance. Tree view will continue to work properly until
> exit even if hiding of userland threads is re-enabled.
> 
> The tree view behavior was normal in Ubuntu 8.04 (htop 0.6.6+svn20070915-1)
> Normal screenshot: http://htop.sourceforge.net/htop-0.5.png
> Attached screenshot: tree view enabled but not working

Please see the URL field for the screenshot showing the problem.

Steps to reproduce:
1. Start htop, enter Setup with F2, enable Display->Options->Hide userland threads
2. Leave htop.
3. Start htop again. The tree view (F5) won't work properly. This will continue to happen until you disable "Hide userland threads"

Ubuntu solved the problem with a patch from Josh Stone: http://sourceforge.net/mailarchive/message.php?msg_name=c1ed4c490901022030u35e959b4te3b585d4958270e9%40mail.gmail.com

Josh's patch makes sense. I tested it against htop-0.8.1 and it works perfectly. I've recreated the patch for convenience, since Josh's patch was a git diff and would've required patch -p1 to apply. I'll attach it here for inclusion.
Comment 1 Israel G. Lugo 2009-02-08 12:53:09 UTC
Created attachment 181307 [details, diff]
Fix tree view when userland threads are hidden.
Comment 2 Thomas Anderson (tanderson) (RETIRED) gentoo-dev 2009-02-12 13:48:46 UTC
Has upstream accepted this patch?
Comment 3 Israel G. Lugo 2009-02-12 17:32:02 UTC
(In reply to comment #2)
> Has upstream accepted this patch?
> 
Upstream seems to not have responded yet to the email containing the patch; at least there is no record of a reply email in their archives. The email with the patch is dated 2009-01-03.

The patch hasn't been commited to upstream's repository, either. The last commit on the relevant file in upstream's repository was made on September 2008: http://htop.svn.sourceforge.net/viewvc/htop/trunk/ProcessList.c?view=log
Comment 4 Israel G. Lugo 2009-02-25 04:12:27 UTC
Any news on accepting the patch? Tree functionality is broken, the fix is available...

(In reply to comment #3)
> (In reply to comment #2)
> > Has upstream accepted this patch?
> > 
> Upstream seems to not have responded yet to the email containing the patch; at
> least there is no record of a reply email in their archives. The email with the
> patch is dated 2009-01-03.
> 
> The patch hasn't been commited to upstream's repository, either. The last
> commit on the relevant file in upstream's repository was made on September
> 2008: http://htop.svn.sourceforge.net/viewvc/htop/trunk/ProcessList.c?view=log
> 

Comment 5 Thomas Anderson (tanderson) (RETIRED) gentoo-dev 2009-06-11 23:55:57 UTC
This is fixed in the new release, adding a dependency so I remember to look at this when I finish bumping it.
Comment 6 Thomas Anderson (tanderson) (RETIRED) gentoo-dev 2009-06-13 12:42:19 UTC
+*htop-0.8.2 (13 Jun 2009)
+
+  13 Jun 2009; Thomas Anderson <gentoofan23@gentoo.org>
+  +files/htop-0.8.2-illegaladdrcopy.patch, htop-0.8.1-r1.ebuild,
+  +htop-0.8.2.ebuild:
+  Version bump to 0.8.2, bug 273770; Thanks to Lars Wendler
+  (polynomial-c@gentoo.org) for the report and help on finding patches; Also
+  fixes bug #258112; Adds lsof support; Add a patch to fix crashes when
+  pressing keys 'a' or 'F6'; QA fix for implicit RDEPEND in 0.8.1-r1.
+