libvirtd Tainted: kobject_add_internal failed for emu10k1-synth-0-1 with -EEXIST, don't try to register things with the same name in the same directory.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
After passing through the PCIe card EMU 1212m to a VM (kvm/qemu) and turning the VM off, I see this in dmesg:
[ 4675.188761] snd_emu10k1 0000:05:04.0: non-passthrough IOMMU detected, widening DMA allocations
[ 4675.188874] snd_emu10k1 0000:05:04.0: emu1010: Special config.
[ 4675.189019] snd_emu10k1 0000:05:04.0: emu1010: EMU_HANA_ID = 0x3f
[ 4680.350820] snd_emu10k1 0000:05:04.0: emu1010: Hana Firmware loaded
[ 4680.350878] snd_emu10k1 0000:05:04.0: emu1010: Hana version: 1.6
[ 4680.350948] snd_emu10k1 0000:05:04.0: emu1010: Card options = 0x1
[ 4680.350977] snd_emu10k1 0000:05:04.0: emu1010: Card options = 0x1
[ 4680.351583] snd_emu10k1 0000:05:04.0: emu1010: Card options3 = 0x1
[ 4680.377334] snd_emu10k1 0000:05:04.0: Audigy2 value: Special config.
[ 4680.377972] snd_emu10k1 0000:05:04.0: EMU outputs on
[ 4680.377972] snd_emu10k1 0000:05:04.0: EMU2 inputs on
[ 4680.392669] sysfs: cannot create duplicate filename '/devices/
[ 4680.392672] CPU: 10 PID: 5204 Comm: libvirtd Tainted: G OE 5.4.0-40-generic #44-Ubuntu
[ 4680.392673] Hardware name: System manufacturer System Product Name/ROG STRIX X570-E GAMING, BIOS 1409 05/12/2020
[ 4680.392674] Call Trace:
[ 4680.392681] dump_stack+
[ 4680.392684] sysfs_warn_
[ 4680.392685] sysfs_create_
[ 4680.392687] kobject_
[ 4680.392688] kobject_
[ 4680.392692] device_
[ 4680.392696] snd_seq_
[ 4680.392702] __snd_device_
[ 4680.392706] snd_device_
[ 4680.392709] snd_card_
[ 4680.392712] ? snd_hwdep_
[ 4680.392715] snd_emux_
[ 4680.392717] snd_emux_
[ 4680.392719] ? 0xffffffffc1065000
[ 4680.392721] ? sf_sample_
[ 4680.392723] snd_emu10k1_
[ 4680.392725] really_
[ 4680.392726] driver_
[ 4680.392728] __device_
[ 4680.392729] ? driver_
[ 4680.392731] bus_for_
[ 4680.392732] __device_
[ 4680.392734] device_
[ 4680.392735] bus_probe_
[ 4680.392737] device_
[ 4680.392740] ? __snd_device_
[ 4680.392742] snd_seq_
[ 4680.392745] __snd_device_
[ 4680.392748] snd_device_
[ 4680.392751] snd_card_
[ 4680.392753] ? snd_seq_
[ 4680.392758] snd_card_
[ 4680.392761] local_pci_
[ 4680.392763] pci_device_
[ 4680.392765] really_
[ 4680.392766] driver_
[ 4680.392767] __device_
[ 4680.392769] ? driver_
[ 4680.392770] bus_for_
[ 4680.392771] __device_
[ 4680.392773] device_
[ 4680.392775] bus_rescan_
[ 4680.392777] drivers_
[ 4680.392778] bus_attr_
[ 4680.392780] sysfs_kf_
[ 4680.392782] kernfs_
[ 4680.392784] __vfs_write+
[ 4680.392785] vfs_write+
[ 4680.392786] ksys_write+
[ 4680.392788] __x64_sys_
[ 4680.392790] do_syscall_
[ 4680.392793] entry_SYSCALL_
[ 4680.392794] RIP: 0033:0x7f52456222cf
[ 4680.392795] Code: 89 54 24 18 48 89 74 24 10 89 7c 24 08 e8 29 fd ff ff 48 8b 54 24 18 48 8b 74 24 10 41 89 c0 8b 7c 24 08 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 2d 44 89 c7 48 89 44 24 08 e8 5c fd ff ff 48
[ 4680.392796] RSP: 002b:00007f5202
[ 4680.392798] RAX: ffffffffffffffda RBX: 000000000000000c RCX: 00007f52456222cf
[ 4680.392799] RDX: 000000000000000c RSI: 00007f5230062f50 RDI: 0000000000000019
[ 4680.392800] RBP: 00007f5230062f50 R08: 0000000000000000 R09: 0000000000000000
[ 4680.392800] R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000019
[ 4680.392801] R13: 0000000000000019 R14: 0000000000000000 R15: 00007f5245b3ef70
[ 4680.392803] kobject_
[ 4680.392812] snd_emu10k1_synth: probe of emu10k1-synth-0-1 failed with error -12
[ 4680.392816] BUG: kernel NULL pointer dereference, address: 0000000000000030
[ 4680.392817] #PF: supervisor write access in kernel mode
[ 4680.392818] #PF: error_code(0x0002) - not-present page
[ 4680.392819] PGD 0 P4D 0
[ 4680.392821] Oops: 0002 [#1] SMP NOPTI
[ 4680.392823] CPU: 10 PID: 5204 Comm: libvirtd Tainted: G OE 5.4.0-40-generic #44-Ubuntu
[ 4680.392825] Hardware name: System manufacturer System Product Name/ROG STRIX X570-E GAMING, BIOS 1409 05/12/2020
[ 4680.392827] RIP: 0010:klist_
[ 4680.392829] Code: ff ff 7f 77 0f 39 c8 7f 0b f0 0f b1 0f 75 e8 48 89 56 08 c3 e9 d4 70 01 00 eb f4 0f 1f 44 00 00 48 89 f8 48 8d 56 08 48 89 f7 <48> 89 56 08 48 89 56 10 c7 46 18 01 00 00 00 48 89 06 a8 01 75 15
[ 4680.392830] RSP: 0018:ffff960542
[ 4680.392831] RAX: ffff8a8472606f00 RBX: 0000000000000028 RCX: 0000000000000000
[ 4680.392832] RDX: 0000000000000030 RSI: 0000000000000028 RDI: 0000000000000028
[ 4680.392833] RBP: ffff960542897af8 R08: 0000000000000000 R09: ffff960542897940
[ 4680.392834] R10: 0000000000000000 R11: 0000000000000001 R12: ffff8a8472606f00
[ 4680.392835] R13: ffff8a84b8c2b520 R14: 0000000000000000 R15: 0000000000000000
[ 4680.392837] FS: 00007f520236270
[ 4680.392838] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 4680.392839] CR2: 0000000000000030 CR3: 00000007c0da8000 CR4: 0000000000340ee0
[ 4680.392840] Call Trace:
[ 4680.392843] ? klist_add_
[ 4680.392845] device_
[ 4680.392848] ? __snd_device_
[ 4680.392851] snd_seq_
[ 4680.392854] __snd_device_
[ 4680.392857] snd_device_
[ 4680.392861] snd_card_
[ 4680.392863] ? snd_seq_
[ 4680.392867] snd_card_
[ 4680.392869] local_pci_
[ 4680.392872] pci_device_
[ 4680.392873] really_
[ 4680.392875] driver_
[ 4680.392877] __device_
[ 4680.392878] ? driver_
[ 4680.392880] bus_for_
[ 4680.392882] __device_
[ 4680.392884] device_
[ 4680.392886] bus_rescan_
[ 4680.392888] drivers_
[ 4680.392890] bus_attr_
[ 4680.392891] sysfs_kf_
[ 4680.392893] kernfs_
[ 4680.392895] __vfs_write+
[ 4680.392897] vfs_write+
[ 4680.392898] ksys_write+
[ 4680.392900] __x64_sys_
[ 4680.392902] do_syscall_
[ 4680.392904] entry_SYSCALL_
[ 4680.392906] RIP: 0033:0x7f52456222cf
[ 4680.392907] Code: 89 54 24 18 48 89 74 24 10 89 7c 24 08 e8 29 fd ff ff 48 8b 54 24 18 48 8b 74 24 10 41 89 c0 8b 7c 24 08 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 2d 44 89 c7 48 89 44 24 08 e8 5c fd ff ff 48
[ 4680.392908] RSP: 002b:00007f5202
[ 4680.392909] RAX: ffffffffffffffda RBX: 000000000000000c RCX: 00007f52456222cf
[ 4680.392910] RDX: 000000000000000c RSI: 00007f5230062f50 RDI: 0000000000000019
[ 4680.392911] RBP: 00007f5230062f50 R08: 0000000000000000 R09: 0000000000000000
[ 4680.392912] R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000019
[ 4680.392913] R13: 0000000000000019 R14: 0000000000000000 R15: 00007f5245b3ef70
[ 4680.392915] Modules linked in: vhost_net vhost tap rfcomm vmnet(OE) vmw_vsock_
[ 4680.392945] snd_timer iwlwifi cryptd eeepc_wmi snd ecdh_generic asus_wmi drm_kms_helper ecc sparse_keymap glue_helper video fb_sys_fops syscopyarea sysfillrect mxm_wmi wmi_bmof k10temp ccp cfg80211 sysimgblt soundcore mac_hid sch_fq_codel nct6775 hwmon_vid lm92 parport_pc ppdev lp parport drm ip_tables x_tables autofs4 btrfs zstd_compress raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c raid1 raid0 multipath linear hid_logitech_hidpp hid_logitech_dj uas usb_storage hid_generic usbhid hid crc32_pclmul igb i2c_algo_bit nvme i2c_piix4 dca nvme_core wmi
[ 4680.392971] CR2: 0000000000000030
[ 4680.392973] ---[ end trace ed550ca7ec98e5dc ]---
[ 4680.392975] RIP: 0010:klist_
[ 4680.392977] Code: ff ff 7f 77 0f 39 c8 7f 0b f0 0f b1 0f 75 e8 48 89 56 08 c3 e9 d4 70 01 00 eb f4 0f 1f 44 00 00 48 89 f8 48 8d 56 08 48 89 f7 <48> 89 56 08 48 89 56 10 c7 46 18 01 00 00 00 48 89 06 a8 01 75 15
[ 4680.392978] RSP: 0018:ffff960542
[ 4680.392979] RAX: ffff8a8472606f00 RBX: 0000000000000028 RCX: 0000000000000000
[ 4680.392980] RDX: 0000000000000030 RSI: 0000000000000028 RDI: 0000000000000028
[ 4680.392981] RBP: ffff960542897af8 R08: 0000000000000000 R09: ffff960542897940
[ 4680.392982] R10: 0000000000000000 R11: 0000000000000001 R12: ffff8a8472606f00
[ 4680.392983] R13: ffff8a84b8c2b520 R14: 0000000000000000 R15: 0000000000000000
[ 4680.392984] FS: 00007f520236270
[ 4680.392985] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 4680.392986] CR2: 0000000000000030 CR3: 00000007c0da8000 CR4: 0000000000340ee0
The card no longer works, and I have to kill the power to my PC and wait a few minutes before turning it back on for it to work again.
ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: libvirt-daemon 6.0.0-0ubuntu8.1
ProcVersionSign
Uname: Linux 5.4.0-40-generic x86_64
ApportVersion: 2.20.11-0ubuntu27.3
Architecture: amd64
CasperMD5CheckR
CurrentDesktop: ubuntu:GNOME
Date: Fri Jul 3 14:43:10 2020
InstallationDate: Installed on 2020-06-16 (17 days ago)
InstallationMedia: Ubuntu 20.04 LTS "Focal Fossa" - Release amd64 (20200423)
ProcEnviron:
TERM=xterm-
PATH=(custom, no user)
XDG_RUNTIME_
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: libvirt
UpgradeStatus: No upgrade log present (probably fresh install)
modified.
modified.
modified.
modified.
modified.
modified.
modified.
modified.
modified.
modified.
modified.
modified.
modified.
modified.
modified.
modified.
modified.
modified.
modified.
modified.
---
ProblemType: Bug
ApportVersion: 2.20.11-0ubuntu27.3
Architecture: amd64
AudioDevicesInUse:
USER PID ACCESS COMMAND
/dev/snd/
/dev/snd/
/dev/snd/
CasperMD5CheckR
CurrentDesktop: ubuntu:GNOME
DistroRelease: Ubuntu 20.04
InstallationDate: Installed on 2020-06-16 (23 days ago)
InstallationMedia: Ubuntu 20.04 LTS "Focal Fossa" - Release amd64 (20200423)
MachineType: System manufacturer System Product Name
Package: linux (not installed)
ProcEnviron:
TERM=xterm-
PATH=(custom, no user)
XDG_RUNTIME_
LANG=en_US.UTF-8
SHELL=/bin/bash
ProcFB: 0 amdgpudrmfb
ProcKernelCmdLine: BOOT_IMAGE=
ProcVersionSign
RelatedPackageV
linux-
linux-
linux-firmware 1.187.1
Tags: focal
Uname: Linux 5.4.0-40-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm audio cdrom dip libvirt lpadmin lxd plugdev pulse pulse-access sambashare sudo video
_MarkForUpload: True
dmi.bios.date: 07/01/2020
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 2407
dmi.board.
dmi.board.name: ROG STRIX X570-E GAMING
dmi.board.vendor: ASUSTeK COMPUTER INC.
dmi.board.version: Rev X.0x
dmi.chassis.
dmi.chassis.type: 3
dmi.chassis.vendor: Default string
dmi.chassis.
dmi.modalias: dmi:bvnAmerican
dmi.product.family: To be filled by O.E.M.
dmi.product.name: System Product Name
dmi.product.sku: SKU
dmi.product.
dmi.sys.vendor: System manufacturer
Thank you for taking the time to report this bug and helping to make Ubuntu better.
Am I right in understanding that this is a host kernel oops? My understanding of PCIe passthrough is that if you're passing through your sound card to a VM then the host kernel's sound driver should never crash, so this sounds like a kernel bug to me. My reasoning is that either the host kernel should not permit passthrough if the sound driver is using the card, or it should correctly reset the card before taking it over again afterwards.
If this is wrong then presumably this is a qemu bug? For people who know more about this area, feel free to explain and reassign. But to make progress for now, I'm reassigning this bug to the kernel.