Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1174311

Summary: tgid addition to format_array disables thcount option
Product: Red Hat Enterprise Linux 7 Reporter: Filip Krska <fkrska>
Component: procps-ngAssignee: Jan Rybar <jrybar>
Status: CLOSED ERRATA QA Contact: Jan Houska <jhouska>
Severity: high Docs Contact:
Priority: high    
Version: 7.0CC: bnater, isenfeld, ovasik, pdwyer, qe-baseos-apps, sauchter
Target Milestone: rcKeywords: EasyFix, Patch, Reproducer, Upstream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: procps-ng-3.3.10-6.el7 Doc Type: Bug Fix
Doc Text:
Cause: Non-alphabetical order between tgid and thcount in list of format options caused malfunciton in bsearch() function. Consequence: Format option thcount was not recognized by ps, e.g. "ps -o thcount" option is not accepted. Fix: Alphabetical order of thcount in array format_array was restored. Result: ps recognizes and accepts thcount format option.
Story Points: ---
Clone Of:
: 1174313 (view as bug list) Environment:
Last Closed: 2016-11-04 06:36:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1203710, 1289025, 1295829, 1313485    
Attachments:
Description Flags
format array alphabetical order fix jcapik: review+

Description Filip Krska 2014-12-15 15:46:07 UTC
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.

Comment 1 Filip Krska 2014-12-15 15:46:45 UTC
Created attachment 969096 [details]
format array alphabetical order fix

Comment 10 Jan Rybar 2016-06-13 08:35:06 UTC
Upstream already fixed this in commit https://gitlab.com/procps-ng/procps/commit/3a52dfa340276a7f8f55af1b8267392ee48988b9

Comment 15 errata-xmlrpc 2016-11-04 06:36:18 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-2447.html