Bug 510181 - top doesn't add all threads if using pid option and turn on show threads interactively
Summary: top doesn't add all threads if using pid option and turn on show threads inte...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: procps
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Daniel Novotny
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-07-08 07:32 UTC by Kenneth Topp
Modified: 2009-10-07 10:39 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-10-07 10:39:13 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
proposed patch (1.85 KB, patch)
2009-10-01 13:10 UTC, Daniel Novotny
no flags Details | Diff
new version of the patch (1.92 KB, patch)
2009-10-06 10:11 UTC, Daniel Novotny
no flags Details | Diff

Description Kenneth Topp 2009-07-08 07:32:08 UTC
Description of problem:
top doesn't show all threads if using pid option and turn on show threads interactively, where it works just fine if using the command line option to turn threads

Version-Release number of selected component (if applicable):

broken in fc11 3.2.7 and rawhide 3.2.28

How reproducible:

easy

Steps to Reproduce:
1. find a threaded app
pid=$( ps -e -o 'nlwp pid'  | sort -n |  awk '{ print $2 }'  | tail -1 )

2. run top with that pid with "show threads" from command line
  top -p $pid -H
3. run top with that pid with "show threads" turn on after it's started
   top -p
 (while running type "H")

Actual results:

the threads enter one by one, on refresh

Expected results:

all threads show up immediately

Comment 1 Daniel Novotny 2009-10-01 13:10:00 UTC
Created attachment 363318 [details]
proposed patch

hello,
after a bit of investigation I found a solution to this issue. I can include this in rawhide and let's also see what the upstream says about it...

Comment 2 Daniel Novotny 2009-10-06 10:11:58 UTC
Created attachment 363809 [details]
new version of the patch

unfortunately, I found that the first version of the patch introduces a little memory leak, so I have to enhance it a bit.

Comment 3 Daniel Novotny 2009-10-07 10:39:13 UTC
fixed in rawhide: procps-3.2.8-3.fc13


Note You need to log in before you can comment on or make changes to this bug.