Created attachment 329674 [details] ensure tgid is always set Description of problem: When htop is configured to show a tree view Version-Release number of selected component (if applicable): htop-0.8.1-2.fc10 This is a regression -- 0.7.x didn't have this problem. How reproducible: Very easy to reproduce Steps to Reproduce: 1. Edit or create ~/.htoprc, and set hide_userland_threads=1 and tree_view=1. 2. Start htop 3. Note that it is not actually displaying a tree view. Actual results: Processes are shown without threads in a flat view. Pressing F5 to toggle tree view will change the order, but it remains flat. Pressing H twice to toggle user threads on and off again will restore the proper tree hierarchy (until htop is restarted). Expected results: Processes are shown without threads in a tree view to begin with. Additional info: The problem is that when htop is hiding user threads, it doesn't go through the enumeration that sets the tgid in its process structures. Every process is left with tgid=0, which prevents the tree generator from working. The attached patch fixes the problem by setting tgid=pid when the parent pointer is NULL. I've posted this to the upstream mailing list and bug tracker as well, but haven't gotten any response. http://sourceforge.net/tracker/?func=detail&atid=651633&aid=2022810&group_id=108839 Ubuntu accepted this patch for jaunty from LP #298232.
Rafal submitted the patch for upstream/current fedora builds. I have applied the patch to the EPEL branches. Updates to follow...
htop-0.8.1-3.fc10 has been pushed to the Fedora 10 stable repository. If problems still persist, please make note of it in this bug report.
htop-0.8.1-3.fc9 has been pushed to the Fedora 9 stable repository. If problems still persist, please make note of it in this bug report.
I got the update today and confirmed that the problem is fixed. Thanks very much!