Wind River Support Network

HomeDefectsOVP8-482
Fixed

OVP8-482 : 'BUG: sleeping function called from invalid context' when starting QEMU

Created: May 15, 2019    Updated: Dec 23, 2019
Resolved Date: Jul 16, 2019
Found In Version: 8.0.0.20
Fix Version: 8.0.0.31
Severity: Standard
Applicable for: Wind River Linux 8
Component/s: Kernel

Description

  The customer started QEMU in WRL8 with allow_unsafe_assigned_interrupts enabled, when QEMU was booting, kernel reports the following dump. might_sleep gets called when preemption is disabled. The issue can be always reproduced on the customer board.

[   74.736147] BUG: sleeping function called from invalid context at /build-project/bitbake_build/tmp/work-shared/intel-x86-64/kernel-source/kernel/locking/rtmutex.c:917
[   74.736147] in_atomic(): 1, irqs_disabled(): 1, pid: 6058, name: qemu-system-x86
[   74.736172] Preemption disabled at:[<ffffffffa11b1bcf>] kvm_deassign_irq+0x19f/0x1d0 [kvm]

[   74.736175] CPU: 2 PID: 6058 Comm: qemu-system-x86 Tainted: G        W  O    4.1.27-rt30-WR8.0.0.20_ovp #1
[   74.736175] Hardware name: Juniper Networks, Inc. 051A       /HSW RE MX  , BIOS REH_P_MTR1_00.30.05 06/15/2017
[   74.736178]  0000000000000000 ffff881fe2b6fb68 ffffffff819bbeae 0000000000000000
[   74.736179]  ffff881fe28f0000 ffff881fe2b6fb88 ffffffff81081617 ffff881fe88ec348
[   74.736180]  ffff881fe88ec098 ffff881fe2b6fba8 ffffffff819c1ef4 ffff881fe88ec000
[   74.736181] Call Trace:
[   74.736186]  [<ffffffff819bbeae>] dump_stack+0x4f/0x65
[   74.736188]  [<ffffffff81081617>] ___might_sleep+0xe7/0x170
[   74.736190]  [<ffffffff819c1ef4>] rt_spin_lock+0x24/0x60
[   74.736194]  [<ffffffff8159e304>] devres_find+0x44/0xd0
[   74.736197]  [<ffffffff81490287>] pci_intx+0x87/0xb0
[   74.736210]  [<ffffffffa11b1bda>] kvm_deassign_irq+0x1aa/0x1d0 [kvm]
[   74.736221]  [<ffffffffa11b22ea>] kvm_vm_ioctl_assigned_device+0x40a/0x1120 [kvm]
[   74.736225]  [<ffffffff8146aeb7>] ? debug_smp_processor_id+0x17/0x20
[   74.736237]  [<ffffffffa118999b>] kvm_arch_vm_ioctl+0x2fb/0xbf0 [kvm]
[   74.736238]  [<ffffffff81081358>] ? migrate_enable+0xb8/0x1f0
[   74.736241]  [<ffffffff815a5506>] ? __pm_runtime_idle+0x76/0xa0
[   74.736244]  [<ffffffff81492ef4>] ? pci_config_pm_runtime_put+0x34/0x40
[   74.736253]  [<ffffffffa117938a>] kvm_vm_ioctl+0x8a/0x800 [kvm]
[   74.736254]  [<ffffffff810816ed>] ? __might_sleep+0x4d/0x90
[   74.736256]  [<ffffffff811bdbae>] do_vfs_ioctl+0x30e/0x590
[   74.736259]  [<ffffffff811c8d02>] ? __fget+0x72/0xb0
[   74.736260]  [<ffffffff811bdeb1>] SyS_ioctl+0x81/0xa0
[   74.736263]  [<ffffffff819c245b>] system_call_fastpath+0x16/0x6e
[   76.979697] kvm: zapping shadow pages for mmio generation wraparound

Steps to Reproduce

1.load kvm modules
modprobe kvm allow_unsafe_assigned_interrupts=1
modprobe kvm_intel enable_apicv=N

2.start QEMU
/usr/bin/qemu-system-x86_64 -name vjunos -S -machine pc-i440fx-2.4,accel=kvm,usb=off -cpu Haswell-noTSX,+abm,+pdpe1gb,+rdrand,+f16c,+osxsave,+dca,+pdcm,+xtpr,+tm2,+est,+smx,+vmx,+ds_cpl,+monitor,+dtes64,+pbe,+tm,+ht,+ss,+acpi,+ds,+vme -m 49152 -realtime mlock=on -smp 4,sockets=4,cores=1,threads=1 -object iothread,id=iothread1 -object iothread,id=iothread2 -uuid 059fd614-bfa5-4d57-aef7-3f61d27dcd58 -nographic -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/domain-vjunos/monitor.sock,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -boot strict=on -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x17 -netdev tap,fd=24,id=hostnet0,vhost=on,vhostfd=26 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=30:b6:4f:94:9b:31,bus=pci.0,addr=0x11 -netdev tap,ifname=tap1,script=/etc/vehostd/jnpr-vjunos-em3-ifup,id=hostnet1,vhost=on,vhostfd=27 -device virtio-net-pci,netdev=hostnet1,id=net1,mac=52:54:00:98:dc:a0,bus=pci.0,addr=0x12 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -chardev tty,id=charserial1,path=/dev/ttyS2 -device isa-serial,chardev=charserial1,id=serial1 -device i6300esb,id=watchdog0,bus=pci.0,addr=0x10 -watchdog-action reset -smbios type=0,vendor="INSYDE Corp.",version=REH_P_MTR1_00.30.05,date=06/15/2017,release=1.00 -smbios type=1,manufacturer=JUNIPER,product=RE-SRX-2X00x6,version=REH_P_MTR1_00.30.05,serial=VF-NET -device kvm-pci-assign,host=0000:00:1f.3 -device kvm-pci-assign,host=0000:09:0d.0 -device kvm-pci-assign,host=0000:09:0e.0 -device kvm-pci-assign,host=0000:00:14.0 -device kvm-pci-assign,host=0000:05:0a.0 -device kvm-pci-assign,host=0000:01:10.1 -device pci-hgcommdev,vmindex=0,bus=pci.0,addr=0x16 -machine dump-guest-core=off -drive file=/junos/jinstall-current.img,if=none,id=drive-virtio-disk0,format=raw,cache=directsync,aio=native -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x13,drive=drive-virtio-disk0,id=virtio-disk0,config-wce=off,iothread=iothread1,bootindex=1 -drive file=/junos/vjunos-var-config.img,if=none,id=drive-virtio-disk1,format=raw,cache=directsync,aio=native -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x15,drive=drive-virtio-disk1,id=virtio-disk1,config-wce=off,iothread=iothread2,bootindex=-1 -drive file=/junos/vjunos-aux-disk.img,if=none,id=drive-ide0-0-1,format=raw,cache=directsync,discard=unmap -device ide-hd,bus=ide.0,unit=1,drive=drive-ide0-0-1,id=ide0-0-1,bootindex=-1 -msg timestamp=on
Live chat
Online