Bug 811614

Summary: libnuma numa_parse_cpustring returns warnings inconsistently
Product: Red Hat Enterprise Linux 6 Reporter: Travis Gummels <tgummels>
Component: numactlAssignee: Petr Holasek <pholasek>
Status: CLOSED ERRATA QA Contact: qe-baseos-daemons
Severity: medium Docs Contact:
Priority: medium    
Version: 6.2CC: asersen, azelinka, ddumas, dhoward, woodard
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: numactl-2.0.7-6.el6 Doc Type: Bug Fix
Doc Text:
No Documentation needed
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-21 10:11:24 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:
Bug Depends On:    
Bug Blocks: 782183, 787802, 840699    
Attachments:
Description Flags
Reproducer none

Description Travis Gummels 2012-04-11 14:31:57 UTC
Description of problem:

libnuma numa_parse_cpustring is returning warnings inconsistently.  You have one case where numa_parse_cpustring prints an error to stderr (if you have a bit set in string that is > max cpu in cpu affinity mask) and in another case it silently drops bits.

~/tests/gdk >taskset -c 0,12 ./numaparse 1-13
libnuma: Warning: cpu argument 13 out of range

~/tests/gdk >taskset -c 0,12 ./numaparse 1-2
0100000000000000

Version-Release number of selected component (if applicable):
numactl-2.0.3-9.el6

How reproducible:
100%

Steps to Reproduce:
1.  ~/tests/gdk >taskset -c 0,12 ./numaparse 1-13
libnuma: Warning: cpu argument 13 out of range
  
Actual results:
Warning

Expected results:
No warning

Additional info:
LLNL has requested this bug be public.

Comment 1 Travis Gummels 2012-04-11 14:34:22 UTC
Created attachment 576789 [details]
Reproducer

taskset -c 0,12 ./numaparse 1-13

Comment 2 Travis Gummels 2012-04-11 21:41:22 UTC
=== In Red Hat Customer Portal Case 00626930 ===
--- Comment by Gummels, Travis on 4/11/2012 5:40 PM ---

Reproduced on 16 x Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz

hyperion-agb52@gummels1:taskset -c 0,12 ./numaparse 1-13
libnuma: Warning: cpu argument 13 out of range

Bad cpustring `1-13'
hyperion-agb52@gummels1:taskset -c 0,12 ./numaparse 1-2
01000000000000000000000000000000

Comment 3 Travis Gummels 2012-04-13 19:24:40 UTC
compile reproducer with: 
gcc -o numaparse -lnuma numaparse.c

Comment 5 RHEL Program Management 2012-07-10 06:26:43 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 6 RHEL Program Management 2012-07-11 01:43:52 UTC
This request was erroneously removed from consideration in Red Hat Enterprise Linux 6.4, which is currently under development.  This request will be evaluated for inclusion in Red Hat Enterprise Linux 6.4.

Comment 12 errata-xmlrpc 2013-02-21 10:11:24 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.

http://rhn.redhat.com/errata/RHBA-2013-0401.html