Bug 496627

Summary: qemu-kvm es1370 sound card emulation segfault
Product: [Fedora] Fedora Reporter: Sergei LITVINENKO <sergei.litvinenko>
Component: qemuAssignee: Glauber Costa <gcosta>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 11CC: dwmw2, gcosta, markmc, sergei.litvinenko, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 0.10.6-4.fc11 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-09-11 23:38:23 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Sergei LITVINENKO 2009-04-20 12:46:07 UTC
Description of problem:
As soon as '-soundhw es1370' parameter is used, error message:
>> audio: Failed to create voice `es1370.adc'

After start X Window System inside virtual machine, virtual machine can crash immediatly or some later.


Version-Release number of selected component (if applicable):
qemu-*-0.10-8.fc11, 
qemu-*-0.10-8.fc11 (with 4k boundary patch)
qemu-*-0.10-9.fc11

How reproducible:
95%

Steps to Reproduce:
1. Start virtual machine with '-soundhw es1370' parameter
2. `startx` (I use KDE).
3. Stop X and shutdown virtual machine
  
Actual results:

Virtual machine can crash on X Window System start, or later.

# export LC_ALL=C; export LANG=C
# qemu-kvm -localtime -hda centos-5.img -boot c -net nic,macaddr=52:54:00:12:34:C5 -net tap -soundhw es1370 -m 1024

audio: Failed to create voice `es1370.adc'
audio: Failed to create voice `es1370.adc'
Segmentation fault

Expected results:
Virtual machine work stable and emulate "ENSONIQ AudioPCI ES1370".

Additional info:
Emulation of ac97 do not work too.

Comment 1 Mark McLoughlin 2009-04-20 13:18:46 UTC
Sergei: could you install qemu-debuginfo and get a stack trace using "thread apply all bt full"  ? Does it crash with ac97 too?

Comment 2 Sergei LITVINENKO 2009-04-20 13:58:53 UTC
>>
>> could you install qemu-debuginfo
>>

Yes, I did it

>>
>> and get a stack trace using "thread apply all bt full"
>>

Sorry, I do not have enought knowledge. I can execure your step by step instructions or invite you to my PC... :)

# export LC_ALL=C; export LANG=C;
# qemu-kvm -localtime -hda centos-5.img -boot c -net nic,macaddr=52:54:00:12:34:C5 -net tap -soundhw ac97 -m 1024

audio: Failed to create voice `ac97.pi'
audio: Failed to create voice `ac97.mc'
audio: Failed to create voice `ac97.pi'
audio: Failed to create voice `ac97.mc'
audio: Failed to create voice `ac97.pi'
audio: Failed to create voice `ac97.mc'
audio: Failed to create voice `ac97.pi'
audio: Failed to create voice `ac97.pi'
audio: Failed to create voice `ac97.pi'
audio: Failed to create voice `ac97.pi'
audio: Failed to create voice `ac97.pi'
audio: Failed to create voice `ac97.pi'
audio: Failed to create voice `ac97.pi'
audio: Failed to create voice `ac97.pi'
audio: Failed to create voice `ac97.pi'
audio: Failed to create voice `ac97.mc'
audio: Failed to create voice `ac97.mc'
audio: Failed to create voice `ac97.mc'
audio: Failed to create voice `ac97.mc'
audio: Failed to create voice `ac97.mc'
audio: Failed to create voice `ac97.mc'
audio: Failed to create voice `ac97.mc'
audio: Failed to create voice `ac97.mc'
audio: Failed to create voice `ac97.mc'
^CKilled

System was unaccessible and killed by `kill -9`

Comment 3 Mark McLoughlin 2009-04-20 14:08:06 UTC
(In reply to comment #2)

> >>
> >> and get a stack trace using "thread apply all bt full"
> >>
> 
> Sorry, I do not have enought knowledge. I can execure your step by step
> instructions or invite you to my PC... :)
> 
> # export LC_ALL=C; export LANG=C;
> # qemu-kvm -localtime -hda centos-5.img -boot c -net
> nic,macaddr=52:54:00:12:34:C5 -net tap -soundhw ac97 -m 1024

do:

  $> gdb qemu-kvm
  (gdb) run -localtime -hda centos-5.img -boot c -net ....

then wait until it segfaults, then do:

  (gdb) thread apply all bt full

and you should get a trace of exactly where qemu is crashing. Attach the trace to this bug.

Thanks

Comment 4 Sergei LITVINENKO 2009-04-20 17:48:48 UTC
`qemu-kvm  ... -soundhw ac97` do not segfaults. It freezes on udev start...

Text console inside virtual machine is not active (I can not choice it). Usage of CPU is very small. I can only kill qemu-kvm process, but nothing more.


OK, next step - installation of new guest OS:

I try to install new guest OS Fedora-10 with '-soundhw ac97'.

Installation can not be finished. Symptoms like the same: CPU is used a little, black screen inside virtual machine, no progress last 20 minutes.

Comment 5 Sergei LITVINENKO 2009-04-20 18:29:21 UTC
with '-soundhw ac97' guest OS fedora-10 die on 'starting udev' too.

Comment 6 Mark McLoughlin 2009-04-21 11:51:52 UTC
Sergei: could you try with QEMU_AUDIO_DRV=alsa ?

See also bug #495964

Comment 7 Sergei LITVINENKO 2009-04-21 17:27:22 UTC
>>
>> could you try with QEMU_AUDIO_DRV=alsa ?
>>


With 'QEMU_AUDIO_DRV=alsa' parameter "-soundhw ac97" work perfect.

1. It work for Fedora-10 guest.
2. It work for CentOS-5.3 guest.

Comment 8 Sergei LITVINENKO 2009-04-21 19:05:47 UTC
>>
>> See also bug #495964  
>>

qemu-*-x86-0.10-13.fc12.i586 work with 'QEMU_AUDIO_DRV=pa' excellent, but with 'QEMU_AUDIO_DRV=alsa', hmm, not very good.

Maybe I should downgrade qemu to 0.10-8 or 0.10-10 and test it again...

Comment 9 Mark McLoughlin 2009-04-22 06:31:18 UTC
That's strange - the alsa driver worked fine with 0.10-10 but not with 0.10-13? There shouldn't be a difference in behaviour between the two.

Yes, please do test again.

Comment 10 Sergei LITVINENKO 2009-04-25 12:41:49 UTC
OK, testing is done.

Both servion 0.10-10 and 0.10-13 work with QEMU_AUDIO_DRV=alsa on my system like the same. VM is stable, but quality of sound is between poor and very bad.

I think, problem is in communication between qemu and host machine features ("sound card", "alsa", ...)

[sergeil@homedesk ~]$ cat /proc/asound/cards
 0 [Live]: EMU10K1 - SB Live! 5.1 Dell OEM [SB0228]
    SB Live! 5.1 Dell OEM [SB0228] (rev.10, serial:0x80661102) at 0xe880, irq 18
 1 [Q9000]: USB-Audio - QuickCam Pro 9000
    Logitech, Inc. QuickCam Pro 9000 at usb-0000:00:1d.7-2, high speed

[sergeil@homedesk ~]$ rpm -qa | grep alsa
alsa-plugins-samplerate-1.0.18-3.fc11.i586
alsa-plugins-upmix-1.0.18-3.fc11.i586
alsa-tools-1.0.19-3.fc11.i586
alsa-plugins-usbstream-1.0.18-3.fc11.i586
alsa-oss-1.0.17-3.fc11.i586
alsa-plugins-pulseaudio-1.0.18-3.fc11.i586
alsa-lib-devel-1.0.19-3.fc11.i586
alsa-plugins-jack-1.0.18-3.fc11.i586
alsa-lib-1.0.19-3.fc11.i586
alsa-plugins-oss-1.0.18-3.fc11.i586
alsa-plugins-vdownmix-1.0.18-3.fc11.i586
alsa-utils-1.0.19-4.fc11.i586
alsa-oss-libs-1.0.17-3.fc11.i586


because:

1. Quality of sound in guest OS (first start after host system reboot) is poor. Sound is interrupted every 3-10 seconds 

2. Quality of sound in guest OS (second start after host system reboot) is very bad. Sound is interrupted constantly (pulses)

Quality of Sound in 0.10-13 with QEMU_AUDIO_DRV=pa is very good and stable (like on host OS). For 0.10-10 QEMU_AUDIO_DRV=pa is not applicable, because the same problems as with QEMU_AUDIO_DRV=sdl (guest system freezing).

Comment 11 Mark McLoughlin 2009-05-04 16:05:59 UTC
Okay, I'm a bit confused reading through this bug report, but the upshot seems to be that using the pulseaudio backend works fine for you, is that correct?

Comment 12 Sergei LITVINENKO 2009-05-06 15:11:22 UTC
yes, pulseaudio backend work fine for me...

Comment 13 Fedora Admin XMLRPC Client 2009-05-07 12:12:09 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 14 Fedora Admin XMLRPC Client 2009-05-07 12:13:24 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 15 Fedora Admin XMLRPC Client 2009-05-07 12:13:51 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 16 Fedora Admin XMLRPC Client 2009-05-07 17:58:11 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 17 Mark McLoughlin 2009-05-13 12:22:57 UTC
I've pushed qemu-0.10.4-2.fc11 with the pulseaudio driver enabled; it still isn't used by default, though

Comment 18 Bug Zapper 2009-06-09 14:12:34 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 19 Mark McLoughlin 2009-09-04 10:41:28 UTC
Building this:

* Fri Sep  4 2009 Mark McLoughlin <markmc> - 2:0.10.6-4
- Make pulseaudio the default audio backend (#519540, #495964, #496627)

Will push to updates-testing soon

Comment 20 Fedora Update System 2009-09-04 11:19:25 UTC
qemu-0.10.6-4.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/qemu-0.10.6-4.fc11

Comment 21 Fedora Update System 2009-09-06 20:46:39 UTC
qemu-0.10.6-4.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update qemu'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-9377

Comment 22 Fedora Update System 2009-09-11 23:38:00 UTC
qemu-0.10.6-4.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.