Bug 495964
Summary: | qemu locks up at shutdown with sdl audio driver | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Warren Togami <wtogami> |
Component: | qemu | Assignee: | Glauber Costa <gcosta> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | medium | Docs Contact: | |
Priority: | low | ||
Version: | 11 | CC: | bdwheele, bryan.christ, dwmw2, gcosta, markmc, mrlhwliberty, selinux, 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:17 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: | |||
Bug Depends On: | |||
Bug Blocks: | 480594 |
Description
Warren Togami
2009-04-15 18:23:12 UTC
Can't reproduce this here - what's going on in the guest when you can't kill it? Maybe an strace would shed some light what's going on? This is universally true, kill or clicking on Close Window fails to kill qemu-kvm anywhere during bootup or runtime. (In reply to comment #2) > This is universally true, Well, it's universally untrue here. I've tried everything I can think of to reproduce it, but it works fine here. Does it work okay if you just do e.g. 'qem-kvm -drive file=boot.iso,media=cdrom' ? I removed "-soundhw all" and this problem went away. This wasn't a problem on F-10. Thanks, that helped a lot I took a good look at this and it appears to be some sort of exit-time lockup in qemu's SDL audio driver. Looks like SDL_AudioQuit() is waiting for a thread that never quits Doesn't happen with -nographic, -vnc or QEMU_AUDIO_DRV=alsa A couple of things make me not care much about this: 1) We recommend people use VNC rather than SDL 2) If you use libvirt in F11, sound will be disable anyway There's now a pulseaudio driver in qemu too, so I'm thinking we should build with --audio-drv-list=pa,sdl,alsa,oss I've tested this out and it fixes this particular problem. Haven't actually tested sound, yet though :-) Okay, I've built the following into dist-f12: http://koji.fedoraproject.org/koji/buildinfo?buildID=98887 * Tue Apr 21 2009 Mark McLoughlin <markmc> - 2:0.10-13 - Enable pulseaudio driver to fix qemu lockup at shutdown (#495964) Warren: could you give this a whirl and see if it helps? It'd also be good if you could check that sound still works for you. If it looks good, I'll build for F-11 too. Thanks OK, [root@homedesk QEMU]# rpm -qa | grep qemu qemu-system-x86-0.10-13.fc12.i586 qemu-img-0.10-13.fc12.i586 qemu-common-0.10-13.fc12.i586 My testings: # Sound is very good export QEMU_AUDIO_DRV=pa #Sound is problem enought often, but guest is stable export QEMU_AUDIO_DRV=alsa # guest OS is problem, qemu need to `kill -9` export QEMU_AUDIO_DRV=sdl # Sound is problem, but guest is like stable export QEMU_AUDIO_DRV=oss Command line to run guest: qemu-kvm -localtime $VGA -hda centos-5.img -boot c -net nic,macaddr=52:54:00:12:34:C5 -net tap -soundhw ac97 -m 1024 Guest is CentOS-5.3 No improvement here with the -13.fc12 build. It fails to be killable long before it runs the kernel. (In reply to comment #8) > No improvement here with the -13.fc12 build. Could you run with '-monitor stdio' and confirm that the monitor is no longer responding after you click the window's close button? Also, run under gdb and after you click close, hit Ctrl-C and do "thread apply all bt full" This helpful? (running qemu-kvm on WinXP guest. Here is how I run: qemu-kvm -localtime -vga std -m 512 -usbdevice tablet -name "Windows XP" -hda ~/VirtualMachines/raw.img -k en-us -soundhw es1370 (gdb) thread apply all bt full Thread 4 (Thread 0x7f6d1ffb9910 (LWP 13851)): #0 0x00000038a54d8417 in ioctl () from /lib64/libc.so.6 No symbol table info available. #1 0x000000000054e170 in kvm_run (kvm=0x1e87040, vcpu=0, env=0x1e8ccd0) at libkvm.c:908 r = 0 fd = 9 run = 0x7f6d1f5b5000 #2 0x0000000000520049 in kvm_cpu_exec (env=0x0) at /usr/src/debug/qemu-kvm-0.10/qemu/qemu-kvm.c:205 r = <value optimized out> #3 0x0000000000520330 in kvm_main_loop_cpu (env=<value optimized out>) at /usr/src/debug/qemu-kvm-0.10/qemu/qemu-kvm.c:414 No locals. #4 ap_main_loop (env=<value optimized out>) at /usr/src/debug/qemu-kvm-0.10/qemu/qemu-kvm.c:451 env = 0x1e8ccd0 signals = {__val = {18446744067267100671, 18446744073709551615 <repeats 15 times>}} data = 0x0 #5 0x00000038a600687a in start_thread (arg=<value optimized out>) at pthread_create.c:297 ---Type <return> to continue, or q <return> to quit--- __res = <value optimized out> pd = 0x7f6d1ffb9910 unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140106664745232, -536149756486302589, 243303255648, 0, 0, 3, 456281194571023491, -504831264319552381}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}} not_first_call = <value optimized out> #6 0x00000038a54e014d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112 No locals. #7 0x0000000000000000 in ?? () No symbol table info available. Thread 3 (Thread 0x7f6d1ef20910 (LWP 13861)): #0 pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:220 No locals. #1 0x000000000041a962 in cond_timedwait (ts=<value optimized out>, mutex=<value optimized out>, cond=<value optimized out>) at posix-aio-compat.c:60 No locals. #2 aio_thread (ts=<value optimized out>, mutex=<value optimized out>, ---Type <return> to continue, or q <return> to quit--- cond=<value optimized out>) at posix-aio-compat.c:104 offset = 4096 ret = -516 tv = {tv_sec = 1240783990, tv_usec = 353229} ts = {tv_sec = 1240784000, tv_nsec = 0} pid = 13850 set = {__val = {18446744067267100671, 18446744073709551615 <repeats 15 times>}} #3 0x00000038a600687a in start_thread (arg=<value optimized out>) at pthread_create.c:297 __res = <value optimized out> pd = 0x7f6d1ef20910 unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140106647341328, -536149756486302589, 11928096, 140106647341328, 0, 3, 456283337222833283, -504831264319552381}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}} not_first_call = <value optimized out> #4 0x00000038a54e014d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112 No locals. #5 0x0000000000000000 in ?? () No symbol table info available. Current language: auto; currently minimal ---Type <return> to continue, or q <return> to quit--- Thread 2 (Thread 0x7f6d1e0a9910 (LWP 13863)): #0 sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85 No locals. #1 0x00000038b7e57488 in SDL_SemWait (sem=0x1ef1010) at src/thread/pthread/SDL_syssem.c:90 retval = 402963008 #2 0x0000000000492560 in sdl_wait (forfn=<value optimized out>, s=<value optimized out>) at audio/sdlaudio.c:102 No locals. #3 sdl_callback (forfn=<value optimized out>, s=<value optimized out>) at audio/sdlaudio.c:236 to_mix = 402963008 samples = 512 __FUNCTION__ = "sdl_callback" #4 0x00000038b7e097d8 in SDL_RunAudio (audiop=<value optimized out>) at src/audio/SDL_audio.c:198 audio = 0x1edd920 stream = 0x7f6d1804bad0 "" stream_len = 2048 udata = 0x7f6d1804ba40 fill = 0x492520 <sdl_callback> silence = 0 ---Type <return> to continue, or q <return> to quit--- #5 0x00000038b7e11525 in SDL_RunThread (data=0x7f6d180516d0) at src/thread/SDL_thread.c:202 userfunc = 0x38b7e096a0 <SDL_RunAudio> userdata = 0x1edd920 #6 0x00000038b7e573d9 in RunThread (data=0x1ef1010) at src/thread/pthread/SDL_systhread.c:47 No locals. #7 0x00000038a600687a in start_thread (arg=<value optimized out>) at pthread_create.c:297 __res = <value optimized out> pd = 0x7f6d1e0a9910 unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140106632173840, -536149756486302589, 140106664741776, 0, 0, 3, 456282714989446275, -504831264319552381}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}} not_first_call = <value optimized out> #8 0x00000038a54e014d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112 No locals. #9 0x0000000000000000 in ?? () No symbol table info available. Current language: auto; currently asm ---Type <return> to continue, or q <return> to quit--- Thread 1 (Thread 0x7f6d414176f0 (LWP 13850)): #0 0x00000038a54d8d02 in select () from /lib64/libc.so.6 No symbol table info available. #1 0x0000000000409867 in qemu_select (tv=<value optimized out>, xfds=<value optimized out>, wfds=<value optimized out>, rfds=<value optimized out>, max_fd=<value optimized out>) at /usr/src/debug/qemu-kvm-0.10/qemu/vl.c:3669 No locals. #2 main_loop_wait (tv=<value optimized out>, xfds=<value optimized out>, wfds=<value optimized out>, rfds=<value optimized out>, max_fd=<value optimized out>) at /usr/src/debug/qemu-kvm-0.10/qemu/vl.c:3768 ioh = 0x0 rfds = {fds_bits = {16384, 0 <repeats 15 times>}} wfds = {fds_bits = {0 <repeats 16 times>}} xfds = {fds_bits = {0 <repeats 16 times>}} ret = <value optimized out> nfds = 20 tv = {tv_sec = 0, tv_usec = 998863} #3 0x000000000051fafa in kvm_main_loop () at /usr/src/debug/qemu-kvm-0.10/qemu/qemu-kvm.c:596 fds = {12, 13} mask = {__val = {268443648, 0 <repeats 15 times>}} ---Type <return> to continue, or q <return> to quit--- sigfd = <value optimized out> #4 0x000000000040e677 in main_loop () at /usr/src/debug/qemu-kvm-0.10/qemu/vl.c:3831 ret = <value optimized out> timeout = <value optimized out> env = <value optimized out> #5 main () at /usr/src/debug/qemu-kvm-0.10/qemu/vl.c:6126 use_gdbstub = 0 gdbstub_port = 0x553ac0 "1234" boot_devices_bitmap = <value optimized out> i = <value optimized out> snapshot = <value optimized out> linux_boot = <value optimized out> net_boot = <value optimized out> initrd_filename = 0x0 kernel_filename = 0x0 kernel_cmdline = 0x58cc6b "" boot_devices = 0x55402f "cad" dcl = <value optimized out> cyls = 0 heads = 0 secs = 0 translation = 0 ---Type <return> to continue, or q <return> to quit--- net_clients = {0x553bee "nic", 0x554033 "user", 0x7fff49ae8370 "\1", 0x0, 0x38b7ce1ad0 "\1", 0x38a500d154 "H\213u\300H\205\366\17\205/\b", 0x7f6d41ae8658 "", 0x7f6d418b2000 "", 0x7f6d418b4000 "", 0x7f6d418b44c8 "", 0x7f6d418b3998 "", 0x0, 0xfffe935d16400000 <Address 0xfffe935d16400000 out of bounds>, 0x7f6d41ae8b20 "", 0x0, 0x38a6401266 "libc.so.6", 0x7fff49ae85f0 "", 0xfffe935d09800000 <Address 0xfffe935d09800000 out of bounds>, 0x714a01d2f60000 <Address 0x714a01d2f60000 out of bounds>, 0x7fff49ae8ab0 ".", 0x7fff49ae8b20 "`lG\245\70", 0x7f6d41ae8658 "", 0x0, 0x38a5803876 "libc.so.6", 0x7fff49ae86d0 "\377\377\377\377\377\377\377\377", 0x38a500ca5d "H\211C H\203\304\20[\303f\17\37\204", 0x0, 0xc7039d165dfe6d12 <Address 0xc7039d165dfe6d12 out of bounds>, 0x0, 0x38a500e996 "H\213\204$\30\1", 0x38a521faf8 "", 0x7fff49ae8ad8 "\320;@\245\70"} nb_net_clients = <value optimized out> bt_opts = {0x38a521faf8 "", 0x0, 0x7fff49ae8ae0 "", 0x7da978 "\1", 0xfffe935d16400000 <Address 0xfffe935d16400000 out of bounds>, 0x7f6d41ae9000 "", 0x0, 0x4031a1 "libc.so.6", 0x0, 0xfffe935d0d800000 <Address 0xfffe935d0d800000 out of bounds>} nb_bt_opts = <value optimized out> hda_index = <value optimized out> ---Type <return> to continue, or q <return> to quit--- optind = <value optimized out> r = <value optimized out> optarg = <value optimized out> monitor_hd = 0x1e88dd0 monitor_device = <value optimized out> serial_devices = {0x553dac "vc:80Cx24C", 0x0, 0x0, 0x0} serial_device_index = <value optimized out> parallel_devices = {0x553dac "vc:80Cx24C", 0x0, 0x0} parallel_device_index = <value optimized out> virtio_console_index = 0 loadvm = 0x0 machine = <value optimized out> cpu_model = 0x0 usb_devices = {0x7fff49ae95b5 "tablet", 0x7f6d41ae9000 "", 0x0, 0x403168 "libX11.so.6", 0x0, 0xfffe935d0de00000 <Address 0xfffe935d0de00000 out of bounds>, 0x714a01d2f60000 <Address 0x714a01d2f60000 out of bounds>, 0x7f6d41ae9000 ""} usb_devices_index = <value optimized out> fds = {8235368, 0} tb_size = 0 pid_file = 0x0 incoming = 0x0 ---Type <return> to continue, or q <return> to quit--- fd = 0 pwd = 0x0 chroot_dir = 0x0 run_as = 0x0 Current language: auto; currently minimal (gdb) Forgot to mention that the above was with: qemu-kvm-tools-0.10-12.fc11.x86_64 qemu-system-x86-0.10-12.fc11.x86_64 qemu-debuginfo-0.10-12.fc11.x86_64 qemu-common-0.10-12.fc11.x86_64 qemu-img-0.10-12.fc11.x86_64 I'll look for latest koji build and retry.... OK... reran with -14. Looks similar: (gdb) where #0 0x00000038a54d8d02 in select () from /lib64/libc.so.6 #1 0x0000000000409867 in qemu_select (tv=<value optimized out>, xfds=<value optimized out>, wfds=<value optimized out>, rfds=<value optimized out>, max_fd=<value optimized out>) at /usr/src/debug/qemu-kvm-0.10/qemu/vl.c:3669 #2 main_loop_wait (tv=<value optimized out>, xfds=<value optimized out>, wfds=<value optimized out>, rfds=<value optimized out>, max_fd=<value optimized out>) at /usr/src/debug/qemu-kvm-0.10/qemu/vl.c:3768 #3 0x000000000051fb8a in kvm_main_loop () at /usr/src/debug/qemu-kvm-0.10/qemu/qemu-kvm.c:596 #4 0x000000000040e677 in main_loop () at /usr/src/debug/qemu-kvm-0.10/qemu/vl.c:3831 #5 main () at /usr/src/debug/qemu-kvm-0.10/qemu/vl.c:6126 (gdb) thread apply all bt full Thread 4 (Thread 0x7fead6af6910 (LWP 14212)): #0 0x00000038a54d8417 in ioctl () from /lib64/libc.so.6 No symbol table info available. #1 0x000000000054e210 in kvm_run (kvm=0x2837040, vcpu=0, env=0x283ccd0) at libkvm.c:908 r = 0 fd = 9 run = 0x7fead60f2000 #2 0x00000000005200d9 in kvm_cpu_exec (env=0x0) at /usr/src/debug/qemu-kvm-0.10/qemu/qemu-kvm.c:205 r = <value optimized out> #3 0x00000000005203c0 in kvm_main_loop_cpu (env=<value optimized out>) at /usr/src/debug/qemu-kvm-0.10/qemu/qemu-kvm.c:414 No locals. #4 ap_main_loop (env=<value optimized out>) at /usr/src/debug/qemu-kvm-0.10/qemu/qemu-kvm.c:451 env = 0x283ccd0 signals = {__val = {18446744067267100671, 18446744073709551615 <repeats 15 times>}} data = 0x0 #5 0x00000038a600687a in start_thread (arg=<value optimized out>) at pthread_create.c:297 ---Type <return> to continue, or q <return> to quit--- __res = <value optimized out> pd = 0x7fead6af6910 unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140646600894736, 2606184458980167275, 243303255648, 0, 0, 3, -2594447580858937749, 2619488552620658283}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}} not_first_call = <value optimized out> #6 0x00000038a54e014d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112 No locals. #7 0x0000000000000000 in ?? () No symbol table info available. Thread 3 (Thread 0x7fead5a5d910 (LWP 14221)): #0 pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:220 No locals. #1 0x000000000041a962 in cond_timedwait (ts=<value optimized out>, mutex=<value optimized out>, cond=<value optimized out>) at posix-aio-compat.c:60 No locals. #2 aio_thread (ts=<value optimized out>, mutex=<value optimized out>, ---Type <return> to continue, or q <return> to quit--- cond=<value optimized out>) at posix-aio-compat.c:104 offset = 65536 ret = -516 tv = {tv_sec = 1240784592, tv_usec = 202938} ts = {tv_sec = 1240784602, tv_nsec = 0} pid = 14211 set = {__val = {18446744067267100671, 18446744073709551615 <repeats 15 times>}} #3 0x00000038a600687a in start_thread (arg=<value optimized out>) at pthread_create.c:297 __res = <value optimized out> pd = 0x7fead5a5d910 unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140646583490832, 2606184458980167275, 11928256, 140646583490832, 0, 3, -2594445300768174485, 2619488552620658283}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}} not_first_call = <value optimized out> #4 0x00000038a54e014d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112 No locals. #5 0x0000000000000000 in ?? () No symbol table info available. Current language: auto; currently minimal ---Type <return> to continue, or q <return> to quit--- Thread 2 (Thread 0x7fead4be6910 (LWP 14223)): #0 sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85 No locals. #1 0x00000038b7e57488 in SDL_SemWait (sem=0x28a1010) at src/thread/pthread/SDL_syssem.c:90 retval = -804985232 #2 0x00000000004925b0 in sdl_wait (forfn=<value optimized out>, s=<value optimized out>) at audio/sdlaudio.c:102 No locals. #3 sdl_callback (forfn=<value optimized out>, s=<value optimized out>) at audio/sdlaudio.c:236 to_mix = -804985232 samples = 512 __FUNCTION__ = "sdl_callback" #4 0x00000038b7e097d8 in SDL_RunAudio (audiop=<value optimized out>) at src/audio/SDL_audio.c:198 audio = 0x288d920 stream = 0x7fead004e700 "" stream_len = 2048 udata = 0x7fead004e670 fill = 0x492570 <sdl_callback> silence = 0 ---Type <return> to continue, or q <return> to quit--- #5 0x00000038b7e11525 in SDL_RunThread (data=0x7fead0054300) at src/thread/SDL_thread.c:202 userfunc = 0x38b7e096a0 <SDL_RunAudio> userdata = 0x288d920 #6 0x00000038b7e573d9 in RunThread (data=0x28a1010) at src/thread/pthread/SDL_systhread.c:47 No locals. #7 0x00000038a600687a in start_thread (arg=<value optimized out>) at pthread_create.c:297 __res = <value optimized out> pd = 0x7fead4be6910 unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140646568323344, 2606184458980167275, 140646600891280, 0, 0, 3, -2594443328841314709, 2619488552620658283}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}} not_first_call = <value optimized out> #8 0x00000038a54e014d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112 No locals. #9 0x0000000000000000 in ?? () No symbol table info available. Current language: auto; currently asm ---Type <return> to continue, or q <return> to quit--- Thread 1 (Thread 0x7feaf7f546f0 (LWP 14211)): #0 0x00000038a54d8d02 in select () from /lib64/libc.so.6 No symbol table info available. #1 0x0000000000409867 in qemu_select (tv=<value optimized out>, xfds=<value optimized out>, wfds=<value optimized out>, rfds=<value optimized out>, max_fd=<value optimized out>) at /usr/src/debug/qemu-kvm-0.10/qemu/vl.c:3669 No locals. #2 main_loop_wait (tv=<value optimized out>, xfds=<value optimized out>, wfds=<value optimized out>, rfds=<value optimized out>, max_fd=<value optimized out>) at /usr/src/debug/qemu-kvm-0.10/qemu/vl.c:3768 ioh = 0x0 rfds = {fds_bits = {1855632, 0 <repeats 15 times>}} wfds = {fds_bits = {0 <repeats 16 times>}} xfds = {fds_bits = {0 <repeats 16 times>}} ret = <value optimized out> nfds = 20 tv = {tv_sec = 0, tv_usec = 999261} #3 0x000000000051fb8a in kvm_main_loop () at /usr/src/debug/qemu-kvm-0.10/qemu/qemu-kvm.c:596 fds = {12, 13} mask = {__val = {268443648, 0 <repeats 15 times>}} ---Type <return> to continue, or q <return> to quit--- sigfd = <value optimized out> #4 0x000000000040e677 in main_loop () at /usr/src/debug/qemu-kvm-0.10/qemu/vl.c:3831 ret = <value optimized out> timeout = <value optimized out> env = <value optimized out> #5 main () at /usr/src/debug/qemu-kvm-0.10/qemu/vl.c:6126 use_gdbstub = 0 gdbstub_port = 0x553b60 "1234" boot_devices_bitmap = <value optimized out> i = <value optimized out> snapshot = <value optimized out> linux_boot = <value optimized out> net_boot = <value optimized out> initrd_filename = 0x0 kernel_filename = 0x0 kernel_cmdline = 0x58cd0b "" boot_devices = 0x5540cf "cad" dcl = <value optimized out> cyls = 0 heads = 0 secs = 0 translation = 0 ---Type <return> to continue, or q <return> to quit--- net_clients = {0x553c8e "nic", 0x5540d3 "user", 0x7fff00623f30 "\1", 0x0, 0x38b7ce1ad0 "\1", 0x38a500d154 "H\213u\300H\205\366\17\205/\b", 0x7feaf8625658 "", 0x7feaf83ef000 "", 0x7feaf83f1000 "", 0x7feaf83f14c8 "", 0x7feaf83f0998 "", 0x0, 0xfffe00c48dc00000 <Address 0xfffe00c48dc00000 out of bounds>, 0x7feaf8625b20 "", 0x0, 0x38a6401266 "libc.so.6", 0x7fff006241b0 "", 0xfffe00c481000000 <Address 0xfffe00c481000000 out of bounds>, 0x714a01d2f60000 <Address 0x714a01d2f60000 out of bounds>, 0x7fff00624670 ".", 0x7fff006246e0 "`lG\245\70", 0x7feaf8625658 "", 0x0, 0x38a5803876 "libc.so.6", 0x7fff00624290 "\377\377\377\377\377\377\377\377", 0x38a500ca5d "H\211C H\203\304\20[\303f\17\37\204", 0x0, 0xc7039d165dfe6d12 <Address 0xc7039d165dfe6d12 out of bounds>, 0x0, 0x38a500e996 "H\213\204$\30\1", 0x38a521faf8 "", 0x7fff00624698 "\320;@\245\70"} nb_net_clients = <value optimized out> bt_opts = {0x38a521faf8 "", 0x0, 0x7fff006246a0 "", 0x7daa10 "\1", 0xfffe00c48dc00000 <Address 0xfffe00c48dc00000 out of bounds>, 0x7feaf8626000 "", 0x0, 0x4031a1 "libc.so.6", 0x0, 0xfffe00c485000000 <Address 0xfffe00c485000000 out of bounds>} nb_bt_opts = <value optimized out> hda_index = <value optimized out> ---Type <return> to continue, or q <return> to quit--- optind = <value optimized out> r = <value optimized out> optarg = <value optimized out> monitor_hd = 0x2838dd0 monitor_device = <value optimized out> serial_devices = {0x553e4c "vc:80Cx24C", 0x0, 0x0, 0x0} serial_device_index = <value optimized out> parallel_devices = {0x553e4c "vc:80Cx24C", 0x0, 0x0} parallel_device_index = <value optimized out> virtio_console_index = 0 loadvm = 0x0 machine = <value optimized out> cpu_model = 0x0 usb_devices = {0x7fff006255b5 "tablet", 0x7feaf8626000 "", 0x0, 0x403168 "libX11.so.6", 0x0, 0xfffe00c485600000 <Address 0xfffe00c485600000 out of bounds>, 0x714a01d2f60000 <Address 0x714a01d2f60000 out of bounds>, 0x7feaf8626000 ""} usb_devices_index = <value optimized out> fds = {8235520, 0} tb_size = 0 pid_file = 0x0 incoming = 0x0 ---Type <return> to continue, or q <return> to quit--- fd = 0 pwd = 0x0 chroot_dir = 0x0 run_as = 0x0 Current language: auto; currently minimal (gdb) qemu-*-0.10-15.fc11.i586 is configured without 'pa' support (--audio-drv-list=sdl,alsa,oss). It is problem for me, because on my system qemu by 'alsa' audio-drv works bad and freeze virtual machine by 'sdl' audio-drv. export QEMU_AUDIO_DRV=alsa export QEMU_AUDIO_DAC_FIXED_FREQ=48000 export QEMU_AUDIO_ADC_FIXED_FREQ=48000 export QEMU_ALSA_DAC_BUFFER_SIZE=4096 made quality of sound applicable... (In reply to comment #14) > export QEMU_AUDIO_DRV=alsa > export QEMU_AUDIO_DAC_FIXED_FREQ=48000 > export QEMU_AUDIO_ADC_FIXED_FREQ=48000 > export QEMU_ALSA_DAC_BUFFER_SIZE=4096 > > made quality of sound applicable... Probably off-topic for this BZ, but this does not work reliably for me running qemu-kvm on a WinXP guest: QEMU_AUDIO_DRV=alsa QEMU_AUDIO_DAC_FIXED_FREQ=48000 QEMU_AUDIO_ADC_FIXED_FREQ=48000 QEMU_ALSA_DAC_BUFFER_SIZE=4096 qemu-kvm -localtime -vga std -m 512 -usbdevice tablet -name "Windows XP" -hda ~/VirtualMachines/raw.img -k en-us -soundhw es1370 I haven't figured out what makes it work (or not) yet. Tested on latest package from koji: -10.16. When it doesn't work, I get static/choppy/low-quality sound from the guest, the same as if I didn't have the extra FREQ/SIZE exports. Guys - please try and keep bug reports confined to a single issue This bug is just about the lockup at shutdown using the SDL audio driver. Tom: thanks much for the stack traces. Could you test this f12 version from Koji to see if using the pulseaudio backend resolves the issue for you? It worked for me http://koji.fedoraproject.org/koji/buildinfo?buildID=99512 if it does lockup using this version, please get a stack trace like the one above. Nope, still "hangs on shutdown" for me. (I'm missing some recent debuginfo packages. Let me know if you need me to update all of those and rerun.) [root@tlondon ~]# rpm -qa qemu\* qemu-debuginfo-0.10-15.fc12.x86_64 qemu-system-x86-0.10-15.fc12.x86_64 qemu-img-0.10-15.fc12.x86_64 qemu-kvm-tools-0.10-15.fc12.x86_64 qemu-common-0.10-15.fc12.x86_64 [root@tlondon ~]# (gdb) where #0 0x0000003f02e07b2d in pthread_join () from /lib64/libpthread.so.0 #1 0x0000003f1481166e in SDL_WaitThread (thread=0x7f9604051830, status=0x0) at src/thread/SDL_thread.c:270 #2 0x0000003f14808dfa in SDL_AudioQuit () at src/audio/SDL_audio.c:629 #3 0x0000003f148082cd in SDL_QuitSubSystem (flags=65535) at src/SDL.c:196 #4 0x0000003f1480834e in SDL_Quit () at src/SDL.c:222 #5 0x0000003f02236c82 in exit () from /lib64/libc.so.6 #6 0x0000003f0221e9e4 in __libc_start_main () from /lib64/libc.so.6 #7 0x00000000004076d9 in _start () (gdb) thread apply all bt full Thread 3 (Thread 0x7f960c3cd910 (LWP 3644)): #0 0x0000003f0223480e in sigtimedwait () from /lib64/libc.so.6 No symbol table info available. #1 0x00000000005213f1 in kvm_main_loop_wait (env=0x147ccd0, timeout=<value optimized out>) at /usr/src/debug/qemu-kvm-0.10/qemu/qemu-kvm.c:253 ts = {tv_sec = 1, tv_nsec = 0} r = <value optimized out> e = <value optimized out> siginfo = {si_signo = 38, si_errno = 0, si_code = 0, _sifields = { _pad = {3643, 500, 265388032, -30719, 907038976, 32767, 163348312, -30719, -1127303496, -30720, -1127305216, -30720, 163348248, -30719, -2129802936, -1, 163348344, -30719, -1127305216, -30720, 163348344, -30719, -2130147914, -1, 14, 0, -2126860287, -1}, _kill = {si_pid = 3643, si_uid = 500}, _timer = {si_tid = 3643, si_overrun = 500, si_sigval = {sival_int = 265388032, sival_ptr = 0xffff88010fd18000}}, _rt = {si_pid = 3643, si_uid = 500, si_sigval = {sival_int = 265388032, sival_ptr = 0xffff88010fd18000}}, _sigchld = {si_pid = 3643, si_uid = 500, si_status = 265388032, si_utime = 140734100427008, si_stime = -131936937017512}, _sigfault = { si_addr = 0x1f400000e3b}, _sigpoll = {si_band = 2147483651643, ---Type <return> to continue, or q <return> to quit--- si_fd = 265388032}}} waitset = {__val = {137438953472, 0 <repeats 15 times>}} #2 0x00000000005216d1 in kvm_main_loop_cpu (env=<value optimized out>) at /usr/src/debug/qemu-kvm-0.10/qemu/qemu-kvm.c:404 No locals. #3 ap_main_loop (env=<value optimized out>) at /usr/src/debug/qemu-kvm-0.10/qemu/qemu-kvm.c:451 env = 0x147ccd0 signals = {__val = {18446744067267100671, 18446744073709551615 <repeats 15 times>}} data = 0x0 #4 0x0000003f02e0687a in start_thread () from /lib64/libpthread.so.0 No symbol table info available. #5 0x0000003f022e04cd in clone () from /lib64/libc.so.6 No symbol table info available. #6 0x0000000000000000 in ?? () No symbol table info available. Thread 2 (Thread 0x7f960a8df910 (LWP 3653)): #0 0x0000003f02e0d1f1 in sem_wait () from /lib64/libpthread.so.0 No symbol table info available. #1 0x0000003f14857488 in SDL_SemWait (sem=0x14b4e50) at src/thread/pthread/SDL_syssem.c:90 ---Type <return> to continue, or q <return> to quit--- retval = 67393936 #2 0x00000000004929b0 in sdl_wait (forfn=<value optimized out>, s=<value optimized out>) at audio/sdlaudio.c:102 No locals. #3 sdl_callback (forfn=<value optimized out>, s=<value optimized out>) at audio/sdlaudio.c:236 to_mix = 146 samples = 366 __FUNCTION__ = "sdl_callback" #4 0x0000003f148097d8 in SDL_RunAudio (audiop=<value optimized out>) at src/audio/SDL_audio.c:198 audio = 0x14b4a20 stream = 0x7f9604045a20 "" stream_len = 2048 udata = 0x7f9604045990 fill = 0x492970 <sdl_callback> silence = 0 #5 0x0000003f14811525 in SDL_RunThread (data=0x7f9604052690) at src/thread/SDL_thread.c:202 userfunc = 0x3f148096a0 <SDL_RunAudio> userdata = 0x14b4a20 #6 0x0000003f148573d9 in RunThread (data=0x14b4e50) at src/thread/pthread/SDL_systhread.c:47 ---Type <return> to continue, or q <return> to quit--- No locals. #7 0x0000003f02e0687a in start_thread () from /lib64/libpthread.so.0 No symbol table info available. #8 0x0000003f022e04cd in clone () from /lib64/libc.so.6 No symbol table info available. #9 0x0000000000000000 in ?? () No symbol table info available. Thread 1 (Thread 0x7f962d82b740 (LWP 3643)): #0 0x0000003f02e07b2d in pthread_join () from /lib64/libpthread.so.0 No symbol table info available. #1 0x0000003f1481166e in SDL_WaitThread (thread=0x7f9604051830, status=0x0) at src/thread/SDL_thread.c:270 No locals. #2 0x0000003f14808dfa in SDL_AudioQuit () at src/audio/SDL_audio.c:629 audio = 0x14b4a20 #3 0x0000003f148082cd in SDL_QuitSubSystem (flags=65535) at src/SDL.c:196 No locals. #4 0x0000003f1480834e in SDL_Quit () at src/SDL.c:222 No locals. #5 0x0000003f02236c82 in exit () from /lib64/libc.so.6 No symbol table info available. #6 0x0000003f0221e9e4 in __libc_start_main () from /lib64/libc.so.6 ---Type <return> to continue, or q <return> to quit--- No symbol table info available. #7 0x00000000004076d9 in _start () No symbol table info available. (gdb) Ahh, I may have misread your comment. I think you wanted me to rerun testing the "pa" backend, not the SDL one. Right? The above is another test using the SDL backend. I reran specifying "QEMU_AUDIO_DRV=pa qemu-kvm ....", and had NO problems with sound or with shutdown. [root@tlondon ~]# rpm -qa qemu\* qemu-debuginfo-0.10-15.fc12.x86_64 qemu-system-x86-0.10-15.fc12.x86_64 qemu-img-0.10-15.fc12.x86_64 qemu-kvm-tools-0.10-15.fc12.x86_64 qemu-common-0.10-15.fc12.x86_64 [root@tlondon ~]# (In reply to comment #18) > I reran specifying "QEMU_AUDIO_DRV=pa qemu-kvm ....", and had NO problems with > sound or with shutdown. Many thanks Tom, that's exactly what I wanted. Okay, I think that confirms that using the pulseaudio backend fixes this bug. Could you confirm one last thing for me? If you run qemu-kvm without any QEMU_AUDIO_DRV variable set, is it automatically using the pa backend? It did in my testing, but I just want to be sure. If it does, then I think we should switch to pulseaudio for F11 final. It should also resolve the issues reported by Sergei in bug #496627 *** Bug 499059 has been marked as a duplicate of this bug. *** (In reply to comment #19) > (In reply to comment #18) > > > I reran specifying "QEMU_AUDIO_DRV=pa qemu-kvm ....", and had NO problems with > > sound or with shutdown. > > Many thanks Tom, that's exactly what I wanted. > > Okay, I think that confirms that using the pulseaudio backend fixes this bug. > > Could you confirm one last thing for me? If you run qemu-kvm without any > QEMU_AUDIO_DRV variable set, is it automatically using the pa backend? It did > in my testing, but I just want to be sure. > > If it does, then I think we should switch to pulseaudio for F11 final. It > should also resolve the issues reported by Sergei in bug #496627 I don't believe it is using "pa" as the default; is there some way to get qemu-kvm to tell me? Anyway, if I run without QEMU_AUDIO_DRV=pa: "qemu-kvm -localtime -vga std -m 512 -usbdevice tablet -name "Windows XP" -hda ~/VirtualMachines/raw.img -k en-us -soundhw es1370" [tbl@tlondon ~]$ qemu-kvm -localtime -vga std -m 512 -usbdevice tablet -name "Windows XP" -hda ~/VirtualMachines/raw.img -k en-us -soundhw es1370 audio: Failed to create voice `es1370.adc' audio: Failed to create voice `es1370.adc' audio: Failed to create voice `es1370.adc' audio: Failed to create voice `es1370.adc' Killed [tbl@tlondon ~]$ I get sound output, but microphone appears not to function. And it hangs on shutdown: (gdb) where #0 0x0000003f02e07b2d in pthread_join (threadid=139964373285136, thread_return=0x0) at pthread_join.c:89 #1 0x0000003f1481166e in SDL_WaitThread (thread=0x7f4bf8039c30, status=0x0) at src/thread/SDL_thread.c:270 #2 0x0000003f14808dfa in SDL_AudioQuit () at src/audio/SDL_audio.c:629 #3 0x0000003f148082cd in SDL_QuitSubSystem (flags=65535) at src/SDL.c:196 #4 0x0000003f1480834e in SDL_Quit () at src/SDL.c:222 #5 0x0000003f02236c82 in __run_exit_handlers (status=<value optimized out>, status=<value optimized out>, listp=<value optimized out>, run_list_atexit=<value optimized out>) at exit.c:78 #6 *__GI_exit (status=<value optimized out>, status=<value optimized out>, listp=<value optimized out>, run_list_atexit=<value optimized out>) at exit.c:100 #7 0x0000003f0221e9e4 in __libc_start_main (main=<value optimized out>, argc=<value optimized out>, ubp_av=<value optimized out>, init=<value optimized out>, fini=<value optimized out>, rtld_fini=<value optimized out>, stack_end=0x7fff2a428678) at libc-start.c:252 #8 0x00000000004076d9 in _start () Current language: auto; currently minimal (gdb) If I run with "QEMU_AUDIO_DRV=pa qemu-kvm -localtime -vga std -m 512 -usbdevice tablet -name "Windows XP" -hda ~/VirtualMachines/raw.img -k en-us -soundhw es1370" [tbl@tlondon ~]$ QEMU_AUDIO_DRV=pa qemu-kvm -localtime -vga std -m 512 -usbdevice tablet -name "Windows XP" -hda ~/VirtualMachines/raw.img -k en-us -soundhw es1370 [tbl@tlondon ~]$ I get a (sort of) working microphone, and no hang on shutdown. Also, I noticed that when I run without QEMU_AUDIO_DRV=pa, pavucontrol reports only an output stream for qemu, while when I run with QEMU_AUDIO_DRV=pa I get both input and output streams. Conclusion: default is SDL. Ah, I've just discovered 'qemu-kvm -audio-help' ... hidden command line switch! And also, just discovered this: audio/paaudio.c:510: INIT_FIELD (can_be_default = ) 0, i.e. it will not use the pulseaudio backend by default, you need to explicitly request it. We could patch it, but it does suggest that upstream doesn't think this backend is up to snuff yet ... even though it works far better for us than other backends. Hmm. I did stumble across one issue..... I (foolheartedly) tried installing/running skype on the WinXP guest with pulseaudio enabled..... Ended up putting qemu-kvm into a bad state. I'll open a separate BZ on this if I can reproduce.... Regarding the default use of pulseaudio, do you suppose this could be handled with an "environment setting" of "QEMU_AUDIO_DRV=pa" in a /etc/profile.d/qemu-kvm.sh or some such.... Well, if setting pulseaudio as the default is the "right thing", the following seems to "work for me": [root@tlondon ~]# cat /etc/profile.d/qemu-kvm.sh # Make pulseaudio be the default audio backend export QEMU_AUDIO_DRV=pa [root@tlondon ~]# After creating that file, and then logging out and back in again, running qemu-kvm without an explicit "QEMU_AUDIO_DRV" selects pulseaudio. Would probably need a .csh version too.... Big picture wise, we just want an audio backend that integrates well with our desktop. We use pulseaudio as a sound server, so I think it makes sense to use the pulseaudio backend. The SDL library is just an indirection layer which, in theory, an app like qemu can use to integrate with the desktop while using the same API in all cases. Except it's broken. Long term, we'll want to re-direct audio over e.g. VNC/QXL if the user is connecting to the VM remotely - i.e. we'll want a "output the display and audio to the local desktop console" (similar to -sdl) and a "output the display and audio to a remote client" (similar to -vnc currently) But right now, if we can conclude that the pulseaudio backend is better than the SDL backend, I think we should just switch to it by default. The only thing stopping us from doing that right now is figuring out why upstream doesn't think the pulseaudio backend is suitable as the default. >> The only thing stopping us from doing that right now
>> is figuring out why upstream doesn't think the
>> pulseaudio backend is suitable as the default.
Unfortunatelly, not all so good with 'pa' as we want. From time to time I have guest OS slowdown and qemu-kvm eat 100% of CPU till guest OS shutdown. So, 'pa' interface show best sound quality result, but it is less stable as alsa.
This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component. This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component. This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component. This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component. I've pushed qemu-0.10.4-2.fc11 with the pulseaudio driver enabled; it still isn't used by default, though qemu-0.10.4-2.fc11 "works for me" with "QEMU_AUDIO_DRV=pa" set.... 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 *** Bug 505332 has been marked as a duplicate of this bug. *** *** Bug 507024 has been marked as a duplicate of this bug. *** 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 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 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 Did a quick test and it seemed to work for me. I'll try it more heavily tomorrow. Appears to be fixed. (In reply to comment #40) > Appears to be fixed. Thanks for testing Bryan, it'll appear in stable updates any day now 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. |