Discussion:
Bug#688964: qemu-kvm: Fedora 17 guest hangs on boot with soft lockup in udevd
(too old to reply)
Nikolai Kondrashov
2012-09-27 14:40:02 UTC
Permalink
Package: qemu-kvm
Version: 1.1.2+dfsg-2
Severity: important

A fully-updated 64-bit Fedora 17 guest using the 3.5.4-1.fc17.x86_64 kernel
hangs on boot with the following repeated messages on the console:

BUG: soft lockup - CPU#0 stuck for 22s! [udevd:417]

It boots at least with 1.1.0+dfsg-3.
The 1.1.1+dfsg-1 breaks it.

The qemu-kvm was being controlled by virt-manager.

Trying to bisect it with git, skipping merged commits, which don't have the
"debian" directory, produced the following list of commits which could be
breaking it:

dbe4ac16bbab4c237ff54132968accad4f5a4757
f63e60327b8e239ae97fa71060940ca20a8bf38e
02fe741375d4993b3d6870ff6466cc775b409ba1
0ec39075710ae15acc2a5825cd21e0c229fa04af
1658e3cd893e3a35d89388fdd736a6d81cb405e8
ee7735fa639c43ccb3746d84609332e48e22479f
065436479b9164b51892dbd7a7e35a3f9f496894
0da4c073228c645a0366f3fe801df072cf268482
70d582074f0b9485ad9800f8e0126ef68608ba85
f6db26e4f8fe6d80e17aa62e6bcc465e323a7fee
4c45bf61d315316b5932051551c16b17cf9b3d85
c49dd1bf6450b7880972b2f176ec10e8a496073c
b4fcb4b4995b292b6013600af78d37416c6ebb34
c9c2479289fd1faf4a1a40db54cc255fbf03af21
7672b714b28e3d49f73c605873404bf6f644c2b2
feba8ae20b372115bc15432d7c484171c25bee62
7d440f20bda8658fe16bdfe9c41c689764c50248
ca09717e8e0664801522781962a3c727d04eef33
0cc21de484d4f00c7b7cacb487bd343cc55effa5
845685265756467050859e2359acf16321111352
08375616a0e24484f313900311e1748a2fe12f87
cd63a77e990f68a699ba220c8006386bd4379f81
b7093f294c330c4db789c077dac9d8611e4f8ee0
b993b863e78ae54c5e966f4e1626bc37c560e6aa
07ff37597bee726681c94c650568870bd4ff94d1
4082e889ee8aa43b303105180399bab14312231e
e77326d99c938d78a06036b8529b669253baec59
f52d0d639e96f30b226b853d931881d034c57308
785adb09b9fd0d4df6707f00247ec519c42fcfc6
8b3ac661208c88b9d424ede176b99be6fff1283e
2eb4d314cef55749f7835f6338080895daed277e
adda59173c976b8863d74b612fafa9212b9182f2
7fa12eb15f95c269f488fce4096093c96dbaffab
b696aeab6ad6abe3b45fac96264a40a555ff64ce
6514fe50471ca277c461435b17771e91c115b010
6f82a5ea52302bab33287b0191538be6f9138637
dd48eac4f170fa78ada12df70573c0d757f8febf
37add8028a2872563e7c6efa598e439508eb9a53
398b87f4ef3426569bdda2da2c9c2b89f4ba906f
c63c453889d0bfbd183da686bc076590220fd44a
94a6e73b39d7f9ad8ebebaa080932437690a7412

-- Package-specific info:


/proc/cpuinfo:

processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 58
model name : Intel(R) Core(TM) i7-3520M CPU @ 2.90GHz
stepping : 9
microcode : 0x12
cpu MHz : 1200.000
cache size : 4096 KB
physical id : 0
siblings : 4
core id : 0
cpu cores : 2
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms
bogomips : 5787.07
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:

processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 58
model name : Intel(R) Core(TM) i7-3520M CPU @ 2.90GHz
stepping : 9
microcode : 0x12
cpu MHz : 1200.000
cache size : 4096 KB
physical id : 0
siblings : 4
core id : 0
cpu cores : 2
apicid : 1
initial apicid : 1
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms
bogomips : 5787.07
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:

processor : 2
vendor_id : GenuineIntel
cpu family : 6
model : 58
model name : Intel(R) Core(TM) i7-3520M CPU @ 2.90GHz
stepping : 9
microcode : 0x12
cpu MHz : 1200.000
cache size : 4096 KB
physical id : 0
siblings : 4
core id : 1
cpu cores : 2
apicid : 2
initial apicid : 2
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms
bogomips : 5787.07
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:

processor : 3
vendor_id : GenuineIntel
cpu family : 6
model : 58
model name : Intel(R) Core(TM) i7-3520M CPU @ 2.90GHz
stepping : 9
microcode : 0x12
cpu MHz : 1200.000
cache size : 4096 KB
physical id : 0
siblings : 4
core id : 1
cpu cores : 2
apicid : 3
initial apicid : 3
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms
bogomips : 5787.07
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:




-- System Information:
Debian Release: wheezy/sid
APT prefers testing
APT policy: (700, 'testing'), (600, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.5.4 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages qemu-kvm depends on:
ii adduser 3.113+nmu3
ii ipxe-qemu 1.0.0+git-20120202.f6840ba-3
ii libaio1 0.3.109-3
ii libasound2 1.0.25-4
ii libbluetooth3 4.99-2
ii libbrlapi0.5 4.4-4
ii libc6 2.13-35
ii libcurl3-gnutls 7.26.0-1
ii libglib2.0-0 2.32.3-1
ii libgnutls26 2.12.20-1
ii libiscsi1 1.4.0-3
ii libjpeg8 8d-1
ii libncurses5 5.9-10
ii libpng12-0 1.2.49-1
ii libpulse0 2.0-6
ii libsasl2-2 2.1.25.dfsg1-5
ii libsdl1.2debian 1.2.15-5
ii libspice-server1 0.11.0-1
ii libtinfo5 5.9-10
ii libusbredirparser0 0.4.3-2
ii libuuid1 2.20.1-5.2
ii libvdeplug2 2.3.2-4
ii libx11-6 2:1.5.0-1
ii python 2.7.3~rc2-1
ii qemu-keymaps 1.1.0+dfsg-1
ii qemu-utils 1.1.0+dfsg-1
ii seabios 1.7.0-1
ii vgabios 0.7a-3
ii zlib1g 1:1.2.7.dfsg-13

Versions of packages qemu-kvm recommends:
ii bridge-utils 1.5-4
ii iproute 20120521-3

Versions of packages qemu-kvm suggests:
ii debootstrap 1.0.42
pn samba <none>
ii vde2 2.3.2-4

-- no debconf information
--
To UNSUBSCRIBE, email to debian-bugs-dist-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Michael Tokarev
2012-09-27 15:30:01 UTC
Permalink
Control: tags -1 + moreinfo
Post by Nikolai Kondrashov
Package: qemu-kvm
Version: 1.1.2+dfsg-2
Severity: important
A fully-updated 64-bit Fedora 17 guest using the 3.5.4-1.fc17.x86_64 kernel
BUG: soft lockup - CPU#0 stuck for 22s! [udevd:417]
It boots at least with 1.1.0+dfsg-3.
The 1.1.1+dfsg-1 breaks it.
Ok, so this is a breakage in 1.1.x stable series. This update contains
30 commits --

http://git.qemu.org/?p=qemu-stable-1.1.git;a=shortlog

between v1.1.1 and v1.1.0 tags. 2 of these commits are already in
qemu-kvm 1.1.0, and 15 commits are completely irrelevant (touching
different architectures, or are documentation fixes, or adding
config-time checks etc. So that's definitely not too much.
Post by Nikolai Kondrashov
The qemu-kvm was being controlled by virt-manager.
Please provide full command line which virt-manager uses. You can find
it in virtmanager logs or in ps(1) output.
Post by Nikolai Kondrashov
Trying to bisect it with git, skipping merged commits, which don't have the
"debian" directory, produced the following list of commits which could be
Bisecting these 13 commits is a bit, well, fun, but bisecting across
merges is difficult.
Post by Nikolai Kondrashov
dbe4ac16bbab4c237ff54132968accad4f5a4757
f63e60327b8e239ae97fa71060940ca20a8bf38e
02fe741375d4993b3d6870ff6466cc775b409ba1
0ec39075710ae15acc2a5825cd21e0c229fa04af
1658e3cd893e3a35d89388fdd736a6d81cb405e8
ee7735fa639c43ccb3746d84609332e48e22479f
065436479b9164b51892dbd7a7e35a3f9f496894
0da4c073228c645a0366f3fe801df072cf268482
70d582074f0b9485ad9800f8e0126ef68608ba85
f6db26e4f8fe6d80e17aa62e6bcc465e323a7fee
4c45bf61d315316b5932051551c16b17cf9b3d85
c49dd1bf6450b7880972b2f176ec10e8a496073c
b4fcb4b4995b292b6013600af78d37416c6ebb34
c9c2479289fd1faf4a1a40db54cc255fbf03af21
7672b714b28e3d49f73c605873404bf6f644c2b2
feba8ae20b372115bc15432d7c484171c25bee62
7d440f20bda8658fe16bdfe9c41c689764c50248
ca09717e8e0664801522781962a3c727d04eef33
0cc21de484d4f00c7b7cacb487bd343cc55effa5
845685265756467050859e2359acf16321111352
08375616a0e24484f313900311e1748a2fe12f87
cd63a77e990f68a699ba220c8006386bd4379f81
b7093f294c330c4db789c077dac9d8611e4f8ee0
b993b863e78ae54c5e966f4e1626bc37c560e6aa
07ff37597bee726681c94c650568870bd4ff94d1
4082e889ee8aa43b303105180399bab14312231e
e77326d99c938d78a06036b8529b669253baec59
f52d0d639e96f30b226b853d931881d034c57308
785adb09b9fd0d4df6707f00247ec519c42fcfc6
8b3ac661208c88b9d424ede176b99be6fff1283e
2eb4d314cef55749f7835f6338080895daed277e
adda59173c976b8863d74b612fafa9212b9182f2
7fa12eb15f95c269f488fce4096093c96dbaffab
b696aeab6ad6abe3b45fac96264a40a555ff64ce
6514fe50471ca277c461435b17771e91c115b010
6f82a5ea52302bab33287b0191538be6f9138637
dd48eac4f170fa78ada12df70573c0d757f8febf
37add8028a2872563e7c6efa598e439508eb9a53
398b87f4ef3426569bdda2da2c9c2b89f4ba906f
c63c453889d0bfbd183da686bc076590220fd44a
94a6e73b39d7f9ad8ebebaa080932437690a7412
Wow. That's quite a bit more than 13 commits which are EVER
possible to be the problem ;)

I don't understand what did you bisect.

Please give me some pointers about how to install this fedora
version - download links, options you've choosen etc. I haven't
used redhat-based distro for more than 10 years, so your help
can greatly reduce time required to solve this.

And please don't forget to provide the command line.

Thanks,

/mjt
--
To UNSUBSCRIBE, email to debian-bugs-dist-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Nikolai Kondrashov
2012-09-27 16:30:02 UTC
Permalink
Post by Michael Tokarev
Please provide full command line which virt-manager uses. You can find
it in virtmanager logs or in ps(1) output.
Here is the command line:

LC_ALL=C
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
HOME=/root USER=root LOGNAME=root QEMU_AUDIO_DRV=none /usr/bin/kvm -S -M
pc-1.1 -enable-kvm -m 1024 -smp 1,sockets=1,cores=1,threads=1 -name
fedora-hang-test -uuid d155797a-03fb-0181-8e71-8d38181a7158 -nodefconfig
-nodefaults -chardev
socket,id=charmonitor,path=/var/lib/libvirt/qemu/fedora-hang-test.monitor,server,nowait
-mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc
-no-shutdown -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -drive
file=/var/lib/libvirt/images/fedora-hang-test.img,if=none,id=drive-virtio-disk0,format=raw
-device
virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1
-drive
file=/home/nkondras/tmp/Fedora-17-x86_64-Live-Desktop.iso,if=none,id=drive-ide0-1-0,readonly=on,format=raw
-device ide-cd,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -netdev
tap,fd=20,id=hostnet0,vhost=on,vhostfd=22 -device
virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:5e:20:81,bus=pci.0,addr=0x3
-chardev pty,id=charserial0 -device
isa-serial,chardev=charserial0,id=serial0 -device usb-tablet,id=input0
-vnc 127.0.0.1:1 -vga cirrus -device
intel-hda,id=sound0,bus=pci.0,addr=0x4 -device
hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -device
virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6
Post by Michael Tokarev
Bisecting these 13 commits is a bit, well, fun, but bisecting across
merges is difficult.
That's why I only narroved them down to these 41.
Post by Michael Tokarev
Wow. That's quite a bit more than 13 commits which are EVER
possible to be the problem ;)
Yes :)
Post by Michael Tokarev
I don't understand what did you bisect.
I did "git bisect start debian/1.1.1+dfsg-1 debian/1.1.0+dfsg-3" and then
"git bisect skip 864599d0..37add802".
Post by Michael Tokarev
Please give me some pointers about how to install this fedora
version - download links, options you've choosen etc. I haven't
used redhat-based distro for more than 10 years, so your help
can greatly reduce time required to solve this.
Simply booting from this Live CD hangs:

http://download.fedoraproject.org/pub/fedora/linux/releases/17/Live/x86_64/Fedora-17-x86_64-Live-Desktop.iso

Thanks!
--
To UNSUBSCRIBE, email to debian-bugs-dist-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Michael Tokarev
2012-09-27 17:20:02 UTC
Permalink
Post by Michael Tokarev
Please provide full command line which virt-manager uses. You can find
it in virtmanager logs or in ps(1) output.
LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin HOME=/root USER=root LOGNAME=root QEMU_AUDIO_DRV=none /usr/bin/kvm -S -M pc-1.1 -enable-kvm -m 1024 -smp 1,sockets=1,cores=1,threads=1 -name fedora-hang-test -uuid d155797a-03fb-0181-8e71-8d38181a7158 -nodefconfig -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/fedora-hang-test.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -drive file=/var/lib/libvirt/images/fedora-hang-test.img,if=none,id=drive-virtio-disk0,format=raw -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -drive
file=/home/nkondras/tmp/Fedora-17-x86_64-Live-Desktop.iso,if=none,id=drive-ide0-1-0,readonly=on,format=raw -device ide-cd,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -netdev tap,fd=20,id=hostnet0,vhost=on,vhostfd=22 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:5e:20:81,bus=pci.0,addr=0x3 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -device usb-tablet,id=input0 -vnc 127.0.0.1:1 -vga cirrus -device intel-hda,id=sound0,bus=pci.0,addr=0x4 -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6
http://download.fedoraproject.org/pub/fedora/linux/releases/17/Live/x86_64/Fedora-17-x86_64-Live-Desktop.iso
Ok. I reproduced this, I _think_, and now I want some confirmation
from you. This is my command line:

QEMU_AUDIO_DRV=none qemu-kvm -nodefconfig -nodefaults -enable-kvm \
-monitor stdio -rtc base=utc \
-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
-m 512 -vga cirrus -cdrom Fedora-17-x86_64-Live-Desktop.iso \
-device intel-hda,id=sound0,bus=pci.0,addr=0x4 \
-device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0

leads to this in guest:

...
Starting udev Wait for Complete Device Initialization...
[ 4.123978] piix4_smbus 0000:00:01.3: SMBus Host Controller at 0xb100, revision 0
[ 4.311473] microcode: AMD CPU family 0x6 not supported
[ 4.355429] microcode: AMD CPU family 0x6 not supported
[ 7.323032] ALSA sound/pci/hda/hda_intel.c:823 azx_get_response timeout, switching to polling mode: last cmd=0x000f0000
[ 8.325018] ALSA sound/pci/hda/hda_intel.c:831 No response from codec, disabling MSI: last cmd=0x000f0000
[ 36.055021] BUG: soft lockup - CPU#0 stuck for 22s! [udevd:385]
[ 36.055026] Modules linked in: snd_hda_intel(+) snd_hda_codec snd_hwdep i2c_piix4 snd_pcm i2c_core snd_page_alloc snd_timer snd soundcore uinput squashfs
[ 36.055026] CPU 0
[ 36.055026] Modules linked in: snd_hda_intel(+) snd_hda_codec snd_hwdep i2c_piix4 snd_pcm i2c_core snd_page_alloc snd_timer snd soundcore uinput squashfs
[ 36.055026]
[ 36.055026]
[ 36.055026] Pid: 385, comm: udevd Not tainted 3.3.4-5.fc17.x86_64 #1 Bochs Bochs
[ 36.055026] RIP: 0010:[<ffffffff8105dc40>] [<ffffffff8105dc40>] __do_softirq+0x70/0x1e0
[ 36.055026] RSP: 0018:ffff88001f003ef0 EFLAGS: 00000206
[ 36.055026] RAX: ffff88001f8a7fd8 RBX: ffffffff81a17240 RCX: 00000001f0542108
[ 36.055026] RDX: 0000000000000000 RSI: 000000000000006f RDI: 0000000000000002
[ 36.055026] RBP: ffff88001f003f40 R08: 0000000000000000 R09: ffffffff81c64540
[ 36.055026] R10: 0000000000000400 R11: 0000000000000020 R12: ffff88001f003e68
[ 36.055026] R13: ffffffff815f439e R14: ffff88001f003f40 R15: 0000000000000046
[ 36.055026] FS: 00007f14b7509840(0000) GS:ffff88001f000000(0000) knlGS:0000000000000000
[ 36.055026] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[ 36.055026] CR2: 00007fa5e9e40000 CR3: 000000001f80e000 CR4: 00000000000006f0
[ 36.055026] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 36.055026] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[ 36.055026] Process udevd (pid: 385, threadinfo ffff88001f8a6000, task ffff88001b218000)
[ 36.055026] Stack:
[ 36.055026] 000000008101ac19 ffff88001f8a7fd8 ffff88001f8a7fd8 ffff88000000000a
[ 36.055026] ffff88001f014000 ffff88001f8a7fd8 0000000000000046 0000000000000007
[ 36.055026] 0000000000000050 0000000000000001 ffff88001f003f58 ffffffff815f4d9c
[ 36.055026] Call Trace:
[ 36.055026] <IRQ>
[ 36.055026] [<ffffffff815f4d9c>] call_softirq+0x1c/0x30
[ 36.055026] [<ffffffff81015465>] do_softirq+0x75/0xb0
[ 36.055026] [<ffffffff8105e055>] irq_exit+0xb5/0xc0
[ 36.055026] [<ffffffff815f56ee>] smp_apic_timer_interrupt+0x6e/0x99
[ 36.055026] [<ffffffff815f439e>] apic_timer_interrupt+0x6e/0x80
[ 36.055026] <EOI>
[ 36.055026] [<ffffffff810e22ac>] ? free_irq+0x5c/0xc0
[ 36.055026] [<ffffffff815eb741>] ? _raw_spin_unlock_irqrestore+0x11/0x20
[ 36.055026] [<ffffffff812dc3c3>] pci_bus_write_config_word+0x83/0xa0
[ 36.055026] [<ffffffff812dfca2>] pci_intx+0x52/0x90
[ 36.055026] [<ffffffff812f6e4d>] pci_intx_for_msi+0x1d/0x30
[ 36.055026] [<ffffffff812f7bed>] pci_msi_shutdown+0x7d/0xf0
[ 36.055026] [<ffffffff812f7c98>] pci_disable_msi+0x38/0x60
[ 36.055026] [<ffffffffa009efbf>] azx_get_response+0x1af/0x280 [snd_hda_intel]
[ 36.055026] [<ffffffffa007a4cf>] codec_exec_verb+0xbf/0x1f0 [snd_hda_codec]
[ 36.055026] [<ffffffffa007a660>] snd_hda_codec_read+0x60/0xa0 [snd_hda_codec]
[ 36.055026] [<ffffffffa007c92a>] snd_hda_codec_new+0x20a/0x690 [snd_hda_codec]
[ 36.055026] [<ffffffff81086b9a>] ? __cond_resched+0x2a/0x40
[ 36.055026] [<ffffffffa009ee9e>] ? azx_get_response+0x8e/0x280 [snd_hda_intel]
[ 36.055026] [<ffffffffa009fd6e>] azx_codec_create+0x1df/0x27c [snd_hda_intel]
[ 36.055026] [<ffffffffa009f1d0>] ? azx_irq_pending_work+0x140/0x140 [snd_hda_intel]
[ 36.055026] [<ffffffffa009ee10>] ? azx_halt+0x40/0x40 [snd_hda_intel]
[ 36.055026] [<ffffffffa009f990>] ? azx_bus_reset+0x90/0x90 [snd_hda_intel]
[ 36.055026] [<ffffffffa009f900>] ? azx_resume+0x170/0x170 [snd_hda_intel]
[ 36.055026] [<ffffffffa009f710>] ? azx_init_chip+0x2b0/0x2b0 [snd_hda_intel]
[ 36.055026] [<ffffffffa00a07b2>] azx_probe+0x9a7/0xb29 [snd_hda_intel]
[ 36.055026] [<ffffffff812e4b2c>] local_pci_probe+0x5c/0xd0
[ 36.055026] [<ffffffff812e4cb1>] pci_device_probe+0x111/0x120
[ 36.055026] [<ffffffff8139e8a6>] driver_probe_device+0x96/0x2f0
[ 36.055026] [<ffffffff8139ebab>] __driver_attach+0xab/0xb0
[ 36.055026] [<ffffffff8139eb00>] ? driver_probe_device+0x2f0/0x2f0
[ 36.055026] [<ffffffff8139cb85>] bus_for_each_dev+0x55/0x90
[ 36.055026] [<ffffffffa00a7000>] ? 0xffffffffa00a6fff
[ 36.055026] [<ffffffff8139e39e>] driver_attach+0x1e/0x20
[ 36.055026] [<ffffffff8139e0a8>] bus_add_driver+0x1a8/0x2a0
[ 36.055026] [<ffffffffa00a7000>] ? 0xffffffffa00a6fff
[ 36.055026] [<ffffffffa00a7000>] ? 0xffffffffa00a6fff
[ 36.055026] [<ffffffff8139f367>] driver_register+0x77/0x150
[ 36.055026] [<ffffffffa00a7000>] ? 0xffffffffa00a6fff
[ 36.055026] [<ffffffff812e3a52>] __pci_register_driver+0x62/0xe0
[ 36.055026] [<ffffffffa00a7000>] ? 0xffffffffa00a6fff
[ 36.055026] [<ffffffffa00a701e>] alsa_card_azx_init+0x1e/0x1000 [snd_hda_intel]
[ 36.055026] [<ffffffff8100212a>] do_one_initcall+0x12a/0x180
[ 36.055026] [<ffffffff810b60a6>] sys_init_module+0x10f6/0x20b0
[ 36.055026] [<ffffffff815f38e9>] system_call_fastpath+0x16/0x1b

Is it the issue you're seeing?

Removing hda-duplex device lets it to work. Removing piix3-usb-uhci
allows it to boot too. Even removing the explicit bus address from
piix3-usb-uhci allow it to boot.

I tried to bisect between qemu-kvm 1.1.0 and qemu-kvm-1.1.1, and the
bisection points to this commit:

commit 0ec39075710ae15acc2a5825cd21e0c229fa04af
(8e729e3b521d9fcd87fc2e40b6322e684f58bb2e upstream)
Author: Jan Kiszka <***@siemens.com>
Date: Fri May 11 11:42:35 2012 -0300

intel-hda: Fix reset of MSI function

Call msi_reset on device reset as still required by the core.

CC: Gerd Hoffmann <***@redhat.com>
CC: qemu-***@nongnu.org
Signed-off-by: Jan Kiszka <***@siemens.com>
Signed-off-by: Michael S. Tsirkin <***@redhat.com>
(cherry picked from commit 8e729e3b521d9fcd87fc2e40b6322e684f58bb2e)

--- a/hw/intel-hda.c
+++ b/hw/intel-hda.c
@@ -1107,6 +1107,9 @@ static void intel_hda_reset(DeviceState *dev)
DeviceState *qdev;
HDACodecDevice *cdev;

+ if (d->msi) {
+ msi_reset(&d->pci);
+ }
intel_hda_regs_reset(d);
d->wall_base_ns = qemu_get_clock_ns(vm_clock);

which is exactly about this hda thing. I'm CC'ing relevant
people here.

Now I'm not sure what goes on here. Is libvirt not right somehow?
Note: it is qemu-kvm 1.1.2, problem exists in 1.1.1 already, after
the above commit.

Nikolai, please verify if this is the issue you're seeing, and
please try without sound device. If this is the case, let's
downgrade this bug from important to normal, since emulated sound
devices aren't really of high priority in this context, and there
should be easy workaround (to disable sound).

Thank you!

/mjt
--
To UNSUBSCRIBE, email to debian-bugs-dist-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Michael Tokarev
2012-09-27 17:50:02 UTC
Permalink
To clarify:

1. this only affects 1.1.x tree (which is a
history for most developers already)
2. the same guest boots okay with 1.2 (with
kvm and irqchip enabled).

BTW, what is this hda-duplex device anyway? I never heard of it
before now :). And I guess using QEMU_AUDIO_DRV=none with a guest
sound device isn't very smart move ;) (But setting it to something
else does not change things).

Also note that 1.1.1 contained one more patch which added msi
reset, this time for ahci.

Thanks,

/mjt
Post by Michael Tokarev
QEMU_AUDIO_DRV=none qemu-kvm -nodefconfig -nodefaults -enable-kvm \
-monitor stdio -rtc base=utc \
-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
-m 512 -vga cirrus -cdrom Fedora-17-x86_64-Live-Desktop.iso \
-device intel-hda,id=sound0,bus=pci.0,addr=0x4 \
-device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0
...
Starting udev Wait for Complete Device Initialization...
[ 4.123978] piix4_smbus 0000:00:01.3: SMBus Host Controller at 0xb100, revision 0
[ 4.311473] microcode: AMD CPU family 0x6 not supported
[ 4.355429] microcode: AMD CPU family 0x6 not supported
[ 7.323032] ALSA sound/pci/hda/hda_intel.c:823 azx_get_response timeout, switching to polling mode: last cmd=0x000f0000
[ 8.325018] ALSA sound/pci/hda/hda_intel.c:831 No response from codec, disabling MSI: last cmd=0x000f0000
[ 36.055021] BUG: soft lockup - CPU#0 stuck for 22s! [udevd:385]
[ 36.055026] Modules linked in: snd_hda_intel(+) snd_hda_codec snd_hwdep i2c_piix4 snd_pcm i2c_core snd_page_alloc snd_timer snd soundcore uinput squashfs
commit 0ec39075710ae15acc2a5825cd21e0c229fa04af
(8e729e3b521d9fcd87fc2e40b6322e684f58bb2e upstream)
Date: Fri May 11 11:42:35 2012 -0300
intel-hda: Fix reset of MSI function
--
To UNSUBSCRIBE, email to debian-bugs-dist-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Michael Tokarev
2012-09-27 18:50:02 UTC
Permalink
On 27.09.2012 22:28, Jan Kiszka wrote:
[]
Post by Michael Tokarev
--- a/hw/intel-hda.c
+++ b/hw/intel-hda.c
@@ -1107,6 +1107,9 @@ static void intel_hda_reset(DeviceState *dev)
DeviceState *qdev;
HDACodecDevice *cdev;
+ if (d->msi) {
+ msi_reset(&d->pci);
+ }
intel_hda_regs_reset(d);
d->wall_base_ns = qemu_get_clock_ns(vm_clock);
which is exactly about this hda thing. I'm CC'ing relevant
people here.
I suppose we are resetting the MSI configuration also in cases here
where only the HDA internals are supposed to be reset (when called from
intel_hda_set_g_ctl).
Hmm. I was looking at this code already (but i don't know the machinery
anyway). Here it is (I addedd two printfs in obvious places):

in intel_hda_reset
calling intel_hda_reset from intel_hda_set_g_ctl
in intel_hda_reset
(at this time it hangs in guest).

The following patch fixes it. Is it correct? :)

/mjt
Jan Kiszka
2012-09-27 19:10:01 UTC
Permalink
Post by Michael Tokarev
[]
Post by Michael Tokarev
--- a/hw/intel-hda.c
+++ b/hw/intel-hda.c
@@ -1107,6 +1107,9 @@ static void intel_hda_reset(DeviceState *dev)
DeviceState *qdev;
HDACodecDevice *cdev;
+ if (d->msi) {
+ msi_reset(&d->pci);
+ }
intel_hda_regs_reset(d);
d->wall_base_ns = qemu_get_clock_ns(vm_clock);
which is exactly about this hda thing. I'm CC'ing relevant
people here.
I suppose we are resetting the MSI configuration also in cases here
where only the HDA internals are supposed to be reset (when called from
intel_hda_set_g_ctl).
Hmm. I was looking at this code already (but i don't know the machinery
in intel_hda_reset
calling intel_hda_reset from intel_hda_set_g_ctl
in intel_hda_reset
(at this time it hangs in guest).
The following patch fixes it. Is it correct? :)
It looks ok to me.

Jan
--
Siemens AG, Corporate Technology, CT RTC ITP SDP-DE
Corporate Competence Center Embedded Linux
--
To UNSUBSCRIBE, email to debian-bugs-dist-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Michael Tokarev
2012-09-27 19:40:01 UTC
Permalink
On 27.09.2012 23:32, Michael S. Tsirkin wrote:
[]
Looks good to me.
I just sent another patch, now with proper S-o-b and
description, which does the same but touches 2 less
lines (by renaming the other half of the function), --
his is to be more like the 1.2+ version. The
functionality is exactly the same.
ACK for stable branch.
/mjt
--
To UNSUBSCRIBE, email to debian-bugs-dist-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Michael S. Tsirkin
2012-09-27 19:40:01 UTC
Permalink
Post by Michael Tokarev
[]
Post by Michael Tokarev
--- a/hw/intel-hda.c
+++ b/hw/intel-hda.c
@@ -1107,6 +1107,9 @@ static void intel_hda_reset(DeviceState *dev)
DeviceState *qdev;
HDACodecDevice *cdev;
+ if (d->msi) {
+ msi_reset(&d->pci);
+ }
intel_hda_regs_reset(d);
d->wall_base_ns = qemu_get_clock_ns(vm_clock);
which is exactly about this hda thing. I'm CC'ing relevant
people here.
I suppose we are resetting the MSI configuration also in cases here
where only the HDA internals are supposed to be reset (when called from
intel_hda_set_g_ctl).
Hmm. I was looking at this code already (but i don't know the machinery
in intel_hda_reset
calling intel_hda_reset from intel_hda_set_g_ctl
in intel_hda_reset
(at this time it hangs in guest).
The following patch fixes it. Is it correct? :)
/mjt
diff --git a/hw/intel-hda.c b/hw/intel-hda.c
index e38861e..fdd7eeb 100644
--- a/hw/intel-hda.c
+++ b/hw/intel-hda.c
@@ -199,7 +199,7 @@ struct IntelHDAReg {
void (*rhandler)(IntelHDAState *d, const IntelHDAReg *reg);
};
-static void intel_hda_reset(DeviceState *dev);
+static void intel_hda_reset_dev(DeviceState *dev);
/* --------------------------------------------------------------------- */
@@ -500,7 +500,7 @@ static void intel_hda_notify_codecs(IntelHDAState *d, uint32_t stream, bool runn
static void intel_hda_set_g_ctl(IntelHDAState *d, const IntelHDAReg *reg, uint32_t old)
{
if ((d->g_ctl & ICH6_GCTL_RESET) == 0) {
- intel_hda_reset(&d->pci.qdev);
+ intel_hda_reset_dev(&d->pci.qdev);
}
}
@@ -1101,15 +1101,12 @@ static const MemoryRegionOps intel_hda_mmio_ops = {
/* --------------------------------------------------------------------- */
-static void intel_hda_reset(DeviceState *dev)
+static void intel_hda_reset_dev(DeviceState *dev)
{
IntelHDAState *d = DO_UPCAST(IntelHDAState, pci.qdev, dev);
DeviceState *qdev;
HDACodecDevice *cdev;
- if (d->msi) {
- msi_reset(&d->pci);
- }
intel_hda_regs_reset(d);
d->wall_base_ns = qemu_get_clock_ns(vm_clock);
@@ -1122,6 +1119,15 @@ static void intel_hda_reset(DeviceState *dev)
intel_hda_update_irq(d);
}
+static void intel_hda_reset(DeviceState *dev)
+{
+ IntelHDAState *d = DO_UPCAST(IntelHDAState, pci.qdev, dev);
+ if (d->msi) {
+ msi_reset(&d->pci);
+ }
+ intel_hda_reset_dev(dev);
+}
+
static int intel_hda_init(PCIDevice *pci)
{
IntelHDAState *d = DO_UPCAST(IntelHDAState, pci, pci);
Looks good to me.
ACK for stable branch.
--
To UNSUBSCRIBE, email to debian-bugs-dist-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Jan Kiszka
2012-09-27 19:00:01 UTC
Permalink
Post by Michael Tokarev
Post by Michael Tokarev
Please provide full command line which virt-manager uses. You can find
it in virtmanager logs or in ps(1) output.
LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin HOME=/root USER=root LOGNAME=root QEMU_AUDIO_DRV=none /usr/bin/kvm -S -M pc-1.1 -enable-kvm -m 1024 -smp 1,sockets=1,cores=1,threads=1 -name fedora-hang-test -uuid d155797a-03fb-0181-8e71-8d38181a7158 -nodefconfig -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/fedora-hang-test.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -drive file=/var/lib/libvirt/images/fedora-hang-test.img,if=none,id=drive-virtio-disk0,format=raw -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -drive
file=/home/nkondras/tmp/Fedora-17-x86_64-Live-Desktop.iso,if=none,id=drive-ide0-1-0,readonly=on,format=raw -device ide-cd,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -netdev tap,fd=20,id=hostnet0,vhost=on,vhostfd=22 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:5e:20:81,bus=pci.0,addr=0x3 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -device usb-tablet,id=input0 -vnc 127.0.0.1:1 -vga cirrus -device intel-hda,id=sound0,bus=pci.0,addr=0x4 -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6
http://download.fedoraproject.org/pub/fedora/linux/releases/17/Live/x86_64/Fedora-17-x86_64-Live-Desktop.iso
Ok. I reproduced this, I _think_, and now I want some confirmation
QEMU_AUDIO_DRV=none qemu-kvm -nodefconfig -nodefaults -enable-kvm \
-monitor stdio -rtc base=utc \
-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
-m 512 -vga cirrus -cdrom Fedora-17-x86_64-Live-Desktop.iso \
-device intel-hda,id=sound0,bus=pci.0,addr=0x4 \
-device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0
...
Starting udev Wait for Complete Device Initialization...
[ 4.123978] piix4_smbus 0000:00:01.3: SMBus Host Controller at 0xb100, revision 0
[ 4.311473] microcode: AMD CPU family 0x6 not supported
[ 4.355429] microcode: AMD CPU family 0x6 not supported
[ 7.323032] ALSA sound/pci/hda/hda_intel.c:823 azx_get_response timeout, switching to polling mode: last cmd=0x000f0000
[ 8.325018] ALSA sound/pci/hda/hda_intel.c:831 No response from codec, disabling MSI: last cmd=0x000f0000
[ 36.055021] BUG: soft lockup - CPU#0 stuck for 22s! [udevd:385]
[ 36.055026] Modules linked in: snd_hda_intel(+) snd_hda_codec snd_hwdep i2c_piix4 snd_pcm i2c_core snd_page_alloc snd_timer snd soundcore uinput squashfs
[ 36.055026] CPU 0
[ 36.055026] Modules linked in: snd_hda_intel(+) snd_hda_codec snd_hwdep i2c_piix4 snd_pcm i2c_core snd_page_alloc snd_timer snd soundcore uinput squashfs
[ 36.055026]
[ 36.055026]
[ 36.055026] Pid: 385, comm: udevd Not tainted 3.3.4-5.fc17.x86_64 #1 Bochs Bochs
[ 36.055026] RIP: 0010:[<ffffffff8105dc40>] [<ffffffff8105dc40>] __do_softirq+0x70/0x1e0
[ 36.055026] RSP: 0018:ffff88001f003ef0 EFLAGS: 00000206
[ 36.055026] RAX: ffff88001f8a7fd8 RBX: ffffffff81a17240 RCX: 00000001f0542108
[ 36.055026] RDX: 0000000000000000 RSI: 000000000000006f RDI: 0000000000000002
[ 36.055026] RBP: ffff88001f003f40 R08: 0000000000000000 R09: ffffffff81c64540
[ 36.055026] R10: 0000000000000400 R11: 0000000000000020 R12: ffff88001f003e68
[ 36.055026] R13: ffffffff815f439e R14: ffff88001f003f40 R15: 0000000000000046
[ 36.055026] FS: 00007f14b7509840(0000) GS:ffff88001f000000(0000) knlGS:0000000000000000
[ 36.055026] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[ 36.055026] CR2: 00007fa5e9e40000 CR3: 000000001f80e000 CR4: 00000000000006f0
[ 36.055026] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 36.055026] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[ 36.055026] Process udevd (pid: 385, threadinfo ffff88001f8a6000, task ffff88001b218000)
[ 36.055026] 000000008101ac19 ffff88001f8a7fd8 ffff88001f8a7fd8 ffff88000000000a
[ 36.055026] ffff88001f014000 ffff88001f8a7fd8 0000000000000046 0000000000000007
[ 36.055026] 0000000000000050 0000000000000001 ffff88001f003f58 ffffffff815f4d9c
[ 36.055026] <IRQ>
[ 36.055026] [<ffffffff815f4d9c>] call_softirq+0x1c/0x30
[ 36.055026] [<ffffffff81015465>] do_softirq+0x75/0xb0
[ 36.055026] [<ffffffff8105e055>] irq_exit+0xb5/0xc0
[ 36.055026] [<ffffffff815f56ee>] smp_apic_timer_interrupt+0x6e/0x99
[ 36.055026] [<ffffffff815f439e>] apic_timer_interrupt+0x6e/0x80
[ 36.055026] <EOI>
[ 36.055026] [<ffffffff810e22ac>] ? free_irq+0x5c/0xc0
[ 36.055026] [<ffffffff815eb741>] ? _raw_spin_unlock_irqrestore+0x11/0x20
[ 36.055026] [<ffffffff812dc3c3>] pci_bus_write_config_word+0x83/0xa0
[ 36.055026] [<ffffffff812dfca2>] pci_intx+0x52/0x90
[ 36.055026] [<ffffffff812f6e4d>] pci_intx_for_msi+0x1d/0x30
[ 36.055026] [<ffffffff812f7bed>] pci_msi_shutdown+0x7d/0xf0
[ 36.055026] [<ffffffff812f7c98>] pci_disable_msi+0x38/0x60
[ 36.055026] [<ffffffffa009efbf>] azx_get_response+0x1af/0x280 [snd_hda_intel]
[ 36.055026] [<ffffffffa007a4cf>] codec_exec_verb+0xbf/0x1f0 [snd_hda_codec]
[ 36.055026] [<ffffffffa007a660>] snd_hda_codec_read+0x60/0xa0 [snd_hda_codec]
[ 36.055026] [<ffffffffa007c92a>] snd_hda_codec_new+0x20a/0x690 [snd_hda_codec]
[ 36.055026] [<ffffffff81086b9a>] ? __cond_resched+0x2a/0x40
[ 36.055026] [<ffffffffa009ee9e>] ? azx_get_response+0x8e/0x280 [snd_hda_intel]
[ 36.055026] [<ffffffffa009fd6e>] azx_codec_create+0x1df/0x27c [snd_hda_intel]
[ 36.055026] [<ffffffffa009f1d0>] ? azx_irq_pending_work+0x140/0x140 [snd_hda_intel]
[ 36.055026] [<ffffffffa009ee10>] ? azx_halt+0x40/0x40 [snd_hda_intel]
[ 36.055026] [<ffffffffa009f990>] ? azx_bus_reset+0x90/0x90 [snd_hda_intel]
[ 36.055026] [<ffffffffa009f900>] ? azx_resume+0x170/0x170 [snd_hda_intel]
[ 36.055026] [<ffffffffa009f710>] ? azx_init_chip+0x2b0/0x2b0 [snd_hda_intel]
[ 36.055026] [<ffffffffa00a07b2>] azx_probe+0x9a7/0xb29 [snd_hda_intel]
[ 36.055026] [<ffffffff812e4b2c>] local_pci_probe+0x5c/0xd0
[ 36.055026] [<ffffffff812e4cb1>] pci_device_probe+0x111/0x120
[ 36.055026] [<ffffffff8139e8a6>] driver_probe_device+0x96/0x2f0
[ 36.055026] [<ffffffff8139ebab>] __driver_attach+0xab/0xb0
[ 36.055026] [<ffffffff8139eb00>] ? driver_probe_device+0x2f0/0x2f0
[ 36.055026] [<ffffffff8139cb85>] bus_for_each_dev+0x55/0x90
[ 36.055026] [<ffffffffa00a7000>] ? 0xffffffffa00a6fff
[ 36.055026] [<ffffffff8139e39e>] driver_attach+0x1e/0x20
[ 36.055026] [<ffffffff8139e0a8>] bus_add_driver+0x1a8/0x2a0
[ 36.055026] [<ffffffffa00a7000>] ? 0xffffffffa00a6fff
[ 36.055026] [<ffffffffa00a7000>] ? 0xffffffffa00a6fff
[ 36.055026] [<ffffffff8139f367>] driver_register+0x77/0x150
[ 36.055026] [<ffffffffa00a7000>] ? 0xffffffffa00a6fff
[ 36.055026] [<ffffffff812e3a52>] __pci_register_driver+0x62/0xe0
[ 36.055026] [<ffffffffa00a7000>] ? 0xffffffffa00a6fff
[ 36.055026] [<ffffffffa00a701e>] alsa_card_azx_init+0x1e/0x1000 [snd_hda_intel]
[ 36.055026] [<ffffffff8100212a>] do_one_initcall+0x12a/0x180
[ 36.055026] [<ffffffff810b60a6>] sys_init_module+0x10f6/0x20b0
[ 36.055026] [<ffffffff815f38e9>] system_call_fastpath+0x16/0x1b
Is it the issue you're seeing?
Removing hda-duplex device lets it to work. Removing piix3-usb-uhci
allows it to boot too. Even removing the explicit bus address from
piix3-usb-uhci allow it to boot.
I tried to bisect between qemu-kvm 1.1.0 and qemu-kvm-1.1.1, and the
commit 0ec39075710ae15acc2a5825cd21e0c229fa04af
(8e729e3b521d9fcd87fc2e40b6322e684f58bb2e upstream)
Date: Fri May 11 11:42:35 2012 -0300
intel-hda: Fix reset of MSI function
Call msi_reset on device reset as still required by the core.
(cherry picked from commit 8e729e3b521d9fcd87fc2e40b6322e684f58bb2e)
--- a/hw/intel-hda.c
+++ b/hw/intel-hda.c
@@ -1107,6 +1107,9 @@ static void intel_hda_reset(DeviceState *dev)
DeviceState *qdev;
HDACodecDevice *cdev;
+ if (d->msi) {
+ msi_reset(&d->pci);
+ }
intel_hda_regs_reset(d);
d->wall_base_ns = qemu_get_clock_ns(vm_clock);
which is exactly about this hda thing. I'm CC'ing relevant
people here.
I suppose we are resetting the MSI configuration also in cases here
where only the HDA internals are supposed to be reset (when called from
intel_hda_set_g_ctl).

Jan
--
Siemens AG, Corporate Technology, CT RTC ITP SDP-DE
Corporate Competence Center Embedded Linux
--
To UNSUBSCRIBE, email to debian-bugs-dist-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Nikolai Kondrashov
2012-09-27 19:50:02 UTC
Permalink
Post by Michael Tokarev
Ok. I reproduced this, I _think_, and now I want some confirmation
QEMU_AUDIO_DRV=none qemu-kvm -nodefconfig -nodefaults -enable-kvm \
-monitor stdio -rtc base=utc \
-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
-m 512 -vga cirrus -cdrom Fedora-17-x86_64-Live-Desktop.iso \
-device intel-hda,id=sound0,bus=pci.0,addr=0x4 \
-device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0
...
Starting udev Wait for Complete Device Initialization...
[ 4.123978] piix4_smbus 0000:00:01.3: SMBus Host Controller at 0xb100, revision 0
[ 4.311473] microcode: AMD CPU family 0x6 not supported
[ 4.355429] microcode: AMD CPU family 0x6 not supported
[ 7.323032] ALSA sound/pci/hda/hda_intel.c:823 azx_get_response timeout, switching to polling mode: last cmd=0x000f0000
[ 8.325018] ALSA sound/pci/hda/hda_intel.c:831 No response from codec, disabling MSI: last cmd=0x000f0000
[ 36.055021] BUG: soft lockup - CPU#0 stuck for 22s! [udevd:385]
Is it the issue you're seeing?
Removing hda-duplex device lets it to work. Removing piix3-usb-uhci
allows it to boot too. Even removing the explicit bus address from
piix3-usb-uhci allow it to boot.
Nikolai, please verify if this is the issue you're seeing, and
please try without sound device. If this is the case, let's
downgrade this bug from important to normal, since emulated sound
devices aren't really of high priority in this context, and there
should be easy workaround (to disable sound).
I wasn't able to get a backtrace, unfortunately. It just isn't printed.
Could
I be missing some trick? However, removing the sound device did help.

I'll try the patch you sent in another message next.

Thank you.
--
To UNSUBSCRIBE, email to debian-bugs-dist-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Michael Tokarev
2012-09-27 20:10:01 UTC
Permalink
[Dropping the Cc list]
Post by Nikolai Kondrashov
Post by Michael Tokarev
Nikolai, please verify if this is the issue you're seeing, and
please try without sound device. If this is the case, let's
downgrade this bug from important to normal, since emulated sound
devices aren't really of high priority in this context, and there
should be easy workaround (to disable sound).
I wasn't able to get a backtrace, unfortunately. It just isn't printed.
Could I be missing some trick? However, removing the sound device did help.
Easiest way to get a backtrace is to add a serial console to guest
(I used -serial file:out), set it up in grub (console=ttyS0), AND
remove "quiet" parameter from kernel command line, together with
"rhgb". The "quiet" thing is the most frequently forgotten parameter.
Post by Nikolai Kondrashov
I'll try the patch you sent in another message next.
I've just tried latest master of
git://git.debian.org/git/collab-maint/qemu-kvm.git where you applied your
patch and it works. Both with your command line and from virt-manager.
OK, excellent!
Thank you very much for fixing it this fast :)!
It was really easy to find the stuff in between the 13 commits :)
And Jan noted the right place as well, it is more his work than
mine.

Now, it isn't really clear when this fix will hit the debian
archive (ie, will be released to debian). I understand it is
annoying to have bugs like this, but I'm afraid to push even
more work to the release team. Current freeze policy is to
allow fixing only bugs with severity "serious" and up, and
your does not qualify :)
Could you please tag your last two dfsg releases, so it is easier to check
them out next time?
I tagged it the time when I uploaded them, but forgot to push.
Note I changed the tag format to include package name too,
since else the tags in qemu and qemu-kvm packages/repositories
clashes with each other.

Thanks for noticing this, and for verifying the fix!

/mjt
--
To UNSUBSCRIBE, email to debian-bugs-dist-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Michael Tokarev
2012-09-27 20:50:02 UTC
Permalink
Control: retitle -1 emulated hda-intel does not work since 1.1.1 upstream release (linux guest hangs)
Control: found -1 1.1.1+dfsg-1
Control: affects -1 qemu

I tried a few other guests with the same command line, and
all shows bad behavor. Debian wheezy kernel also hangs
when loading hda-intel modules, and win7 guest BSODs at
startup.

Is intel-hda the default for libvirt now, or should it be
explicitly enabled? If the former, we've a serious bug
here, for sure.

Retitling the bug accordingly, and trying to understand
the defaults of libvirt...

And sure thing, the same issue equally affects qemu too.

Thanks,

/mjt
--
To UNSUBSCRIBE, email to debian-bugs-dist-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Nikolai Kondrashov
2012-09-28 20:00:04 UTC
Permalink
Post by Michael Tokarev
Easiest way to get a backtrace is to add a serial console to guest
(I used -serial file:out), set it up in grub (console=ttyS0), AND
remove "quiet" parameter from kernel command line, together with
"rhgb". The "quiet" thing is the most frequently forgotten parameter.
Thanks. I suspected there was something like that. I used the serial console
in virt-manager, but obviously it didn't help. Shall be removing both of these
parameters from all my VMs.
Post by Michael Tokarev
Thank you very much for fixing it this fast :)!
It was really easy to find the stuff in between the 13 commits :)
And Jan noted the right place as well, it is more his work than
mine.
Well, still, nothing was preventing you from putting it off ;)
Post by Michael Tokarev
Now, it isn't really clear when this fix will hit the debian
archive (ie, will be released to debian). I understand it is
annoying to have bugs like this, but I'm afraid to push even
more work to the release team. Current freeze policy is to
allow fixing only bugs with severity "serious" and up, and
your does not qualify :)
Sure, I agree with the policy. It's not a big deal for me to live with a
self-built package - it's only needed for a single laptop. However, someone
else might find this cumbersome.
Post by Michael Tokarev
Could you please tag your last two dfsg releases, so it is easier to check
them out next time?
I tagged it the time when I uploaded them, but forgot to push.
I forget to push the tags quite often myself.
Post by Michael Tokarev
Note I changed the tag format to include package name too,
since else the tags in qemu and qemu-kvm packages/repositories
clashes with each other.
Sure, the important thing is that they're there.

Thank you :)

Sincerely,
Nick
--
To UNSUBSCRIBE, email to debian-bugs-dist-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Nikolai Kondrashov
2012-09-27 20:10:01 UTC
Permalink
Post by Nikolai Kondrashov
Post by Michael Tokarev
Nikolai, please verify if this is the issue you're seeing, and
please try without sound device. If this is the case, let's
downgrade this bug from important to normal, since emulated sound
devices aren't really of high priority in this context, and there
should be easy workaround (to disable sound).
I wasn't able to get a backtrace, unfortunately. It just isn't printed.
Could I be missing some trick? However, removing the sound device did help.
I'll try the patch you sent in another message next.
I've just tried latest master of
git://git.debian.org/git/collab-maint/qemu-kvm.git where you applied your
patch and it works. Both with your command line and from virt-manager.

Thank you very much for fixing it this fast :)!

Could you please tag your last two dfsg releases, so it is easier to check
them out next time?

Thank you.

Sincerely,
Nick
--
To UNSUBSCRIBE, email to debian-bugs-dist-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Loading...