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 975665 - Many times online/offline cpu cause guest hang
Summary: Many times online/offline cpu cause guest hang
Keywords:
Status: CLOSED DUPLICATE of bug 1073568
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm
Version: 7.0
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Igor Mammedov
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-19 05:26 UTC by FuXiangChun
Modified: 2014-03-10 12:40 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-03-10 12:40:43 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description FuXiangChun 2013-06-19 05:26:02 UTC
Description of problem:
As subject, online and offline cpu in guest via command line.
echo 0 >/sys/devices/system/cpu/cpuX/online
echo 1 >/sys/devices/system/cpu/cpuX/online 

Version-Release number of selected component (if applicable):
host and guest kernel version:
# uname -r
3.10.0-0.rc6.62.el7.x86_64

qemu-kvm version:
qemu-kvm-1.5.0-2.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.boot rhel7 guest
 /usr/libexec/qemu-kvm -M q35 -cpu Opteron_G2 -enable-kvm -m 2048 -smp 8,sockets=2,cores=4,threads=1,maxcpus=254 -name hotplug-cpu -uuid a51eb497-bfd7-47c0-8b5b-0853716e3ce6 -rtc base=localtime,clock=host,driftfix=slew -drive file=/root/RHEL-7.0-20130606.0.Server.x86_64.qcow3bk,if=none,id=drive-system-disk,format=qcow2,cache=none,aio=native,werror=stop,rerror=stop,serial=QEMU-DISK1 -device virtio-blk-pci,drive=drive-system-disk,id=system-disk,bootindex=1 -netdev tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup -device e1000,netdev=hostnet0,id=virtio-net-pci0,mac=08:2e:5f:0a:1d:b2,bus=pcie.0,addr=0x5,bootindex=2 -device virtio-balloon-pci,id=ballooning,bus=pcie.0,addr=0x6 -qmp tcp:0:4444,server,nowait -k en-us -boot menu=on -vnc :1 -monitor stdio -serial unix:/tmp/ttyS0,server,nowait

2.execute online/offline script inside guest
#!/bin/sh

SYS_CPU_DIR=/sys/devices/system/cpu

VICTIM_IRQ=15
IRQ_MASK=f0

iteration=0
while true; do
echo $iteration
echo $IRQ_MASK > /proc/irq/$VICTIM_IRQ/smp_affinity
for cpudir in $SYS_CPU_DIR/cpu[1-9]; do
echo 0 > $cpudir/online
done
sleep 8
for cpudir in $SYS_CPU_DIR/cpu[1-9]; do
echo 1 > $cpudir/online
done
iteration=`expr $iteration + 1`
done

or execute this script off-on.sh; while true;do sh off-on.sh;done 
echo 0 >/sys/devices/system/cpu/cpu1/online
cat /sys/devices/system/cpu/cpu1/online
echo 1 >/sys/devices/system/cpu/cpu1/online
sleep 3
echo 0 >/sys/devices/system/cpu/cpu2/online
cat /sys/devices/system/cpu/cpu2/online
echo 1 >/sys/devices/system/cpu/cpu2/online
sleep 3
echo 0 >/sys/devices/system/cpu/cpu3/online
cat /sys/devices/system/cpu/cpu3/online
echo 1 >/sys/devices/system/cpu/cpu3/online
sleep 3
echo 0 >/sys/devices/system/cpu/cpu4/online
cat /sys/devices/system/cpu/cpu4/online
echo 1 >/sys/devices/system/cpu/cpu4/online
sleep 4
echo 0 >/sys/devices/system/cpu/cpu5/online
echo 1 >/sys/devices/system/cpu/cpu5/online
sleep 4
echo 0 >/sys/devices/system/cpu/cpu6/online
echo 1 >/sys/devices/system/cpu/cpu6/online
sleep 4
echo 0 >/sys/devices/system/cpu/cpu7/online
echo 1 >/sys/devices/system/cpu/cpu7/online

3.

Actual results:
guest hang.

this is part of console messages:

: no hardware support
[   60.211623] kvm: no hardware support
[   61.110630] kvm: no hardware support
[   62.148648] kvm: no hardware support
[   62.943668] kvm: no hardware support
[   63.276006] INFO: rcu_sched detected stalls on CPUs/tasks: { 2 3 4 5 6 7} (detected by 1, t=90035 jiffies, g=2712, c=2711, q=551)
[   63.275006] Uhhuh. NMI received for unknown reason 20 on CPU 8.
[   63.275006] Do you have a strange power saving mode enabled?
[   63.275006] Dazed and confused, but trying to continue
[  315.196831] BUG: soft lockup - CPU#6 stuck for 22s! [migration/6:37]
[  315.255006] BUG: soft lockup - CPU#7 stuck for 22s! [migration/7:42]
[  115.080855] smpboot: CPU8: Not responding
[  169.826992] BUG: soft lockup - CPU#5 stuck for 23s! [migration/5:32]
[  169.930543] BUG: soft lockup - CPU#6 stuck for 23s! [migration/6:37]
[  170.004006] INFO: rcu_sched detected stalls on CPUs/tasks:[  170.004110] BUG: soft lockup - CPU#7 stuck for 23s! [migration/7:42]
[  197.695261] BUG: soft lockup - CPU#2 stuck for 23s! [migration/2:17]
[  197.719391] BUG: soft lockup - CPU#3 stuck for 23s! [migration/3:22

Expected results:
guest work well

Additional info:

Comment 2 Igor Mammedov 2014-03-10 12:40:43 UTC

*** This bug has been marked as a duplicate of bug 1073568 ***


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