Bug 672133

Summary: RHEL6 qemu/kvm host c-states causing guest virtio soft-lockups
Product: Red Hat Enterprise Linux 6 Reporter: Mark Goodwin <mgoodwin>
Component: qemu-kvmAssignee: Gleb Natapov <gleb>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: urgent    
Version: 6.0CC: jwest, knoel, mfuruta, mkenneth, tatsu-ab1, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-02-22 06:05:45 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Mark Goodwin 2011-01-24 04:40:29 UTC
Description of problem:

qemu/kvm deep sleep state (c3) seems to be causing guest virtio-blk
softlockups, as follows :

      kernel: BUG: soft lockup - CPU#1 stuck for 16s! [swapper:0] 
      kernel: 
      kernel: Pid: 0, comm: swapper 
      kernel: EIP: 0060:[<c0403be1>] CPU: 1 
      kernel: EIP is at default_idle+0x31/0x59 
      kernel: EFLAGS: 00000246 Not tainted (2.6.18-194.el5 #1) 
      kernel: EAX: 00000000 EBX: 00000001 ECX: c0403bb0 EDX: f7d4a000 
      kernel: ESI: 000084f4 EDI: 00000000 EBP: 00000000 DS: 007b ES: 007b 
      kernel: CR0: 8005003b CR2: bfec2ee4 CR3: 01bb3000 CR4: 00000690 
      kernel: [<c0403ca8>] cpu_idle+0x9f/0xb9 
      kernel: ======================= 

This may be related to BZ 609286, except that BZ deals with s-states
(suspend). Either way, the upstream work mentioned in BZ 609286 is
probably relevant.

Workarounds: set processor.max_cstate=1 on the KVM host, or boot with
the tickless feature turned off (nohz=off).

Version-Release number of selected component (if applicable):
Host: RHEL6.0 GA with qemu-kvm-0.12.1.2-2.113.el6.x86_64
Guest: RHEL5.5 GA, kernel version: 2.6.18-194.EL5

How reproducible:
only sometimes - 10% only

Steps to Reproduce: (paste from support case)
- Host
1. Install RHEL6
2. Boot RHEL6
3. Start to Virtual Machine Manager, and add to guest.
4. Install RHEL5.5 as guest OS.
- Guest
1. Shutdown RHEL5.5
2. Display details of virtual hardware on KVM menu
3. Puch "Add Hardware" button
4. Select "Storage" as hardware type, and set new storage device about 10GB
* Change to "none" from "default" on cashmode
5. Display Graphical console
6. Reboot RHEL5.5
7. Mount the storage device set in 4. and optional directory
(ex) # mount /dev/hda1 /b
8. Make file with dd command as follows
(ex) # dd if=/dev/zero of=/b/f000/file bs=2048b count=8192
9. After read file made in 8. with dd command,
measure read time with time command as follows,
and repeat from 10 to 15 times this operation
(ex) # time -p sh -c 'dd if=/b/f000 of=/dev/null bs=2048b count=8192& wait'

Actual results:
Softlockup occurs on the guest when the reading file, guest hangs

Expected results:
No softlockup

Additional info:

Comment 3 Gleb Natapov 2011-01-27 19:02:16 UTC
So does guest hangs (as in totally dead, not responding any more...), or just softlockup message is displayed and guest continues running? Also host HW information is missing.

Comment 10 Gleb Natapov 2011-02-22 06:05:45 UTC
Soft lockupus are not bugs in virtual environment. Closing as NOTABUG since I do not get response from bug reporter. Please reopen If guest hangs completely.