Bug 929137 - lscpu displays incorrect information
Summary: lscpu displays incorrect information
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: util-linux
Version: rawhide
Hardware: i686
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Karel Zak
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-03-29 10:05 UTC by Chris Rankin
Modified: 2014-01-14 10:29 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-01-14 10:29:46 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Output of /proc/cpuinfo (2.55 KB, text/plain)
2013-03-29 10:05 UTC, Chris Rankin
no flags Details
Output of mk-input.sh (3.73 KB, application/octet-stream)
2013-11-11 20:14 UTC, Chris Rankin
no flags Details

Description Chris Rankin 2013-03-29 10:05:59 UTC
Created attachment 718000 [details]
Output of /proc/cpuinfo

Description of problem:
lscpu displays the following information for my dual-Xeon P4 box:

$ lscpu
Architecture:          i686
CPU op-mode(s):        32-bit
Byte Order:            Little Endian
CPU(s):                4
On-line CPU(s) list:   0-3
Thread(s) per core:    2
Core(s) per socket:    0
Socket(s):             4
Vendor ID:             GenuineIntel
CPU family:            15
Model:                 2
Stepping:              9
CPU MHz:               2666.600
BogoMIPS:              5316.66

$ lscpu -e
CPU SOCKET CORE ONLINE
0   0      0    yes
1   1      1    yes
2   2      0    yes
3   3      1    yes

This is incorrect. This box actually contains two physical sockets (not four), with each socket containing a hyper-threaded Xeon Northwood CPU. The end result is that this box has four logical CPUs.

Version-Release number of selected component (if applicable):
2.22.2-6

How reproducible:
Always.

Steps to Reproduce:
1. lscpu
  
Actual results:
$ lscpu
Architecture:          i686
CPU op-mode(s):        32-bit
Byte Order:            Little Endian
CPU(s):                4
On-line CPU(s) list:   0-3
Thread(s) per core:    2
Core(s) per socket:    0
Socket(s):             4
Vendor ID:             GenuineIntel
CPU family:            15
Model:                 2
Stepping:              9
CPU MHz:               2666.600
BogoMIPS:              5316.66

$ lscpu -e
CPU SOCKET CORE ONLINE
0   0      0    yes
1   1      1    yes
2   2      0    yes
3   3      1    yes


Expected results:
$ lscpu
Architecture:          i686
CPU op-mode(s):        32-bit
Byte Order:            Little Endian
CPU(s):                4
On-line CPU(s) list:   0-3
Thread(s) per core:    2
Core(s) per socket:    1
Socket(s):             2
Vendor ID:             GenuineIntel
CPU family:            15
Model:                 2
Stepping:              9
CPU MHz:               2666.600
BogoMIPS:              5316.66

$ lscpu -e
CPU SOCKET CORE ONLINE
0   0      0    yes
1   1      0    yes
2   0      0    yes
3   1      0    yes


Additional info:

Comment 1 Chris Rankin 2013-03-29 10:10:58 UTC
According to /proc/cpuinfo:

CPU  PHYSICAL-ID
0    0
1    3
2    0
3    3

Northwood CPUs predate Intel's multi-core technology, but not its multi-threading technology.

Comment 2 Karel Zak 2013-11-11 18:42:30 UTC
Chris, can you try to reproduce the problem with something more recent -- ideally with f20? We did many changes to the code.

It would be also nice to have a dump from your /proc and /sys for lscpu(1) regression tests (or to reproduce it), there is upstream script to create the dump:

wget https://raw.github.com/karelzak/util-linux/master/tests/ts/lscpu/mk-input.sh
chmod +x mk-input.sh
./mk-input.sh northwood.tar.gz

... and send me (or add to bugzilla) the tarball.

Thanks!

Comment 3 Chris Rankin 2013-11-11 20:14:49 UTC
Created attachment 822615 [details]
Output of mk-input.sh

Comment 4 Chris Rankin 2013-11-11 20:19:24 UTC
$ lscpu --version
lscpu from util-linux 2.23.2

$ lscpu -e
CPU SOCKET CORE ONLINE
0   0      0    yes
1   1      1    yes
2   0      0    yes
3   1      1    yes

Better - I suppose this is correct given that "CORE" is a logical number.

Comment 5 Chris Rankin 2013-11-11 20:20:12 UTC
$ lscpu
Architecture:          i686
CPU op-mode(s):        32-bit
Byte Order:            Little Endian
CPU(s):                4
On-line CPU(s) list:   0-3
Thread(s) per core:    2
Core(s) per socket:    1
Socket(s):             2
Vendor ID:             GenuineIntel
CPU family:            15
Model:                 2
Model name:            Intel(R) Xeon(TM) CPU 2.66GHz
Stepping:              9
CPU MHz:               2666.600
BogoMIPS:              5316.47

Comment 6 Fedora End Of Life 2013-12-21 12:33:36 UTC
This message is a reminder that Fedora 18 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 18. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '18'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 18's end of life.

Thank you for reporting this issue and we are sorry that we may not be 
able to fix it before Fedora 18 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior to Fedora 18's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 7 Karel Zak 2014-01-14 10:29:46 UTC
The issue seems fixed according to comment #4. Closing. Thanks!


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