Bug 728152 - dmidecode numbering bug on Socket Designation field on system with more than 9 CPU
Summary: dmidecode numbering bug on Socket Designation field on system with more than ...
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: seabios
Version: 6.2
Hardware: x86_64
OS: Linux
medium
low
Target Milestone: rc
: ---
Assignee: Eduardo Habkost
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 782183 810856 833130
TreeView+ depends on / blocked
 
Reported: 2011-08-04 08:20 UTC by Herve BOTERMAN
Modified: 2018-11-29 21:48 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-07-24 17:26:21 UTC


Attachments (Terms of Use)
dmidecode binary dump (916 bytes, application/octet-stream)
2011-08-09 14:13 UTC, Herve BOTERMAN
no flags Details

Description Herve BOTERMAN 2011-08-04 08:20:39 UTC
Description of problem:
dmidecode reports bad Socket Designation where there is more than 9 CPU, for example on an KVM guest with 10 CPUs, here what Socket Designations fields shows:
-CPU 1
-CPU 2
...
-CPU 9
-CPU : 
The bug is on the numbering that display ':' instead of '10'.

Version-Release number of selected component (if applicable):
dmidecode-2.1-3.el5

How reproducible:
dmidecode on a system with more than 9 CPU (KVM guest in my case)


Steps to Reproduce:
1. dmidecode|grep "Socket Designation:"
2.
3.
  
Actual results:
Socket Designation: CPU 1
Socket Designation: CPU 2
Socket Designation: CPU 3
Socket Designation: CPU 4
Socket Designation: CPU 5
Socket Designation: CPU 6
Socket Designation: CPU 7
Socket Designation: CPU 8
Socket Designation: CPU 9
Socket Designation: CPU :

Expected results:
Socket Designation: CPU 1
Socket Designation: CPU 2
Socket Designation: CPU 3
Socket Designation: CPU 4
Socket Designation: CPU 5
Socket Designation: CPU 6
Socket Designation: CPU 7
Socket Designation: CPU 8
Socket Designation: CPU 9
Socket Designation: CPU 10


Additional info:

Comment 1 Anton Arapov 2011-08-04 08:59:42 UTC
Thanks for the report, Herve!
1. try to reproduce the issue with the latest version of dmidecode*.
2. please attach the binary dump from this machine. --dump-bin option.

*dmidecode v2.11-1: http://people.redhat.com/aarapov/pkgs/

Comment 8 Herve BOTERMAN 2011-08-09 14:11:07 UTC
Hi Anton,

I've installed your dmidecode package (it has the same version number !) and tested it:

$ rpm -Uvh /tmp/dmidecode-2.11-1.el5.x86_64.rpm 
Preparing...                ########################################### [100%]
   1:dmidecode              ########################################### [100%]

[root@dona ~]
$ dmidecode |grep Socket
        Socket Designation: CPU 1
        Socket Designation: CPU 2
        Socket Designation: CPU 3
        Socket Designation: CPU 4
        Socket Designation: CPU 5
        Socket Designation: CPU 6
        Socket Designation: CPU 7
        Socket Designation: CPU 8
        Socket Designation: CPU 9
        Socket Designation: CPU :

Still the same problem.

$ dmidecode --dump-bin dona.dmidecode
# dmidecode 2.11
SMBIOS 2.4 present.
# Writing 884 bytes to dona.dmidecode.
# Writing 31 bytes to dona.dmidecode.

Please find the file in attachments.

Comment 9 Herve BOTERMAN 2011-08-09 14:13:03 UTC
Created attachment 517420 [details]
dmidecode binary dump

Comment 10 Herve BOTERMAN 2011-08-09 14:26:14 UTC
In the default display for CPU 9 the displayed handle is 0x0409. For the CPU 10, the handle is 0x040A:

Handle 0x0409, DMI type 4, 32 bytes
Processor Information
        Socket Designation: CPU 9
        Type: Central Processor
        Family: Other
        Manufacturer: QEMU
        ID: 63 06 00 00 FD FB 8B 07
        Version: Not Specified
        Voltage: Unknown
...

Handle 0x040A, DMI type 4, 32 bytes
Processor Information
        Socket Designation: CPU :
        Type: Central Processor
        Family: Other
        Manufacturer: QEMU
        ID: 63 06 00 00 FD FB 8B 07
        Version: Not Specified
        Voltage: Unknown
...

It seems that the CPU number can be simply found by "anding 0xFF" the handle. Maybe the dmidecode code get this value and add it to the zero character ascii code to get CPU number. That works for one to ten CPUs but fail beyond.
Sorry but, I have not enough time to dive in dmidecode code ;)

Comment 11 Anton Arapov 2011-08-09 15:22:23 UTC
  Herve, that's the problem corrupted data that the BIOS of your HV exposes to the guests. I've moved the bug to seabios maintainer, perhaps he aware of it already.
  dmidecode's codebase is stable wrt decode the cpu data, and works just fine at my local machine. I will dig into your binary though...

thanks,

Comment 20 Miya Chen 2012-07-22 04:45:21 UTC
Tried with rhel6.3 guest over rhel63 host, this problem does not exist.
cmd:
# /usr/libexec/qemu-kvm -M rhel6.3.0 -enable-kvm -m 4G -smp 11 -nodefconfig -rtc base=utc,driftfix=slew -no-shutdown -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -drive file=rhel63_64_virtio.qcow2,if=none,id=virtio0,format=qcow2,cache=none,aio=native -device virtio-blk-pci,drive=virtio0,id=virtio0,scsi=off,bootindex=1 -netdev tap,id=hostnet0,vhost=on -device virtio-net-pci,netdev=hostnet0,id=net0,mac=20:20:20:11:22:19 -vnc :10 -monitor stdio -boot menu=on

In guest:
#dmidecode|grep "Socket Designation:"
Socket Designation: CPU 1
Socket Designation: CPU 2
Socket Designation: CPU 3
Socket Designation: CPU 4
Socket Designation: CPU 5
Socket Designation: CPU 6
Socket Designation: CPU 7
Socket Designation: CPU 8
Socket Designation: CPU 9
Socket Designation: CPU a
Socket Designation: CPU b

Comment 22 Eduardo Habkost 2012-07-24 17:26:21 UTC
Closing this RHEL-6 bug, as RHEL-6 hosts don't have the bug. A bug for RHEL-5 needs to be proposed if a fix is reqeuired on RHEL-5.


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