lscpu -p is showing wrong values for Node component
| Affects | Status | Importance | Assigned to | Milestone | ||
|---|---|---|---|---|---|---|
| util-linux (Ubuntu) | ||||||
| | Trusty |
Medium
|
Mathieu Trudel-Lapierre | |||
Bug Description
[Impact]
Any user of lscpu on systems with multiple NUMA nodes.
[Test case]
On a POWER8 system:
1) Run 'lscpu'; take note of the values for "NUMA node# CPU(s)".
2) Run 'lscpu -p'.
The values on the fourth column in lscpu -p output should match the node for which the CPU (first column) is listed (or contained in the displayed range). For example:
$ lscpu
[...]
NUMA node0 CPU(s): 0-12,14-39
[...]
NUMA node3 CPU(s): 13,40-79
[...]
$ lscpu -p
[...]
12,1,0,0,,1,1,1,1
13,1,0,3,,1,1,1,1
[...]
39,4,0,0,,4,4,4,4
40,5,1,3,,5,5,5,5
[..]
The fourth column for CPU 12 and 39 is "0", which matches the "node0" range of 0-12,14-39.
The fourth column for CPU 13 and 40 is "3", which matches the "node3" range 13,40-79.
[Regression potential]
This change is limited to the output of a command that can be parsed; so any regression would be erroneous values for node "names" or numbers, which may throw off data retrieved by parsing the output of lscpu.
This particular bug constitutes the fix to a regression in a previous SRU (ubuntu7.4), which included changes to support discontinuous NUMA nodes, and introduced the code this SRU changes, so the regression potential is minimal (this particular feature of lscpu is already broken).
---
---Problem Description---
lscpu -p is showing wrong values for Node component
---uname output---
Linux ubuntu 3.16.0-25-generic #14-Ubuntu ppc64le ppc64le ppc64le GNU/Linux
Machine Type = P8
---Debugger---
A debugger is not configured
---Steps to Reproduce---
Install a P8 machine with Ubuntu 14.04.02 ISO image in Power NV mode.
Then execute the below test scenario.
root@ubuntu-
# The following is the parsable format, which can be fed to other
# programs. Each different item in every column has an unique ID
# starting from zero.
# CPU,Core,
0,0,0,0,,0,0,0,0
1,0,0,1,,0,0,0,0
2,0,0,16,,0,0,0,0
3,0,0,17,,0,0,0,0
4,0,0,0,,0,0,0,0
5,0,0,0,,0,0,0,0
6,0,0,33,,0,0,0,0
7,0,0,0,,0,0,0,0
8,1,0,0,,1,1,1,1
9,1,0,0,,1,1,1,1
10,1,0,
11,1,0,
12,1,0,
13,1,0,
14,1,0,81,,1,1,1,1
15,1,0,0,,1,1,1,1
16,2,0,
17,2,0,
18,2,0,
19,2,0,
20,2,0,
21,2,0,
22,2,0,
23,2,0,
24,3,0,
25,3,0,
26,3,0,
27,3,0,
28,3,0,
29,3,0,
30,3,0,
31,3,0,0,,3,3,3,3
32,4,1,0,,4,4,4,4
33,4,1,0,,4,4,4,4
34,4,1,177,,4,4,4,4
35,4,1,0,,4,4,4,4
36,4,1,
37,4,1,256,,4,4,4,4
38,4,1,1,,4,4,4,4
39,4,1,
40,5,1,0,,5,5,5,5
41,5,1,0,,5,5,5,5
42,5,1,
43,5,1,256,,5,5,5,5
44,5,1,
45,5,1,256,,5,5,5,5
46,5,1,
47,5,1,256,,5,5,5,5
48,6,1,
49,6,1,256,,6,6,6,6
50,6,1,
51,6,1,256,,6,6,6,6
52,6,1,
53,6,1,256,,6,6,6,6
54,6,1,
55,6,1,256,,6,6,6,6
56,7,1,
57,7,1,256,,7,7,7,7
58,7,1,
59,7,1,256,,7,7,7,7
60,7,1,
61,7,1,256,,7,7,7,7
62,7,1,
63,7,1,256,,7,7,7,7
64,8,2,
65,8,2,256,,8,8,8,8
66,8,2,
67,8,2,256,,8,8,8,8
68,8,2,
69,8,2,256,,8,8,8,8
70,8,2,
71,8,2,256,,8,8,8,8
72,9,2,
73,9,2,256,,9,9,9,9
74,9,2,0,,9,9,9,9
75,9,2,0,,9,9,9,9
76,9,2,0,,9,9,9,9
77,9,2,0,,9,9,9,9
78,9,2,65,,9,9,9,9
79,9,2,0,,9,9,9,9
80,10,2,
81,10,2,
82,10,2,
83,10,2,
84,10,2,
85,10,2,
86,10,2,
87,10,2,
88,11,2,
89,11,2,
90,11,2,
91,11,2,
92,11,2,
93,11,2,
94,11,2,
95,11,2,
96,12,3,
97,12,3,
98,12,3,
99,12,3,
100,12,
101,12,
102,12,
103,12,
104,13,
105,13,
106,13,
107,13,
108,13,
109,13,
110,13,
111,13,
112,14,
113,14,
114,14,
115,14,
116,14,
117,14,
118,14,
119,14,
120,15,
121,15,
122,15,
123,15,
124,15,
125,15,
126,15,
127,15,
root@ubuntu-
ii util-linux 2.20.1-
Contact Information = <email address hidden>
Userspace tool common name: /usr/bin/lscpu
The userspace tool has the following bit modes: 64-bit
Userspace package: util-linux
Userspace tool obtained from project website: na
| tags: | added: architecture-ppc64le bugnameltc-122343 severity-high targetmilestone-inin14042 |
------- Comment From <email address hidden> 2015-03-25 06:12 EDT-------
Team Canonical,
Any update on this issue?
Thanks,
Chandan
| affects: | ubuntu → util-linux (Ubuntu) |
| Steve Langasek (vorlon) wrote : | #3 |
Please note that bugs in launchpad should be assigned to taco-screen-team if you are looking for Canonical to take action on them.
This bug has been assigned to the util-linux package, and says that the output in the 'node' column is incorrect. What are the correct values for the 'node' field, and where does lscpu get this information? For instance, it seems possible that the erroneous information comes from the kernel rather than due to a bug in the util-linux package.
------- Comment (attachment only) From <email address hidden> 2015-07-17 09:25 EDT-------
------- Comment (attachment only) From <email address hidden> 2015-07-17 09:30 EDT-------
------- Comment From <email address hidden> 2015-07-17 10:39 EDT-------
** Externalizing the Comment **
The expected values of the same scenario on Ubuntu 15.10 OS on P8 Hardware :
root@p824l:~# uname -a
Linux p824l 4.0.0-4-generic #6-Ubuntu SMP Tue Jun 30 20:50:37 UTC 2015 ppc64le ppc64le ppc64le GNU/Linux
root@p824l:~# dpkg -S /usr/bin/lscpu
util-linux: /usr/bin/lscpu
root@p824l:~# dpkg --list | grep util-linux
ii util-linux 2.26.2-6ubuntu1 ppc64el Miscellaneous system utilities
root@p824l:~# lscpu -p
# The following is the parsable format, which can be fed to other
# programs. Each different item in every column has an unique ID
# starting from zero.
# CPU,Core,
0,0,0,0,,0,0,0,0
1,0,0,0,,0,0,0,0
2,0,0,0,,0,0,0,0
3,0,0,0,,0,0,0,0
4,0,0,0,,0,0,0,0
5,0,0,0,,0,0,0,0
6,0,0,0,,0,0,0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,8,1,1,,8,8,8,8
68,8,1,1,,8,8,8,8
69,8,1,1,,8,8,8,8
70,8,1,1,,8,8,8,8
71,8,1,1,,8,8,8,8
72,9,1,1,,9,9,9,9
73,9,1,1,,9,9,9,9
74,9,1,1,,9,9,9,9
75,9,1,1,,9,9,9,9
76,9,1,1,,9,9,9,9
77,9,1,1,,9,9,9,9
78,9,1,1,,9,9,9,9
79,9,1,1,,9,9,9,9
80,10,2,
81,10,2,
82,10,2,
83,10,2,
84,10,2,
85,10,2,
86,10,2,
87,10,2,
88,11,2,
89,11,2,
90,11,2,
91,11,2,
92,11,2,
93,11,2,
94,11,2,
95,11,2,
96,12,2,
97,12,2,
98,12,2,
99,12,2,
100,12,
101,12,
102,12,
103,12,
104,13,
105,13,
106,13,
107,13,
108,13,
109,13,
110,13,
111,13,
112,14,
113,14,
114,14,
115,14,
116,14,
117,14,
118,14,
119,14,
120,15,
121...
| Changed in util-linux (Ubuntu): | |
| assignee: | nobody → Taco Screen team (taco-screen-team) |
| Steve Langasek (vorlon) wrote : | #7 |
Thanks for this additional information. This still doesn't answer the question of whether the bug is in lscpu, or in the kernel's /sys interfaces. Have you checked whether old util-linux with new kernel, or new util-linux with old kernel, works?
| Steve Langasek (vorlon) wrote : | #8 |
I've just done a test here with both Ubuntu 14.04 and Ubuntu 15.04 versions of util-linux (2.20.1-
| Changed in util-linux (Ubuntu): | |
| importance: | Undecided → High |
| status: | New → Triaged |
| milestone: | none → ubuntu-14.04.4 |
| tags: |
added: severity-medium removed: severity-high |
| bugproxy (bugproxy) wrote : | #9 |
------- Comment From <email address hidden> 2015-08-12 06:10 EDT-------
Team Canonical,
It has been a while, can we have update on this?
Thanks,
| Changed in util-linux (Ubuntu): | |
| assignee: | Taco Screen team (taco-screen-team) → Mathieu Trudel-Lapierre (mathieu-tl) |
Steve, what exactly did you test?
This issue looks a lot like what should have been fixed by 2.20.1-
I have access to a system which appears to show the issue, so I'll see if I can find which other upstream commit solves the issue.
| Changed in util-linux (Ubuntu): | |
| status: | Triaged → In Progress |
| description: | updated |
Fixed up to correctly target this at Trusty; this bug doesn't exist in later releases. I uploaded the SRU to the trusty queue.
| Changed in util-linux (Ubuntu Trusty): | |
| status: | New → In Progress |
| importance: | Undecided → High |
| Changed in util-linux (Ubuntu): | |
| status: | In Progress → Invalid |
| assignee: | Mathieu Trudel-Lapierre (mathieu-tl) → nobody |
| Changed in util-linux (Ubuntu Trusty): | |
| assignee: | nobody → Mathieu Trudel-Lapierre (mathieu-tl) |
Hello bugproxy, or anyone else affected,
Accepted util-linux into trusty-proposed. The package will build now and be available at https:/
Please help us by testing this new package. See https:/
If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-
Further information regarding the verification process can be found at https:/
| Changed in util-linux (Ubuntu Trusty): | |
| status: | In Progress → Fix Committed |
| tags: |
added: targetmilestone-inin14043 removed: targetmilestone-inin14042 |
| Changed in util-linux (Ubuntu Trusty): | |
| milestone: | none → ubuntu-14.04.4 |
| Changed in util-linux (Ubuntu): | |
| milestone: | ubuntu-14.04.4 → none |
Verified this on a fully-enabled POWER8 system; confirming that without the patch, multiple CPUs show incorrect node values (random garbage):
144,18,
145,18,
146,18,
147,18,
148,18,
149,18,
150,18,
151,18,
152,19,
153,19,
154,19,
155,19,
156,19,
157,19,
158,19,
159,19,
... And with the patch, things are the way they should:
144,18,
145,18,
146,18,
147,18,
148,18,
149,18,
150,18,
151,18,
152,19,
153,19,
154,19,
155,19,
156,19,
157,19,
158,19,
159,19,
| tags: | added: verification-done |
| Chris J Arges (arges) wrote : Update Released | #14 |
The verification of the Stable Release Update for util-linux has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.
| Launchpad Janitor (janitor) wrote : | #15 |
This bug was fixed in the package util-linux - 2.20.1-
---------------
util-linux (2.20.1-
* Use the correct parameter to index node names. (LP: #1427995)
-- Mathieu Trudel-Lapierre <email address hidden> Wed, 02 Sep 2015 11:06:26 -0400
| Changed in util-linux (Ubuntu Trusty): | |
| status: | Fix Committed → Fix Released |
| Changed in util-linux (Ubuntu): | |
| importance: | High → Medium |
| Changed in util-linux (Ubuntu Trusty): | |
| importance: | High → Medium |
| Robin (robingape) wrote : | #16 |
For reference, the deployed fix shows correct result on an Intel i7 processor:
Prior to update:
…
# CPU,Core,
0,0,0,0,,0,0,0,0
1,1,0,0,,1,1,1,0
2,2,0,0,,2,2,2,0
3,3,0,0,,3,3,3,0
4,0,0,0,,0,0,0,0
5,1,0,0,,1,1,1,0
6,2,0,65,,2,2,2,0
7,3,0,0,,3,3,3,0
After update:
…
# CPU,Core,
0,0,0,0,,0,0,0,0
1,1,0,0,,1,1,1,0
2,2,0,0,,2,2,2,0
3,3,0,0,,3,3,3,0
4,0,0,0,,0,0,0,0
5,1,0,0,,1,1,1,0
6,2,0,0,,2,2,2,0
7,3,0,0,,3,3,3,0
Note the previously incorrect result for CPU 6 is corrected on the updated version of lscpu -p
| no longer affects: | util-linux (Ubuntu) |
------- Comment From <email address hidden> 2015-12-09 08:50 EDT-------
I have installed a PowerNV 8284-22A P8 Hardware with Ubuntu 14.04.3 ISO.
Then executed the test scenario again to verify if the issue is fixed.
root@powerkvmpo
Linux powerkvmpok002 3.19.0-39-generic #44~14.04.1-Ubuntu SMP Wed Dec 2 10:00:52 UTC 2015 ppc64le ppc64le ppc64le GNU/Linux
root@powerkvmpo
NAME="Ubuntu"
VERSION="14.04.3 LTS, Trusty Tahr"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 14.04.3 LTS"
VERSION_ID="14.04"
HOME_URL="http://
SUPPORT_URL="http://
BUG_REPORT_URL="http://
root@powerkvmpo
/usr/bin/lscpu
root@powerkvmpo
util-linux: /usr/bin/lscpu
root@powerkvmpo
ii util-linux 2.20.1-
root@powerkvmpo
# The following is the parsable format, which can be fed to other
# programs. Each different item in every column has an unique ID
# starting from zero.
# CPU,Core,
0,0,0,0,,0,0,0,0
1,0,0,0,,0,0,0,0
2,0,0,0,,0,0,0,0
3,0,0,0,,0,0,0,0
4,0,0,0,,0,0,0,0
5,0,0,0,,0,0,0,0
6,0,0,0,,0,0,0,0
7,0,0,0,,0,0,0,0
8,1,0,0,,1,1,1,1
9,1,0,0,,1,1,1,1
10,1,0,0,,1,1,1,1
11,1,0,0,,1,1,1,1
12,1,0,0,,1,1,1,1
13,1,0,0,,1,1,1,1
14,1,0,0,,1,1,1,1
15,1,0,0,,1,1,1,1
16,2,0,0,,2,2,2,2
17,2,0,0,,2,2,2,2
18,2,0,0,,2,2,2,2
19,2,0,0,,2,2,2,2
20,2,0,0,,2,2,2,2
21,2,0,0,,2,2,2,2
22,2,0,0,,2,2,2,2
23,2,0,0,,2,2,2,2
24,3,0,0,,3,3,3,3
25,3,0,0,,3,3,3,3
26,3,0,0,,3,3,3,3
27,3,0,0,,3,3,3,3
28,3,0,0,,3,3,3,3
29,3,0,0,,3,3,3,3
30,3,0,0,,3,3,3,3
31,3,0,0,,3,3,3,3
32,4,0,0,,4,4,4,4
33,4,0,0,,4,4,4,4
34,4,0,0,,4,4,4,4
35,4,0,0,,4,4,4,4
36,4,0,0,,4,4,4,4
37,4,0,0,,4,4,4,4
38,4,0,0,,4,4,4,4
39,4,0,0,,4,4,4,4
40,5,1,16,,5,5,5,5
41,5,1,16,,5,5,5,5
42,5,1,16,,5,5,5,5
43,5,1,16,,5,5,5,5
44,5,1,16,,5,5,5,5
45,5,1,16,,5,5,5,5
46,5,1,16,,5,5,5,5
47,5,1,16,,5,5,5,5
48,6,1,16,,6,6,6,6
49,6,1,16,,6,6,6,6
50,6,1,16,,6,6,6,6
51,6,1,16,,6,6,6,6
52,6,1,16,,6,6,6,6
53,6,1,16,,6,6,6,6
54,6,1,16,,6,6,6,6
55,6,1,16,,6,6,6,6
56,7,1,16,,7,7,7,7
57,7,1,16,,7,7,7,7
58,7,1,16,,7,7,7,7
59,7,1,16,,7,7,7,7
60,7,1,16,,7,7,7,7
61,7,1,16,,7,7,7,7
62,7,1,16,,7,7,7,7
63,7,1,16,,7,7,7,7
64,8,1,16,,8,8,8,8
65,8,1,16,,8,8,8,8
66,8,1,16,,8,8,8,8
67,8,1,16,,8,8,8,8
68,8,1,16,,8,8,8,8
69,8,1,16,,8,8,8,8
70,8,1,16,,8,8,8,8
71,8,1,16,,8,8,8,8
72,9,1,16,,9,9,9,9
73,9,1,16,,9,9,9,9
74,9,1,16,,9,9,9,9
75,9,1,16,,9,9,9,9
76,9,1,16,,9,9,9,9
77,9,1,16,,9,9,9,9
78,9,1,16,,9,9,9,9
79,9,1,16,,9,9,9,9
80,10,2,
81,10,2,
82,10,2,
83,10,2,
84,10,2,
85,10,2,
86,10,2,
87,10,2,
88,11,2,
89,11,2,
90,11,2,
91,11,2,
92,11,2,
93,11,2,
94,11,2,
95,11,2,
96,12,2,
97,12,2,
98,12,2,
99,12,2,
100,12,
101,12,
102,12,2...


Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https:/ /wiki.ubuntu. com/Bugs/ FindRightPackag e. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.
To change the source package that this bug is filed about visit https:/ /bugs.launchpad .net/ubuntu/ +bug/1427995/ +editstatus and add the package name in the text box next to the word Package.
[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]