On Tue, 14 Jan 2020, Michael Tokarev wrote:

Can you please try one more thing here, - namely, getting a backtrace?
Qemu being unresponsible means it is the main thread which is blocked,
so getting a backtrace should be easy - please install the qemu-system-x86
debug package (after adding something like this to sources.list:
 deb http://deb.debian.org/debian-debug/ stable-debug main
, see https://wiki.debian.org/AutomaticDebugPackages), and get a backtrace
using gdb, like this:

 gdb /usr/bin/qemu-system-x86_64 -p <pid-of-the-qemu-process>

and do a `bt' command in there, posting the results from it.

Thank you!

Of course, should've thought of that myself actually :)

(gdb) bt
#0  0x000055adc699e86c in conv_natural_int16_t_to_stereo (dst=<optimized out>, 
src=<optimized out>, samples=<optimized out>)
    at ./audio/mixeng_template.h:110
#1  0x000055adc699b4b9 in audio_pcm_hw_run_in (samples=18446744048139465969, 
hw=0x55adca24ec20) at ./audio/audio.c:1249
#2  0x000055adc699b4b9 in audio_run_in (s=0x55adca249330) at 
./audio/audio.c:1280
#3  0x000055adc699b4b9 in audio_run (s=0x55adca249330, msg=msg@entry=0x55adc6d04098 
"alsa run (running)") at ./audio/audio.c:1355
#4  0x000055adc69a0988 in alsa_poll_handler (opaque=0x55adca24ecc0) at 
./audio/alsaaudio.c:203
#5  0x000055adc6c93ed7 in aio_dispatch_handlers (ctx=ctx@entry=0x55adc92400c0) 
at ./util/aio-posix.c:429
#6  0x000055adc6c948a8 in aio_dispatch (ctx=0x55adc92400c0) at 
./util/aio-posix.c:460
#7  0x000055adc6c9117e in aio_ctx_dispatch (source=<optimized out>, callback=<optimized 
out>, user_data=<optimized out>) at ./util/async.c:260
#8  0x00007f99c123df1d in g_main_context_dispatch () at 
/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#9  0x000055adc6c93948 in glib_pollfds_poll () at ./util/main-loop.c:219
#10 0x000055adc6c93948 in os_host_main_loop_wait (timeout=<optimized out>) at 
./util/main-loop.c:242
#11 0x000055adc6c93948 in main_loop_wait (nonblocking=<optimized out>) at 
./util/main-loop.c:518
#12 0x000055adc6994e0e in main_loop () at ./vl.c:1810
#13 0x000055adc67fb0c9 in main (argc=<optimized out>, argv=<optimized out>, 
envp=<optimized out>) at ./vl.c:4466
(gdb)

I also forgot to note down some other important information, namely the commandline options and config plus few quite related environment variables .. the commandline is

qemu-system-x86_64 --enable-kvm -readconfig test.config -soundhw hda -vga qxl -display gtk

contents of test.config attached.

I have the following environment variables set in my script that runs qemu:
export QEMU_AUDIO_DAC_TRY_POLL=0
export QEMU_AUDIO_DRV="alsa"
export QEMU_ALSA_ADC_DEV="null"

That DAC_TRY_POLL=0 was essential to get things working with dmix, DRV is obvious, ADC I've set just null because I'm not using mic or anything.

Hopefully this helps. I should probably fiddle around and test some more, but have been a bit busy with other things.

--
] ccr/TNSP ^ pWp  ::  c...@tnsp.org  ::  https://tnsp.org/~ccr/
] https://tnsp.org/hg/ -- https://www.openhub.net/accounts/ccr
] PGP key: 7BED 62DE 898D D1A4 FC4A  F392 B705 E735 307B AAE3
# qemu config file

[drive]
  driver = "raw"
  file = "/misc/virtual/test.img"
  if = "virtio"

[device]
  driver = "usb-tablet"

[nic]
  type = "user"
  model = "virtio-net-pci"

[rtc]
  base = "localtime"
  clock = "host"

[machine]
  accel = "kvm"
  usb = "on"

[memory]
  size = "12G"

[smp-opts]
  cpus = "8"
  sockets = "1"
  cores = "4"
  threads = "2"

Reply via email to