procps-ng-3.3.10-4.fc21.x86_64 reproduces as well (not fixed upstream) +++ This bug was initially created as a clone of Bug #1174311 +++ Description of problem: When `tgid` option was introduced and added to format_array[] wrongly after `thcount` record the latter option no longer can be specified as a parameter. The broken alphabetical order confuses the bsearch() function. Version-Release number of selected component (if applicable): procps-ng-3.3.10-3.el7.x86_64 How reproducible: Always Steps to Reproduce: 1. $ ps -o thcount Actual results: error: unknown user-defined format specifier "thcount" Usage: ... Expected results: THCNT 1 1 Additional info: Patch with fix proposal attached. Please propagate to upstream as usual. --- Additional comment from Filip Krska on 2014-12-15 10:46:45 EST ---
This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle. Changing version to '22'. More information and reason for this action is here: https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22
(In reply to Filip Krska from comment #0) > procps-ng-3.3.10-4.fc21.x86_64 reproduces as well (not fixed upstream) > > +++ This bug was initially created as a clone of Bug #1174311 +++ > > Description of problem: > > When `tgid` option was introduced and added to format_array[] wrongly after > `thcount` record the latter option no longer can be specified as a > parameter. The broken alphabetical order confuses the bsearch() function. > > Version-Release number of selected component (if applicable): > > procps-ng-3.3.10-3.el7.x86_64 > > > How reproducible: > > Always > > > Steps to Reproduce: > 1. $ ps -o thcount > > > Actual results: > > error: unknown user-defined format specifier "thcount" > > Usage: > ... > > Expected results: > > THCNT > 1 > 1 > > > Additional info: > > Patch with fix proposal attached. > Please propagate to upstream as usual. > > --- Additional comment from Filip Krska on 2014-12-15 10:46:45 EST --- Hi, I would like to work on this bug, If you could guide me it would be of great help as this is the first bug .
Hi Shiva, the fix for this bug is identified (in the original Bug #1174311 for RHEL 7) and patch is here: https://bugzilla.redhat.com/attachment.cgi?id=969096 diff -up procps-ng-3.3.9/ps/output.c.format_array_sort procps-ng-3.3.9/ps/output.c --- procps-ng-3.3.9/ps/output.c.format_array_sort 2014-12-15 13:15:05.603753166 +0100 +++ procps-ng-3.3.9/ps/output.c 2014-12-15 13:15:46.025714308 +0100 @@ -1717,8 +1717,8 @@ static const format_struct format_array[ {"sz", "SZ", pr_sz, sr_nop, 5, 0, HPU, PO|RIGHT}, {"taskid", "TASKID", pr_nop, sr_nop, 5, 0, SUN, TO|PIDMAX|RIGHT}, // is this a thread ID? {"tdev", "TDEV", pr_nop, sr_nop, 4, 0, XXX, AN|RIGHT}, -{"thcount", "THCNT", pr_nlwp, sr_nlwp, 5, 0, AIX, PO|RIGHT}, {"tgid", "TGID", pr_procs, sr_procs, 5, 0, LNX, PO|PIDMAX|RIGHT}, +{"thcount", "THCNT", pr_nlwp, sr_nlwp, 5, 0, AIX, PO|RIGHT}, {"tid", "TID", pr_tasks, sr_tasks, 5, 0, AIX, TO|PIDMAX|RIGHT}, {"time", "TIME", pr_time, sr_time, 8, 0, U98, ET|RIGHT}, /*cputime*/ /* was 6 wide */ {"timeout", "TMOUT", pr_nop, sr_nop, 5, 0, LNX, AN|RIGHT}, // 2.0.xx era the remaining task is to process the fix release. If you want to help with the package maintaining part, perhaps this guide can help you: https://fedoraproject.org/wiki/Join_the_package_collection_maintainers?rd=PackageMaintainers/Join
Created attachment 1132741 [details] Fix format array alphabetical order
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.