RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1122408 - qemu-kvm core dump when booting qemu-kvm process with -M Q35 & cores >smp number
Summary: qemu-kvm core dump when booting qemu-kvm process with -M Q35 & cores >smp number
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.1
Hardware: x86_64
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Eduardo Habkost
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 1227278
TreeView+ depends on / blocked
 
Reported: 2014-07-23 07:51 UTC by FuXiangChun
Modified: 2016-05-24 05:40 UTC (History)
8 users (show)

Fixed In Version: qemu-kvm-rhev-2.3.0-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-24 05:40:14 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description FuXiangChun 2014-07-23 07:51:54 UTC
Description of problem:
e.g. /usr/libexec/qemu-kvm -M q35 -m 4G -smp 1,sockets=1,threads=1,cores=2
core=2 >smp 1.  it will cause qemu-kvm core dump.  If cores number <=smp number then qemu-kvm works well.

Version-Release number of selected component (if applicable):
qemu-kvm-rhev-2.1.0-3.el7ev.preview.x86_64
3.10.0-138.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Boot qemu-kvm process with cores number > smp number.
/usr/libexec/qemu-kvm -M q35 -m 4G -smp 1,sockets=1,threads=1,cores=2
2.
3.

Actual results:
(gdb) bt
#0  0x00007ffff24d4989 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x00007ffff24d6098 in __GI_abort () at abort.c:90
#2  0x00007ffff24cd8f6 in __assert_fail_base (fmt=0x7ffff261d3e8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", 
    assertion=assertion@entry=0x5555558a2c07 "smbios_smp_sockets >= 1", 
    file=file@entry=0x5555558a2ac0 "/builddir/build/BUILD/qemu-2.1.0/hw/i386/smbios.c", line=line@entry=826, 
    function=function@entry=0x5555558a2ea0 <__PRETTY_FUNCTION__.28490> "smbios_get_tables") at assert.c:92
#3  0x00007ffff24cd9a2 in __GI___assert_fail (assertion=assertion@entry=0x5555558a2c07 "smbios_smp_sockets >= 1", 
    file=file@entry=0x5555558a2ac0 "/builddir/build/BUILD/qemu-2.1.0/hw/i386/smbios.c", line=line@entry=826, 
    function=function@entry=0x5555558a2ea0 <__PRETTY_FUNCTION__.28490> "smbios_get_tables") at assert.c:101
#4  0x0000555555684af6 in smbios_get_tables (tables=tables@entry=0x7fffffffe0e8, tables_len=tables_len@entry=0x7fffffffe0f8, 
    anchor=anchor@entry=0x7fffffffe0f0, anchor_len=anchor_len@entry=0x7fffffffe100) at /usr/src/debug/qemu-2.1.0/hw/i386/smbios.c:826
#5  0x0000555555687a29 in bochs_bios_init () at /usr/src/debug/qemu-2.1.0/hw/i386/pc.c:683
#6  pc_memory_init (machine=machine@entry=0x555556164e40, system_memory=0x555556165d70, 
    below_4g_mem_size=below_4g_mem_size@entry=2147483648, above_4g_mem_size=above_4g_mem_size@entry=2147483648, 
    rom_memory=rom_memory@entry=0x5555561703f0, ram_memory=ram_memory@entry=0x7fffffffe190, 
    guest_info=guest_info@entry=0x55555616ff80) at /usr/src/debug/qemu-2.1.0/hw/i386/pc.c:1283
#7  0x0000555555689984 in pc_q35_init (machine=0x555556164e40) at /usr/src/debug/qemu-2.1.0/hw/i386/pc_q35.c:166
#8  pc_q35_init_rhel700 (machine=0x555556164e40) at /usr/src/debug/qemu-2.1.0/hw/i386/pc_q35.c:464
#9  0x000055555561c773 in main (argc=<optimized out>, argv=<optimized out>, envp=<optimized out>) at vl.c:4410

Expected results:
qemu-kvm works well. if qemu-kvm don't support this scenarios. should print a warning message(shouldn't core dump)

Additional info:
1.If need full core file.  QE will update it asap. 

2.-M pc don't hit this issue.

Comment 3 Eduardo Habkost 2015-07-03 17:45:38 UTC
Fixed on the 2.3.0 rebased, by commit:

commit 7dfddd7f884b6dd2abf230d8fa6c7c83aab4f5ec
Author: Eduardo Habkost <ehabkost>
Date:   Mon Sep 29 22:21:45 2014 -0300

    smbios: Fix assertion on socket count calculation
    
    QEMU currently allows the number of VCPUs to not be a multiple of the
    number of threads per socket, but the smbios socket count calculation
    introduced by commit c97294ec1b9e36887e119589d456557d72ab37b5 doesn't
    take that into account, triggering an assertion. e.g.:
    
      $ ./x86_64-softmmu/qemu-system-x86_64 -smp 4,sockets=2,cores=6,threads=1
      qemu-system-x86_64: /home/ehabkost/rh/proj/virt/qemu/hw/i386/smbios.c:825: smbios_get_tables: Assertion `smbios_smp_sockets >= 1' failed.
      Aborted (core dumped)
    
    Socket count calculation doesn't belong to smbios.c and should
    eventually be moved to the main SMP topology configuration code. But
    while we don't move the code, at least make it correct by rounding up
    the division.

Comment 4 Yanhui Ma 2015-07-28 08:53:38 UTC
qemu-kvm-rhev older than qemu-kvm-rhev-2.1.2-21.el7.x86_64 has been deleted in http://brewweb.devel.redhat.com/.

qemu-kvm-rhev-2.1.2-21.el7.x86_64 can not hit the issue. So the issue doesn't be reproduced.

verify the issue

host info

3.10.0-297.el7.x86_64
qemu-kvm-rhev-2.3.0-13.el7.x86_64

steps:
1.Boot qemu-kvm process with cores number > smp number.
/usr/libexec/qemu-kvm -M q35 -m 4G -smp 1,sockets=1,threads=1,cores=2

results:
qemu-kvm works well. 
Based on the above result, I think the bug has been fixed.

Comment 5 juzhang 2015-08-03 04:13:42 UTC
According to comment4, set this issue as verified.


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