Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 606851

Summary: Wrong /proc/cpuinfo for Pentium D reported on RHEL 4.8 (only x86_64) and RHEL 5.5 (both i386 and x86_64)
Product: Red Hat Enterprise Linux 5 Reporter: Jiri Hladky <jhladky>
Component: kernelAssignee: Prarit Bhargava <prarit>
Status: CLOSED ERRATA QA Contact: Red Hat Kernel QE team <kernel-qe>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.5CC: jvillalo, jwilson, kkolakow, rmusil
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-01-13 21:38:40 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
All output files mentioned in the description
none
RHEL5 fix for this issue none

Description Jiri Hladky 2010-06-22 15:43:43 UTC
Description of problem:

/proc/cpuinfo information for dual core Pentium D is wrong on
RHEL 4.8: Kernel 2.6.9-89.ELsmp x86_64
RHEL 5.5: Kernel 2.6.18-194.el5 x86_64
RHEL 5.5: Kernel 2.6.18-194.el5 i386

/proc/cpuinfo is OK on 
RHEL 4.8: Kernel 2.6.9-89.ELsmp i386
RHEL 6.0: Kernel 2.6.32-22.el6 both x86_64 i386

On RHEL 4.8 and RHEL 5.5 following is missing for processor #0:
===============================================================
physical id	: 0
siblings	: 2
core id		: 0
cpu cores	: 2
apicid		: 0
initial apicid	: 0
================================================================

On the other hand, processor #1 is reported correctly.

Other user space tools like hwloc (http://www.open-mpi.org/projects/hwloc/) which relies on /proc/cpuinfo are then providing wrong information.

I'm going to upload:

1) /proc/cpuinfo file
a) wrong
2.6.9-89.ELsmp_x86_64_dell-pesc430-03.rhts.eng.bos.redhat.com.cpu.info
2.6.18-194.el5_x86_64_dell-pesc430-03.rhts.eng.bos.redhat.com.cpu.info
2.6.18-194.el5_i686_dell-pesc430-03.rhts.eng.bos.redhat.com.cpu.info

b) correct
2.6.9-89.ELsmp_i686_dell-pesc430-03.rhts.eng.bos.redhat.com.cpu.info
2.6.32-22.el6.x86_64_dell-pesc430-03.rhts.eng.bos.redhat.com.cpu.info
2.6.32-31.el6_i686_dell-pesc430-03.rhts.eng.bos.redhat.com.cpu.info

2) hwloc CPU topology 
a) wrong based on wrong /proc/cpuinfo
2.6.9-89.ELsmp_x86_64_dell-pesc430-03.rhts.eng.bos.redhat.com.pdf
2.6.18-194.el5_x86_64_dell-pesc430-03.rhts.eng.bos.redhat.com.pdf
2.6.18-194.el5_i686_dell-pesc430-03.rhts.eng.bos.redhat.com.pdf

b) correct based on correct /proc/cpuinfo

2.6.9-89.ELsmp_i686_dell-pesc430-03.rhts.eng.bos.redhat.com.pdf
2.6.32-22.el6.x86_64_dell-pesc430-03.rhts.eng.bos.redhat.com.pdf
2.6.32-31.el6_i686_dell-pesc430-03.rhts.eng.bos.redhat.com.pdf

Please note that hwloc is not able to report CPU cache sizes on older kernel (RHEL 4.8 due to absence of /sys/devices/system/cpu/* entries). 

How reproducible:
I have reproduced the bug on
dell-pesc430-03.rhts.eng.bos.redhat.com with Pentium D 820 (Dell PowerEdge SC430)
dell-pesc430-01.rhts.eng.bos.redhat.com with Pentium D 840 (Dell PowerEdge SC430)


Steps to Reproduce:
1. Install RHEL ( I have tried only 32 bit and 64 bit system) on system with double core Pentium D cpu
2. Check for 
===============================================================
physical id	: 0
siblings	: 2
core id		: 0
cpu cores	: 2
apicid		: 0
initial apicid	: 0
================================================================
for both processors (cores) in /proc/cpuinfo

3. You might want to install hwloc either using rpm
https://brewweb.devel.redhat.com/packageinfo?packageID=19585
hwloc-1.0.1-17.*rpm
or by compiling it from the source code
http://www.open-mpi.org/software/hwloc/v1.0/

and run 
lstopo output.pdf
and check the result.
  
Actual results:
Wrong /proc/cpuinfo file

Expected results:
Correct /proc/cpuinfo file

Additional info:

Comment 1 Jiri Hladky 2010-06-22 15:46:56 UTC
I have tested it only on i386 and x86_64.

Thanks
Jirka

Comment 2 Jiri Hladky 2010-06-22 15:49:25 UTC
Created attachment 425982 [details]
All output files mentioned in the description

Comment 3 Prarit Bhargava 2010-09-10 19:31:38 UTC
RHEL4 32-bit is actually broken.  smp_num_cores is a global and is overwritten by the second cpu.  When looking at /proc/cpuinfo this results in a "proper" (although the logic is broken) output.

RHEL4 64-bit, RHEL5 32-bit, and RHEL5 64-bit all appear to be broken -- I think this has something to do with the detect_ht code.

RHEL6 32-bit and RHEL6 64-bit appear to work.

P.

Comment 4 Prarit Bhargava 2010-09-13 12:21:48 UTC
I won't fix RHEL4 as IMO it's too late in the life cycle for a RHEL4 fix.

I will concentrate on backporting the extended topology code (at least for /proc/cpuinfo) for RHEL5 32-bit and 64-bit.

P.

Comment 5 Prarit Bhargava 2010-09-15 14:57:32 UTC
Created attachment 447497 [details]
RHEL5 fix for this issue

Comment 6 RHEL Program Management 2010-09-15 15:19:28 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 8 Jarod Wilson 2010-09-21 21:00:35 UTC
in kernel-2.6.18-223.el5
You can download this test kernel (or newer) from http://people.redhat.com/jwilson/el5

Detailed testing feedback is always welcomed.

Comment 10 Jiri Hladky 2010-09-29 11:58:17 UTC
Hi,

I have verified the fix using 2.6.18-223.el5 on dell-pesc430-01.rhts.eng.bos.redhat.com

========================================================================
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 15
model           : 4
model name      :               Intel(R) Pentium(R) D CPU 3.20GHz
stepping        : 4
cpu MHz         : 3192.156
cache size      : 1024 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 2
apicid          : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss
 ht tm syscall nx lm constant_tsc pni monitor ds_cpl est cid cx16 xtpr
bogomips        : 6384.31
clflush size    : 64
cache_alignment : 128
address sizes   : 36 bits physical, 48 bits virtual
power management:

processor       : 1
vendor_id       : GenuineIntel
cpu family      : 15
model           : 4
model name      :               Intel(R) Pentium(R) D CPU 3.20GHz
stepping        : 4
cpu MHz         : 3192.156
cache size      : 1024 KB
physical id     : 0
siblings        : 2
core id         : 1
cpu cores       : 2
apicid          : 1
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss
 ht tm syscall nx lm constant_tsc pni monitor ds_cpl est cid cx16 xtpr
bogomips        : 6384.05
clflush size    : 64
cache_alignment : 128
address sizes   : 36 bits physical, 48 bits virtual
power management:
==========================================================================

It's fixed, thanks!

Jirka

Comment 14 errata-xmlrpc 2011-01-13 21:38:40 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-0017.html