Bug 121711
Summary: | BUG_ON in free_msi_irqs() | ||
---|---|---|---|
Product: | Drivers | Reporter: | eric |
Component: | PCI | Assignee: | drivers_pci (drivers_pci) |
Status: | NEW --- | ||
Severity: | normal | CC: | betaev, bjorn, bonzini, eric |
Priority: | P1 | ||
Hardware: | x86-64 | ||
OS: | Linux | ||
Kernel Version: | 4.6.2-1 | Subsystem: | |
Regression: | No | Bisected commit-id: |
Description
eric
2016-07-08 22:12:44 UTC
Do you always get the same backtrace? Yes, I always get the same message Please include your libvirt XML. <domain type='kvm'> <name>win7</name> <uuid>2849ebd5-3a67-47ad-99a7-3f7ab9642030</uuid> <memory unit='KiB'>16896000</memory> <currentMemory unit='KiB'>16896000</currentMemory> <memoryBacking> <hugepages/> </memoryBacking> <vcpu placement='static'>6</vcpu> <cputune> <vcpupin vcpu='0' cpuset='2'/> <vcpupin vcpu='1' cpuset='3'/> <vcpupin vcpu='2' cpuset='4'/> <vcpupin vcpu='3' cpuset='5'/> <vcpupin vcpu='4' cpuset='6'/> <vcpupin vcpu='5' cpuset='7'/> </cputune> <os> <type arch='x86_64' machine='pc-i440fx-2.4'>hvm</type> <loader readonly='yes' type='pflash'>/usr/share/edk2.git/ovmf-x64/OVMF_CODE-pure-efi.fd</loader> <nvram>/var/lib/libvirt/qemu/nvram/win7_VARS.fd</nvram> <bootmenu enable='yes'/> </os> <features> <acpi/> <apic/> <kvm> <hidden state='on'/> </kvm> <vmport state='off'/> </features> <cpu mode='host-passthrough'> <topology sockets='1' cores='3' threads='2'/> </cpu> <clock offset='utc'> <timer name='rtc' tickpolicy='catchup'/> <timer name='pit' tickpolicy='delay'/> <timer name='hpet' present='no'/> </clock> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> <pm> <suspend-to-mem enabled='no'/> <suspend-to-disk enabled='no'/> </pm> <devices> <emulator>/usr/sbin/qemu-system-x86_64</emulator> <disk type='block' device='disk'> <driver name='qemu' type='raw' cache='none' io='native'/> <source dev='/dev/sdb3'/> <target dev='vda' bus='virtio'/> <boot order='1'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/> </disk> <disk type='block' device='disk'> <driver name='qemu' type='raw' cache='none' io='native'/> <source dev='/dev/sdc1'/> <target dev='vdb' bus='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x0c' function='0x0'/> </disk> <disk type='block' device='disk'> <driver name='qemu' type='raw' cache='none' io='native'/> <source dev='/dev/sdc1'/> <target dev='vdb' bus='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x0c' function='0x0'/> </disk> <disk type='block' device='disk'> <driver name='qemu' type='raw' cache='none' io='native'/> <source dev='/dev/sdd1'/> <target dev='vdc' bus='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x0e' function='0x0'/> </disk> <disk type='block' device='disk'> <driver name='qemu' type='raw' cache='none' io='native'/> <source dev='/dev/sda2'/> <target dev='vdd' bus='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x10' function='0x0'/> </disk> <disk type='file' device='cdrom'> <driver name='qemu' type='raw'/> <source file='/home/eric/Downloads/virtio-win-0.1.112.iso'/> <target dev='hda' bus='ide'/> <readonly/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <controller type='pci' index='0' model='pci-root'/> <controller type='ide' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> </controller> <controller type='sata' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> </controller> <controller type='virtio-serial' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/> </controller> <controller type='virtio-serial' index='1'> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> </controller> <controller type='usb' index='0' model='nec-xhci'> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> </controller> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <hostdev mode='subsystem' type='pci' managed='yes'> <source> <address domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> </source> <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/> </hostdev> <hostdev mode='subsystem' type='pci' managed='yes'> <source> <address domain='0x0000' bus='0x01' slot='0x00' function='0x1'/> </source> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> </hostdev> <hostdev mode='subsystem' type='pci' managed='yes'> <source> <address domain='0x0000' bus='0x00' slot='0x1b' function='0x0'/> </source> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </hostdev> <hostdev mode='subsystem' type='pci' managed='yes'> <source> source> <address domain='0x0000' bus='0x03' slot='0x00' function='0x0'/> </source> <address type='pci' domain='0x0000' bus='0x00' slot='0x0d' function='0x0'/> </hostdev> <hostdev mode='subsystem' type='usb' managed='yes'> <source> <vendor id='0x0a12'/> <product id='0x0001'/> </source> </hostdev> <hostdev mode='subsystem' type='pci' managed='yes'> <source> <address domain='0x0000' bus='0x0a' slot='0x00' function='0x0'/> </source> <address type='pci' domain='0x0000' bus='0x00' slot='0x0b' function='0x0'/> </hostdev> <hostdev mode='subsystem' type='pci' managed='yes'> <source> <address domain='0x0000' bus='0x00' slot='0x1a' function='0x0'/> </source> <address type='pci' domain='0x0000' bus='0x00' slot='0x0f' function='0x0'/> </hostdev> <memballoon model='virtio'> <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/> </memballoon> </devices> </domain> I have the same issue while using Linux as guest OS. [377709.487563] ------------[ cut here ]------------ [377709.487570] WARNING: CPU: 3 PID: 13163 at /build/linux-9LouV5/linux-4.6.1/drivers/pci/msi.c:972 pci_enable_msix+0x3f5/0x440 [377709.487571] Modules linked in: ctr(E) ccm(E) vhost_net(E) vhost(E) macvtap(E) macvlan(E) tun(E) rfcomm(E) xt_CHECKSUM(E) ipt_MASQUERADE(E) nf_nat_masquerade_ipv4(E) ipt_REJECT(E) nf_reject_ipv4(E) binfmt_misc(E) bnep(E) vfio_pci(E) vfio_iommu_type1(E) vfio_virqfd(E) vfio(E) nfsd(E) auth_rpcgss(E) nfs_acl(E) nfs(E) lockd(E) grace(E) fscache(E) sunrpc(E) xt_mark(E) xt_conntrack(E) iptable_filter(E) xt_tcpudp(E) xt_DSCP(E) iptable_mangle(E) xt_nat(E) iptable_nat(E) nf_conntrack_ipv4(E) nf_defrag_ipv4(E) nf_nat_ipv4(E) nf_nat(E) nf_conntrack(E) ip_tables(E) x_tables(E) bridge(E) stp(E) llc(E) joydev(E) xpad(E) ff_memless(E) uas(E) usb_storage(E) btusb(E) btrtl(E) btbcm(E) btintel(E) bluetooth(E) hid_generic(E) cdc_acm(E) usbhid(E) hid(E) iTCO_wdt(E) iTCO_vendor_support(E) intel_rapl(E) x86_pkg_temp_thermal(E) [377709.487594] intel_powerclamp(E) kvm_intel(E) kvm(E) nls_utf8(E) irqbypass(E) crct10dif_pclmul(E) crc32_pclmul(E) b43(E) ghash_clmulni_intel(E) nls_cp437(E) ssb(E) mmc_core(E) rng_core(E) vfat(E) pcmcia(E) pcmcia_core(E) fat(E) hmac(E) eeepc_wmi(E) asus_wmi(E) sparse_keymap(E) drbg(E) ansi_cprng(E) snd_hda_codec_hdmi(E) aesni_intel(E) snd_hda_codec_realtek(E) snd_hda_codec_generic(E) aes_x86_64(E) lrw(E) gf128mul(E) glue_helper(E) ablk_helper(E) cryptd(E) arc4(E) pcspkr(E) psmouse(E) serio_raw(E) efi_pstore(E) efivars(E) ath9k(E) ath9k_common(E) ath9k_hw(E) i2c_i801(E) ath(E) sr_mod(E) cdrom(E) mac80211(E) sg(E) r8169(E) lpc_ich(E) cfg80211(E) mfd_core(E) mii(E) bcma(E) rfkill(E) snd_hda_intel(E) e1000e(E) snd_hda_codec(E) snd_hda_core(E) snd_hwdep(E) snd_pcm(E) snd_timer(E) snd(E) ptp(E) soundcore(E) [377709.487616] pps_core(E) mei_me(E) mei(E) ehci_pci(E) ehci_hcd(E) battery(E) xhci_pci(E) fjes(E) xhci_hcd(E) tpm_tis(E) tpm(E) usbcore(E) shpchp(E) ie31200_edac(E) usb_common(E) edac_core(E) evdev(E) processor(E) nct6775(E) hwmon_vid(E) coretemp(E) fuse(E) autofs4(E) ext4(E) crc16(E) jbd2(E) crc32c_generic(E) mbcache(E) dm_mod(E) pci_stub(E) sd_mod(E) mxm_wmi(E) crc32c_intel(E) ahci(E) libahci(E) libata(E) scsi_mod(E) fan(E) thermal(E) i915(E) video(E) wmi(E) button(E) i2c_algo_bit(E) drm_kms_helper(E) drm(E) [377709.487634] CPU: 3 PID: 13163 Comm: qemu-system-x86 Tainted: G E 4.6.0-0.bpo.1-amd64 #1 Debian 4.6.1-1~bpo8+1 [377709.487635] Hardware name: System manufacturer System Product Name/P8Z77-V DELUXE, BIOS 1206 06/05/2012 [377709.487636] 0000000000000286 000000001563c38f ffffffff813123c5 0000000000000000 [377709.487638] 0000000000000000 ffffffff8107af94 ffff8804bbce2000 ffff8804ba83fde0 [377709.487640] ffff8804bbce2000 0000000000000001 0000000000000001 ffff8804ba83fde0 [377709.487641] Call Trace: [377709.487645] [<ffffffff813123c5>] ? dump_stack+0x5c/0x77 [377709.487648] [<ffffffff8107af94>] ? __warn+0xc4/0xe0 [377709.487650] [<ffffffff813799a5>] ? pci_enable_msix+0x3f5/0x440 [377709.487651] [<ffffffff81379a17>] ? pci_enable_msix_range+0x27/0x50 [377709.487655] [<ffffffffc0c72a76>] ? vfio_pci_set_msi_trigger+0x206/0x2e0 [vfio_pci] [377709.487657] [<ffffffffc0c713e6>] ? vfio_pci_ioctl+0x336/0xc20 [vfio_pci] [377709.487660] [<ffffffff81205379>] ? do_vfs_ioctl+0x99/0x5d0 [377709.487662] [<ffffffff811f1c93>] ? vfs_write+0x143/0x190 [377709.487663] [<ffffffff81205926>] ? SyS_ioctl+0x76/0x90 [377709.487666] [<ffffffff815c83b6>] ? system_call_fast_compare_end+0xc/0x96 [377709.487668] ---[ end trace 3869d0e51eb8a703 ]--- [377709.487712] ------------[ cut here ]------------ [377709.487733] kernel BUG at /build/linux-9LouV5/linux-4.6.1/drivers/pci/msi.c:368! [377709.487756] invalid opcode: 0000 [#1] SMP [377709.487772] Modules linked in: ctr(E) ccm(E) vhost_net(E) vhost(E) macvtap(E) macvlan(E) tun(E) rfcomm(E) xt_CHECKSUM(E) ipt_MASQUERADE(E) nf_nat_masquerade_ipv4(E) ipt_REJECT(E) nf_reject_ipv4(E) binfmt_misc(E) bnep(E) vfio_pci(E) vfio_iommu_type1(E) vfio_virqfd(E) vfio(E) nfsd(E) auth_rpcgss(E) nfs_acl(E) nfs(E) lockd(E) grace(E) fscache(E) sunrpc(E) xt_mark(E) xt_conntrack(E) iptable_filter(E) xt_tcpudp(E) xt_DSCP(E) iptable_mangle(E) xt_nat(E) iptable_nat(E) nf_conntrack_ipv4(E) nf_defrag_ipv4(E) nf_nat_ipv4(E) nf_nat(E) nf_conntrack(E) ip_tables(E) x_tables(E) bridge(E) stp(E) llc(E) joydev(E) xpad(E) ff_memless(E) uas(E) usb_storage(E) btusb(E) btrtl(E) btbcm(E) btintel(E) bluetooth(E) hid_generic(E) cdc_acm(E) usbhid(E) hid(E) iTCO_wdt(E) iTCO_vendor_support(E) intel_rapl(E) x86_pkg_temp_thermal(E) [377709.488042] intel_powerclamp(E) kvm_intel(E) kvm(E) nls_utf8(E) irqbypass(E) crct10dif_pclmul(E) crc32_pclmul(E) b43(E) ghash_clmulni_intel(E) nls_cp437(E) ssb(E) mmc_core(E) rng_core(E) vfat(E) pcmcia(E) pcmcia_core(E) fat(E) hmac(E) eeepc_wmi(E) asus_wmi(E) sparse_keymap(E) drbg(E) ansi_cprng(E) snd_hda_codec_hdmi(E) aesni_intel(E) snd_hda_codec_realtek(E) snd_hda_codec_generic(E) aes_x86_64(E) lrw(E) gf128mul(E) glue_helper(E) ablk_helper(E) cryptd(E) arc4(E) pcspkr(E) psmouse(E) serio_raw(E) efi_pstore(E) efivars(E) ath9k(E) ath9k_common(E) ath9k_hw(E) i2c_i801(E) ath(E) sr_mod(E) cdrom(E) mac80211(E) sg(E) r8169(E) lpc_ich(E) cfg80211(E) mfd_core(E) mii(E) bcma(E) rfkill(E) snd_hda_intel(E) e1000e(E) snd_hda_codec(E) snd_hda_core(E) snd_hwdep(E) snd_pcm(E) snd_timer(E) snd(E) ptp(E) soundcore(E) [377709.488309] pps_core(E) mei_me(E) mei(E) ehci_pci(E) ehci_hcd(E) battery(E) xhci_pci(E) fjes(E) xhci_hcd(E) tpm_tis(E) tpm(E) usbcore(E) shpchp(E) ie31200_edac(E) usb_common(E) edac_core(E) evdev(E) processor(E) nct6775(E) hwmon_vid(E) coretemp(E) fuse(E) autofs4(E) ext4(E) crc16(E) jbd2(E) crc32c_generic(E) mbcache(E) dm_mod(E) pci_stub(E) sd_mod(E) mxm_wmi(E) crc32c_intel(E) ahci(E) libahci(E) libata(E) scsi_mod(E) fan(E) thermal(E) i915(E) video(E) wmi(E) button(E) i2c_algo_bit(E) drm_kms_helper(E) drm(E) [377709.488483] CPU: 3 PID: 13163 Comm: qemu-system-x86 Tainted: G W E 4.6.0-0.bpo.1-amd64 #1 Debian 4.6.1-1~bpo8+1 [377709.488515] Hardware name: System manufacturer System Product Name/P8Z77-V DELUXE, BIOS 1206 06/05/2012 [377709.488544] task: ffff880481f79080 ti: ffff880006c58000 task.ti: ffff880006c58000 [377709.488568] RIP: 0010:[<ffffffff81379472>] [<ffffffff81379472>] free_msi_irqs+0x52/0x190 [377709.488596] RSP: 0018:ffff880006c5bcf8 EFLAGS: 00010286 [377709.488614] RAX: ffff8803cb170c00 RBX: 0000000000000000 RCX: 0000000000000000 [377709.488636] RDX: 0000000000000000 RSI: 000000000000002e RDI: 0000000000000000 [377709.488659] RBP: ffff8804ae0e9080 R08: 0000000000000001 R09: ffff8807df000000 [377709.488681] R10: ffff8807df000198 R11: 0000000000000000 R12: ffff8804bbce2298 [377709.488705] R13: ffff8804bbce2000 R14: 0000000000000001 R15: ffff8804ba83fde0 [377709.488728] FS: 00007f185ffff700(0000) GS:ffff8807fecc0000(0000) knlGS:0000000000000000 [377709.488752] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [377709.488772] CR2: 00007f509bf758d3 CR3: 000000048ce5a000 CR4: 00000000001426e0 [377709.488794] Stack: [377709.488803] ffff8804bbce2000 0000000000000001 ffffc9001b2b0000 0000000000000001 [377709.488830] 0000000000000001 ffffffff81379982 ffff880400000008 0000000000000001 [377709.488857] ffff8804bbce2298 000020000007bd78 000000001563c38f 0000000000000001 [377709.488885] Call Trace: [377709.488896] [<ffffffff81379982>] ? pci_enable_msix+0x3d2/0x440 [377709.488916] [<ffffffff81379a17>] ? pci_enable_msix_range+0x27/0x50 [377709.488937] [<ffffffffc0c72a76>] ? vfio_pci_set_msi_trigger+0x206/0x2e0 [vfio_pci] [377709.488962] [<ffffffffc0c713e6>] ? vfio_pci_ioctl+0x336/0xc20 [vfio_pci] [377709.488985] [<ffffffff81205379>] ? do_vfs_ioctl+0x99/0x5d0 [377709.489003] [<ffffffff811f1c93>] ? vfs_write+0x143/0x190 [377709.489022] [<ffffffff81205926>] ? SyS_ioctl+0x76/0x90 [377709.489041] [<ffffffff815c83b6>] ? system_call_fast_compare_end+0xc/0x96 [377709.489063] Code: c0 74 2a 8b 55 14 85 d2 74 23 31 db eb 0b 83 c3 01 3b 5d 14 73 17 8b 45 10 8d 3c 18 e8 c8 66 d5 ff 48 83 b8 a0 00 00 00 00 74 e3 <0f> 0b 48 8b 6d 00 49 39 ec 75 c6 49 8b bd 88 02 00 00 48 85 ff [377709.489201] RIP [<ffffffff81379472>] free_msi_irqs+0x52/0x190 [377709.489222] RSP <ffff880006c5bcf8> [377709.496307] ---[ end trace 3869d0e51eb8a704 ]--- And this reproduces only on one VM of two. The second one is configured in similar way except that it uses AMD video card for passthrough and open source drivers. The machine which hangs uses nVidia card (GTX760) with proprietary drivers. (In reply to Alexander from comment #6) I am using pass through with my nvidia 980ti. I wonder if the nvidia cards are part of the problem. Additionally I noticed that guest machine hangs only in the following scenario: 1. Start VM 2. Force to destroy VM on any stage 3. Start VM again If VM was shut down gracefully it will not hang. Looks like this issue is somehow related to system shutdown procedure. This stack trace appears on host only when kernel is loaded by boot loader (Grub) or may be when nVidia driver is loaded. Before that (if VM was forcibly destroyed) OVMF screen hangs for several minutes. I will try to destroy VM with blacklisted nvidia driver to see if error will disappear. |