Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1174311 - tgid addition to format_array disables thcount option
tgid addition to format_array disables thcount option
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: procps-ng (Show other bugs)
7.0
Unspecified Unspecified
high Severity high
: rc
: ---
Assigned To: Jan Rybar
Jan Houska
: EasyFix, Patch, Reproducer, Upstream
Depends On:
Blocks: 1203710 1313485 1289025 1295829
  Show dependency treegraph
 
Reported: 2014-12-15 10:46 EST by Filip Krska
Modified: 2016-11-04 02:36 EDT (History)
6 users (show)

See Also:
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 02:36:18 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
format array alphabetical order fix (1.06 KB, patch)
2014-12-15 10:46 EST, Filip Krska
jcapik: review+
Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 1290263 None None None Never
Red Hat Product Errata RHBA-2016:2447 normal SHIPPED_LIVE procps-ng bug fix update 2016-11-03 10:03:27 EDT

  None (edit)
Description Filip Krska 2014-12-15 10:46:07 EST
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 10:46:45 EST
Created attachment 969096 [details]
format array alphabetical order fix
Comment 10 Jan Rybar 2016-06-13 04:35:06 EDT
Upstream already fixed this in commit https://gitlab.com/procps-ng/procps/commit/3a52dfa340276a7f8f55af1b8267392ee48988b9
Comment 15 errata-xmlrpc 2016-11-04 02:36:18 EDT
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

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