Bug 896012

Summary: Muted sound volume after migration of VM with Intel HDA sound device over spice session.
Product: Red Hat Enterprise Linux 6 Reporter: Marian Krcmarik <mkrcmari>
Component: qemu-kvmAssignee: Gerd Hoffmann <kraxel>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.4CC: acathrow, alevy, areis, bsarathy, dblechte, djasa, dyasny, juzhang, knoel, marcandre.lureau, mazhang, michen, minovotn, mkenneth, qzhang, tlavigne, virt-maint
Target Milestone: rcKeywords: Regression, Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qemu-kvm-0.12.1.2-2.355.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-21 07:45:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Traffic between client and host
none
screen recording
none
virt-viewer --spice-debug output none

Description Marian Krcmarik 2013-01-16 13:23:41 UTC
Description of problem:
The sound is completely muted and cannot be unmuted on spice client machine for guest (remote-viewer connected to the guest) after migration VM with Intel HDA over spice. It seems to be regression introduced in -347 or -348 build of qemu-kvm since. It's not reproducible on -346 and It is reproducible on -348 qemu RHEL6 build, maybe because of patches from bug #884253 even though It's not reproducible with AC97 sound device but It does seem to be regression introduced in 347/348 builds.

remote-viewer warns about: set_sink_input_volume() failed: Invalid argument

Version-Release number of selected component (if applicable):
Client/Guest/Host - RHEL6.4 snap3
qemu-kvm-0.12.1.2-2.348.el6.x86_64
spice-server-0.12.0-11.el6.x86_64
spice-gtk-0.14-7.el6.x86_64
virt-viewer-0.5.2-18.el6.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Get a RHEL6.4 VM with Intel HDA device hosted on RHEL6.4 host and connect to it with using remote-viewer.
2. Check that sound playback works properly
3. Migrate
  
Actual results:
No sound on the VM, sound seems to be completely muted.

Expected results:
working sound playback at the same volume It was before migration.

Additional info:

Comment 2 Tomas Jamrisko 2013-01-16 13:45:29 UTC
Created attachment 679597 [details]
Traffic between client and host

Traffic between client and host. As you can see audio channel is completely missing

Comment 3 mazhang 2013-01-17 08:38:36 UTC
Martain, I can't reproduce this bug on qemu-348 build, could you please give me a hand in reproduce this bug?

Here is my command line and steps:

Version-Release number of selected component (if applicable):
Client/Host:RHEL6.4 snap3
Guest:RHEL6.4-20121206.0
qemu-kvm-0.12.1.2-2.348.el6.x86_64
spice-server-0.12.0-11.el6.x86_64
spice-gtk-0.14-7.el6.x86_64
virt-viewer-0.5.2-18.el6.x86_64

Steps to Reproduce:
1. Boot up RHEL6.4 guest with hda sound device
#/usr/libexec/qemu-kvm -M rhel6.4.0 -cpu SandyBridge -m 2048 -smp 2,sockets=1,cores=2,threads=1 -enable-kvm -name rhel64 -uuid 990ea161-6b67-47b2-b803-19fb01d30d12 -smbios type=1,manufacturer='Red Hat',product='RHEV Hypervisor',version=el6,serial=koTUXQrb,uuid=feebc8fd-f8b0-4e75-abc3-e63fcdb67170 -k en-us -rtc base=localtime,clock=host,driftfix=slew -no-kvm-pit-reinjection -monitor stdio -qmp tcp:0:6666,server,nowait -boot menu=on -bios /usr/share/seabios/bios.bin -drive file=/mnt/linux/rhel6u4.qcow2,if=none,id=drive-scsi-disk,format=qcow2,cache=none,werror=stop,rerror=stop -device virtio-scsi-pci,id=scsi0,addr=0x5 -device scsi-disk,drive=drive-scsi-disk,bus=scsi0.0,scsi-id=0,lun=0,id=scsi-disk,bootindex=1 -chardev socket,path=/tmp/isa-serial,server,nowait,id=isa1 -device isa-serial,chardev=isa1,id=isa-serial1 -vga qxl -spice port=5900,disable-ticketing -device intel-hda,id=sound0,bus=pci.0 -device hda-duplex -netdev tap,id=hostnet0,downscript=no -device virtio-net-pci,netdev=hostnet0,id=net0,mac=00:1a:4a:2e:28:1c,bus=pci.0,addr=0x4,bootindex=2
2. connect to it with using remote-viewer.
remote-viewer spice://m1:5900
3. Check that sound playback with MoviePlayer2.23.6
4. Migrate guest to remote host, then check the sound playback

results:
sound device work well, can mute or adjust volume within system sound controller or MoviePlayer.


Additional info:
Ping-pong migration more then 5 times, they didn't happened.

Comment 4 Marian Krcmarik 2013-01-17 17:29:24 UTC
(In reply to comment #3)
> Martain, I can't reproduce this bug on qemu-348 build, could you please give
> me a hand in reproduce this bug?
> 
> Here is my command line and steps:
> 
> Version-Release number of selected component (if applicable):
> Client/Host:RHEL6.4 snap3
> Guest:RHEL6.4-20121206.0
> qemu-kvm-0.12.1.2-2.348.el6.x86_64
> spice-server-0.12.0-11.el6.x86_64
> spice-gtk-0.14-7.el6.x86_64
> virt-viewer-0.5.2-18.el6.x86_64
> 
> Steps to Reproduce:
> 1. Boot up RHEL6.4 guest with hda sound device
> #/usr/libexec/qemu-kvm -M rhel6.4.0 -cpu SandyBridge -m 2048 -smp
> 2,sockets=1,cores=2,threads=1 -enable-kvm -name rhel64 -uuid
> 990ea161-6b67-47b2-b803-19fb01d30d12 -smbios type=1,manufacturer='Red
> Hat',product='RHEV
> Hypervisor',version=el6,serial=koTUXQrb,uuid=feebc8fd-f8b0-4e75-abc3-
> e63fcdb67170 -k en-us -rtc base=localtime,clock=host,driftfix=slew
> -no-kvm-pit-reinjection -monitor stdio -qmp tcp:0:6666,server,nowait -boot
> menu=on -bios /usr/share/seabios/bios.bin -drive
> file=/mnt/linux/rhel6u4.qcow2,if=none,id=drive-scsi-disk,format=qcow2,
> cache=none,werror=stop,rerror=stop -device virtio-scsi-pci,id=scsi0,addr=0x5
> -device
> scsi-disk,drive=drive-scsi-disk,bus=scsi0.0,scsi-id=0,lun=0,id=scsi-disk,
> bootindex=1 -chardev socket,path=/tmp/isa-serial,server,nowait,id=isa1
> -device isa-serial,chardev=isa1,id=isa-serial1 -vga qxl -spice
> port=5900,disable-ticketing -device intel-hda,id=sound0,bus=pci.0 -device
> hda-duplex -netdev tap,id=hostnet0,downscript=no -device
> virtio-net-pci,netdev=hostnet0,id=net0,mac=00:1a:4a:2e:28:1c,bus=pci.0,
> addr=0x4,bootindex=2
> 2. connect to it with using remote-viewer.
> remote-viewer spice://m1:5900
> 3. Check that sound playback with MoviePlayer2.23.6
> 4. Migrate guest to remote host, then check the sound playback
> 
> results:
> sound device work well, can mute or adjust volume within system sound
> controller or MoviePlayer.
> 
> 
> Additional info:
> Ping-pong migration more then 5 times, they didn't happened.

Hm, I can reproduce easily, not even me, I cannot see anything obviously wrong in your steps, I only use seamless migration, my guest is snap3 too and I do migration on localhost, but neither of them should ahve effect on the behaviour. I assume you migrate the guest correclty with spice session kept.

Comment 5 mazhang 2013-01-18 03:14:37 UTC
> Hm, I can reproduce easily, not even me, I cannot see anything obviously
> wrong in your steps, I only use seamless migration, my guest is snap3 too
> and I do migration on localhost, but neither of them should ahve effect on
> the behaviour. I assume you migrate the guest correclty with spice session
> kept.
Reproduce this bug with seamless migration.

Here is my command line and steps:

Version-Release number of selected component (if applicable):
Client/Host:RHEL6.4 snap3
Guest:RHEL6.4-20121206.0
qemu-kvm-0.12.1.2-2.348.el6.x86_64
spice-server-0.12.0-11.el6.x86_64
spice-gtk-0.14-7.el6.x86_64
virt-viewer-0.5.2-18.el6.x86_64

Steps to Reproduce:
1. Boot up RHEL6.4 guest with hda sound device
#/usr/libexec/qemu-kvm -M rhel6.4.0 -cpu SandyBridge -m 2048 -smp 2,sockets=1,cores=2,threads=1 -enable-kvm -name rhel64 -uuid 990ea161-6b67-47b2-b803-19fb01d30d12 -smbios type=1,manufacturer='Red Hat',product='RHEV Hypervisor',version=el6,serial=koTUXQrb,uuid=feebc8fd-f8b0-4e75-abc3-e63fcdb67170 -k en-us -rtc base=localtime,clock=host,driftfix=slew -no-kvm-pit-reinjection -monitor stdio -qmp tcp:0:6666,server,nowait -boot menu=on -bios /usr/share/seabios/bios.bin -drive file=/mnt/linux/rhel6u4.qcow2,if=none,id=drive-scsi-disk,format=qcow2,cache=none,werror=stop,rerror=stop -device virtio-scsi-pci,id=scsi0,addr=0x5 -device scsi-disk,drive=drive-scsi-disk,bus=scsi0.0,scsi-id=0,lun=0,id=scsi-disk,bootindex=1 -chardev socket,path=/tmp/isa-serial,server,nowait,id=isa1 -device isa-serial,chardev=isa1,id=isa-serial1 -vga qxl -spice port=5900,disable-ticketing,seamless-migration=on -device intel-hda,id=sound0,bus=pci.0 -device hda-duplex -netdev tap,id=hostnet0,downscript=no -device virtio-net-pci,netdev=hostnet0,id=net0,mac=00:1a:4a:2e:28:1c,bus=pci.0,addr=0x4,bootindex=2
2. connect to it with using remote-viewer.
remote-viewer spice://m1:5900
3. Check that sound playback with MoviePlayer2.23.6
4. Migrate guest to remote host, then check the sound playback

Actual results:
No sound on the VM, sound seems to be completely muted.

Expected results:
working sound playback at the same volume It was before migration.


Additional info:
This bug just happened with seamless migration

Comment 6 David Jaša 2013-01-18 21:50:25 UTC
I have one more observation: the virt-viewer volume in pulse audio settings gets muted at the moment when final synchronization begins (0:12 in video I'll attach). Volume is not changed at all in guest nor in client (but that may be influenced by my non-default setting "flat-volumes = yes" in /etc/pulse/daemon.conf).

In addition to GSpice-WARNING in comment 0, I get another warning few lines above:
> (virt-viewer:1993): GSpice-WARNING **: (spice-session.c:1237):spice_session_set_migration: runtime check failed: (s->migration == NULL)

Comment 7 David Jaša 2013-01-18 21:51:11 UTC
Created attachment 682762 [details]
screen recording

Comment 8 David Jaša 2013-01-18 23:31:18 UTC
Given that pulseaudio interaction involved, I wouldn't be surprised if it isn't actually spice-gtk bug. I'll attach a --spice-debug snippet of what it prints during migration shortly.

Comment 9 David Jaša 2013-01-18 23:32:15 UTC
Created attachment 682805 [details]
virt-viewer --spice-debug output

Comment 10 Gerd Hoffmann 2013-01-22 06:44:39 UTC
Does restarting remote-viewer bring back sound?
Reproducable with spicec?

Comment 11 mazhang 2013-01-22 07:17:26 UTC
(In reply to comment #10)
> Does restarting remote-viewer bring back sound?
> Reproducable with spicec?

1 can not bring back sound by restart remote-viewer.
2 This issue didn't happened with spicec

Comment 12 juzhang 2013-01-22 07:22:52 UTC
(In reply to comment #11)
> (In reply to comment #10)
> > Does restarting remote-viewer bring back sound?
> > Reproducable with spicec?
> 
> 1 can not bring back sound by restart remote-viewer.
> 2 This issue didn't happened with spicec

Hi, Gerd

Would you please have a look this comment?  Any futher testing, please let KVM QE know.

Hi, Gerd/Ademar

This bug will be fixed in snapshot5? Thanks,

Best Regards & Thanks,
Junyi

Comment 13 Gerd Hoffmann 2013-01-22 08:20:12 UTC
  Hi,

> This bug will be fixed in snapshot5? Thanks,

Not root caused yet.  We'll try, not sure this will work out though.

Comment 16 Gerd Hoffmann 2013-01-22 09:02:31 UTC

*** This bug has been marked as a duplicate of bug 884253 ***

Comment 17 Ademar Reis 2013-01-23 16:50:20 UTC
Reopening it.

Long story short: this bug was open for a regression introduced by the half-merged fix for Bug 884253. The possible fixes are:

1. Finish the fix for 884253 (a missing flag passed to configure: --enable-mixemu)
2. Rever the partial fix.

We're going with (2) because during review we found that the --enable-mixemu configure flag may cause some sideeffects.

Bug 884253 will stay open, and this one, which is a regression, will be closed.

Comment 20 mazhang 2013-01-24 03:42:59 UTC
Verify this bug on
host:
kernel:2.6.32-355.el6.x86_64
qemu-kvm:qemu-kvm-0.12.1.2-2.355.el6.x86_64
spice-server:spice-server-0.12.0-12.el6.x86_64
virt-viewer-0.5.3-1.fc17.x86_64

guest:
RHEL6.4

steps
1. Boot up RHEL6.4 guest with hda sound device
#/usr/libexec/qemu-kvm -M rhel6.4.0 -cpu SandyBridge -m 2048 -smp 2,sockets=1,cores=2,threads=1 -enable-kvm -name rhel64 -uuid 990ea161-6b67-47b2-b803-19fb01d30d12 -smbios type=1,manufacturer='Red Hat',product='RHEV Hypervisor',version=el6,serial=koTUXQrb,uuid=feebc8fd-f8b0-4e75-abc3-e63fcdb67170 -k en-us -rtc base=localtime,clock=host,driftfix=slew -no-kvm-pit-reinjection -monitor stdio -qmp tcp:0:6666,server,nowait -boot menu=on -bios /usr/share/seabios/bios.bin -drive file=/mnt/linux/rhel6u4.qcow2,if=none,id=drive-scsi-disk,format=qcow2,cache=none,werror=stop,rerror=stop -device virtio-scsi-pci,id=scsi0,addr=0x5 -device scsi-disk,drive=drive-scsi-disk,bus=scsi0.0,scsi-id=0,lun=0,id=scsi-disk,bootindex=1 -chardev socket,path=/tmp/isa-serial,server,nowait,id=isa1 -device isa-serial,chardev=isa1,id=isa-serial1 -vga qxl -spice port=5900,disable-ticketing,seamless-migration=on -device intel-hda,id=sound0,bus=pci.0 -device hda-duplex -netdev tap,id=hostnet0,downscript=no -device virtio-net-pci,netdev=hostnet0,id=net0,mac=00:1a:4a:2e:28:1c,bus=pci.0,addr=0x4,bootindex=2
2. connect to it with using remote-viewer.
remote-viewer spice://m1:5900
3. Check that sound playback with MoviePlayer2.23.6
4. Migrate guest to remote host seamless, then check the sound playback

Expected results:
working sound playback at the same volume It was before migration.

so this bug has been fixed.

Comment 22 errata-xmlrpc 2013-02-21 07:45:59 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-0527.html