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 1476181 - qemu core dumped after hotplug one cpu core with a negative core id
Summary: qemu core dumped after hotplug one cpu core with a negative core id
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm
Version: 7.4-Alt
Hardware: ppc64le
OS: Linux
unspecified
medium
Target Milestone: rc
: 7.4-Alt
Assignee: Laurent Vivier
QA Contact: Xujun Ma
URL:
Whiteboard:
: 1475747 (view as bug list)
Depends On:
Blocks: 1440030
TreeView+ depends on / blocked
 
Reported: 2017-07-28 08:25 UTC by Xujun Ma
Modified: 2017-11-09 11:31 UTC (History)
8 users (show)

Fixed In Version: qemu-kvm-2.9.0-20.el7a
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-11-09 11:31:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
IBM Linux Technology Center 157332 0 None None None 2017-08-06 10:32:35 UTC
Red Hat Product Errata RHEA-2017:3169 0 normal SHIPPED_LIVE qemu-kvm enhancement update 2017-11-09 16:13:13 UTC

Description Xujun Ma 2017-07-28 08:25:14 UTC
Description of problem:
qemu core dumped  after hotplug one cpu core with a negative core id

Version-Release number of selected component (if applicable):
host:4.11.0-10.el7a.ppc64le
guest:4.11.0-16.el7a.ppc64le
qemu:qemu-kvm-2.9.0-18.el7a.ppc64le

How reproducible:
100%

Steps to Reproduce:
1.Boot guest with command
/usr/libexec/qemu-kvm \
 -name vm \
 -m 8192 \
 -rtc base=utc,clock=host \
 -smp 2,maxcpus=4,cores=4,threads=1,sockets=1 \
 -chardev stdio,mux=on,id=serial_id_serial0,server,nowait \
 -device spapr-vty,id=serial111,chardev=serial_id_serial0 \
 -mon chardev=serial_id_serial0,mode=readline \
 -nodefaults \
 -device virtio-scsi-pci,bus=pci.0,addr=0x5 \
 -device scsi-hd,id=scsi-hd0,drive=scsi-hd-dr0,bootindex=1\
 -drive file=pegas.qcow2,if=none,id=scsi-hd-dr0,format=qcow2,cache=none \
 -device virtio-net-pci,netdev=net0,id=nic0,mac=70:e2:84:14:e7:84 \
 -netdev tap,id=net0,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown,vhost=on 
2.Hotplug cpu core
(qemu) device_add host-spapr-cpu-core,core-id=-2,id=core
3.(qemu)q

Actual results:
(qemu) device_add host-spapr-cpu-core,core-id=-2,id=core1
Can't create CPU with id -2 in KVM
Adjust the number of cpus to -2 or try to raise the number of threads per core
(qemu) q
guest.sh: line 18: 14761 Segmentation fault      (core dumped) /usr/libexec/qemu-kvm -name vm -m 8192 -rtc base=utc,clock=host -smp 2,maxcpus=4,cores=4,threads=1,sockets=1 -chardev stdio,mux=on,id=serial_id_serial0,server,nowait -device spapr-vty,id=serial111,chardev=serial_id_serial0 -mon chardev=serial_id_serial0,mode=readline -nodefaults -device virtio-scsi-pci,bus=pci.0,addr=0x5 -device scsi-hd,id=scsi-hd0,drive=scsi-hd-dr0,bootindex=1 -drive file=pegas.qcow2,if=none,id=scsi-hd-dr0,format=qcow2,cache=none -device virtio-net-pci,netdev=net0,id=nic0,mac=70:e2:84:14:e7:84 -netdev tap,id=net0,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown,vhost=on


Expected results:
step2:invalid core id -2
step3:no core dumped



Additional info:

same issue on power8
RHEL7.4,
host kernel 3.10.0-689.el7.ppc64le
qemu:qemu-kvm-rhev-2.9.0-14.el7.ppc64le
guest kernel:3.10.0-671.el7.ppc64le

Comment 2 Laurent Vivier 2017-08-02 10:36:02 UTC
*** Bug 1475747 has been marked as a duplicate of this bug. ***

Comment 3 Laurent Vivier 2017-08-02 10:50:34 UTC
I have proposed a fix upstream:

http://lists.nongnu.org/archive/html/qemu-devel/2017-08/msg00281.html

Comment 4 Miroslav Rezanina 2017-08-08 11:25:35 UTC
Fix included in qemu-kvm-2.9.0-20.el7a

Comment 6 Xujun Ma 2017-08-10 01:00:07 UTC
Reproduced the issue on old version:
Version-Release number of selected component (if applicable):
host:4.11.0-10.el7a.ppc64le
guest:4.11.0-16.el7a.ppc64le
qemu:qemu-kvm-2.9.0-18.el7a.ppc64le

Steps to Reproduce:
1.Boot guest with command
/usr/libexec/qemu-kvm \
 -name vm \
 -m 8192 \
 -rtc base=utc,clock=host \
 -smp 2,maxcpus=4,cores=4,threads=1,sockets=1 \
 -chardev stdio,mux=on,id=serial_id_serial0,server,nowait \
 -device spapr-vty,id=serial111,chardev=serial_id_serial0 \
 -mon chardev=serial_id_serial0,mode=readline \
 -nodefaults \
 -device virtio-scsi-pci,bus=pci.0,addr=0x5 \
 -device scsi-hd,id=scsi-hd0,drive=scsi-hd-dr0,bootindex=1\
 -drive file=pegas.qcow2,if=none,id=scsi-hd-dr0,format=qcow2,cache=none \
 -device virtio-net-pci,netdev=net0,id=nic0,mac=70:e2:84:14:e7:84 \
 -netdev tap,id=net0,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown,vhost=on 
2.Hotplug cpu core
(qemu) device_add host-spapr-cpu-core,core-id=-2,id=core
3.(qemu)q

Actual results:
(qemu) device_add host-spapr-cpu-core,core-id=-2,id=core1
Can't create CPU with id -2 in KVM
Adjust the number of cpus to -2 or try to raise the number of threads per core
(qemu) q
guest.sh: line 18: 14761 Segmentation fault      (core dumped) /usr/libexec/qemu-kvm -name vm -m 8192 -rtc base=utc,clock=host -smp 2,maxcpus=4,cores=4,threads=1,sockets=1 -chardev stdio,mux=on,id=serial_id_serial0,server,nowait -device spapr-vty,id=serial111,chardev=serial_id_serial0 -mon chardev=serial_id_serial0,mode=readline -nodefaults -device virtio-scsi-pci,bus=pci.0,addr=0x5 -device scsi-hd,id=scsi-hd0,drive=scsi-hd-dr0,bootindex=1 -drive file=pegas.qcow2,if=none,id=scsi-hd-dr0,format=qcow2,cache=none -device virtio-net-pci,netdev=net0,id=nic0,mac=70:e2:84:14:e7:84 -netdev tap,id=net0,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown,vhost=on


Verified the issue on the latest build:
Version-Release number of selected component (if applicable):
host:4.11.0-10.el7a.ppc64le
guest:4.11.0-16.el7a.ppc64le
qemu:qemu-kvm-2.9.0-20.el7a.ppc64le

Steps to Verify:

The same as above

Actual results:

(qemu) device_add host-spapr-cpu-core,core-id=-2,id=core
Invalid core id -2
(qemu) q

Negative core id is invalid and no core dumped when exit.So the bug has been fixed.

Comment 8 errata-xmlrpc 2017-11-09 11:31:17 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2017:3169


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