Bug#688964: qemu-kvm: Fedora 17 guest hangs on boot with soft lockup in udevd

2012-09-28 Thread Nikolai Kondrashov

On 09/27/2012 11:06 PM, Michael Tokarev wrote:

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.


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 ;)


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.


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.


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-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#688964: qemu-kvm: Fedora 17 guest hangs on boot with soft lockup in udevd

2012-09-27 Thread 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
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
845685265756467050859e2359acf1632352
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 

Bug#688964: qemu-kvm: Fedora 17 guest hangs on boot with soft lockup in udevd

2012-09-27 Thread Michael Tokarev
Control: tags -1 + moreinfo

On 27.09.2012 18:27, Nikolai Kondrashov wrote:
 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.

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.

 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.

 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:

Bisecting these 13 commits is a bit, well, fun, but bisecting across
merges is difficult.

 dbe4ac16bbab4c237ff54132968accad4f5a4757
 f63e60327b8e239ae97fa71060940ca20a8bf38e
 02fe741375d4993b3d6870ff6466cc775b409ba1
 0ec39075710ae15acc2a5825cd21e0c229fa04af
 1658e3cd893e3a35d89388fdd736a6d81cb405e8
 ee7735fa639c43ccb3746d84609332e48e22479f
 065436479b9164b51892dbd7a7e35a3f9f496894
 0da4c073228c645a0366f3fe801df072cf268482
 70d582074f0b9485ad9800f8e0126ef68608ba85
 f6db26e4f8fe6d80e17aa62e6bcc465e323a7fee
 4c45bf61d315316b5932051551c16b17cf9b3d85
 c49dd1bf6450b7880972b2f176ec10e8a496073c
 b4fcb4b4995b292b6013600af78d37416c6ebb34
 c9c2479289fd1faf4a1a40db54cc255fbf03af21
 7672b714b28e3d49f73c605873404bf6f644c2b2
 feba8ae20b372115bc15432d7c484171c25bee62
 7d440f20bda8658fe16bdfe9c41c689764c50248
 ca09717e8e0664801522781962a3c727d04eef33
 0cc21de484d4f00c7b7cacb487bd343cc55effa5
 845685265756467050859e2359acf1632352
 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-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#688964: qemu-kvm: Fedora 17 guest hangs on boot with soft lockup in udevd

2012-09-27 Thread Nikolai Kondrashov

On 09/27/2012 06:23 PM, Michael Tokarev wrote:

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



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.


Wow. That's quite a bit more than 13 commits which are EVER
possible to be the problem ;)


Yes :)


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.


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-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#688964: qemu-kvm: Fedora 17 guest hangs on boot with soft lockup in udevd

2012-09-27 Thread Michael Tokarev
On 27.09.2012 20:25, Nikolai Kondrashov wrote:
 On 09/27/2012 06:23 PM, Michael Tokarev wrote:
 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
 
 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

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 :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=0x000f
[8.325018] ALSA sound/pci/hda/hda_intel.c:831 No response from codec, 
disabling MSI: last cmd=0x000f
[   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:[8105dc40]  [8105dc40] 
__do_softirq+0x70/0x1e0
[   36.055026] RSP: 0018:88001f003ef0  EFLAGS: 0206
[   36.055026] RAX: 88001f8a7fd8 RBX: 81a17240 RCX: 0001f0542108
[   36.055026] RDX:  RSI: 006f RDI: 0002
[   36.055026] RBP: 88001f003f40 R08:  R09: 81c64540
[   36.055026] R10: 0400 R11: 0020 R12: 88001f003e68
[   36.055026] R13: 815f439e R14: 88001f003f40 R15: 0046
[   36.055026] FS:  7f14b7509840() GS:88001f00() 
knlGS:
[   36.055026] CS:  0010 DS:  ES:  CR0: 8005003b
[   36.055026] CR2: 7fa5e9e4 CR3: 1f80e000 CR4: 06f0
[   36.055026] DR0:  DR1:  DR2: 
[   36.055026] DR3:  DR6: 0ff0 DR7: 0400
[   36.055026] Process udevd (pid: 385, threadinfo 88001f8a6000, task 
88001b218000)
[   36.055026] Stack:
[   36.055026]  8101ac19 88001f8a7fd8 88001f8a7fd8 
880a
[   36.055026]  88001f014000 88001f8a7fd8 0046 
0007
[   36.055026]  0050 0001 88001f003f58 
815f4d9c
[   36.055026] Call Trace:
[   36.055026]  IRQ
[   36.055026]  [815f4d9c] call_softirq+0x1c/0x30
[   36.055026]  [81015465] do_softirq+0x75/0xb0
[   36.055026]  [8105e055] irq_exit+0xb5/0xc0
[   36.055026]  [815f56ee] smp_apic_timer_interrupt+0x6e/0x99
[   36.055026]  [815f439e] apic_timer_interrupt+0x6e/0x80
[   36.055026]  EOI
[   36.055026]  [810e22ac] 

Bug#688964: qemu-kvm: Fedora 17 guest hangs on boot with soft lockup in udevd

2012-09-27 Thread Michael Tokarev
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

   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 :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=0x000f
 [8.325018] ALSA sound/pci/hda/hda_intel.c:831 No response from codec, 
 disabling MSI: last cmd=0x000f
 [   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)
 Author: Jan Kiszka jan.kis...@siemens.com
 Date:   Fri May 11 11:42:35 2012 -0300
 
 intel-hda: Fix reset of MSI function


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#688964: qemu-kvm: Fedora 17 guest hangs on boot with soft lockup in udevd

2012-09-27 Thread Michael Tokarev
On 27.09.2012 22:28, Jan Kiszka wrote:
[]
 --- 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
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);


Bug#688964: qemu-kvm: Fedora 17 guest hangs on boot with soft lockup in udevd

2012-09-27 Thread Jan Kiszka
On 2012-09-27 19:15, Michael Tokarev wrote:
 On 27.09.2012 20:25, Nikolai Kondrashov wrote:
 On 09/27/2012 06:23 PM, Michael Tokarev wrote:
 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

 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
 
 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 :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=0x000f
 [8.325018] ALSA sound/pci/hda/hda_intel.c:831 No response from codec, 
 disabling MSI: last cmd=0x000f
 [   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:[8105dc40]  [8105dc40] 
 __do_softirq+0x70/0x1e0
 [   36.055026] RSP: 0018:88001f003ef0  EFLAGS: 0206
 [   36.055026] RAX: 88001f8a7fd8 RBX: 81a17240 RCX: 
 0001f0542108
 [   36.055026] RDX:  RSI: 006f RDI: 
 0002
 [   36.055026] RBP: 88001f003f40 R08:  R09: 
 81c64540
 [   36.055026] R10: 0400 R11: 0020 R12: 
 88001f003e68
 [   36.055026] R13: 815f439e R14: 88001f003f40 R15: 
 0046
 [   36.055026] FS:  7f14b7509840() GS:88001f00() 
 knlGS:
 [   36.055026] CS:  0010 DS:  ES:  CR0: 8005003b
 [   36.055026] CR2: 7fa5e9e4 CR3: 1f80e000 CR4: 
 06f0
 [   36.055026] DR0:  DR1:  DR2: 
 
 [   36.055026] DR3:  DR6: 0ff0 DR7: 
 0400
 [   36.055026] Process udevd (pid: 385, threadinfo 88001f8a6000, task 
 88001b218000)
 [   36.055026] Stack:
 [   36.055026]  8101ac19 88001f8a7fd8 88001f8a7fd8 
 880a
 [   36.055026]  88001f014000 88001f8a7fd8 0046 
 0007
 [   36.055026]  0050 0001 88001f003f58 
 815f4d9c
 [   36.055026] Call Trace:
 [   36.055026]  IRQ
 [   36.055026]  [815f4d9c] call_softirq+0x1c/0x30
 [   36.055026]  [81015465] do_softirq+0x75/0xb0
 [   36.055026]  [8105e055] irq_exit+0xb5/0xc0
 [   36.055026]  [815f56ee] 

Bug#688964: qemu-kvm: Fedora 17 guest hangs on boot with soft lockup in udevd

2012-09-27 Thread Jan Kiszka
On 2012-09-27 20:43, Michael Tokarev wrote:
 On 27.09.2012 22:28, Jan Kiszka wrote:
 []
 --- 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? :)
 

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-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#688964: qemu-kvm: Fedora 17 guest hangs on boot with soft lockup in udevd

2012-09-27 Thread Michael S. Tsirkin
On Thu, Sep 27, 2012 at 10:43:57PM +0400, Michael Tokarev wrote:
 On 27.09.2012 22:28, Jan Kiszka wrote:
 []
  --- 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

 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-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#688964: qemu-kvm: Fedora 17 guest hangs on boot with soft lockup in udevd

2012-09-27 Thread Michael Tokarev
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-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#688964: qemu-kvm: Fedora 17 guest hangs on boot with soft lockup in udevd

2012-09-27 Thread Nikolai Kondrashov

On 09/27/2012 08:15 PM, Michael Tokarev wrote:

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 :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=0x000f
[8.325018] ALSA sound/pci/hda/hda_intel.c:831 No response from codec, 
disabling MSI: last cmd=0x000f
[   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-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#688964: qemu-kvm: Fedora 17 guest hangs on boot with soft lockup in udevd

2012-09-27 Thread Nikolai Kondrashov

On 09/27/2012 10:40 PM, Nikolai Kondrashov wrote:

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-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#688964: qemu-kvm: Fedora 17 guest hangs on boot with soft lockup in udevd

2012-09-27 Thread Michael Tokarev
[Dropping the Cc list]

On 27.09.2012 23:57, Nikolai Kondrashov wrote:
 On 09/27/2012 10:40 PM, Nikolai Kondrashov wrote:
 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.

 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-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#688964: qemu-kvm: Fedora 17 guest hangs on boot with soft lockup in udevd

2012-09-27 Thread Michael Tokarev
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-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org