From: Jan Kiszka <jan.kiszka@siemens.com>
To: malc <av1474@comtv.ru>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH 1.1] audio: Always call fini on exit
Date: Wed, 16 May 2012 15:01:39 -0300 [thread overview]
Message-ID: <4FB3EB83.1010506@siemens.com> (raw)
In-Reply-To: <alpine.LNX.2.00.1205092333040.3538@linmac>
On 2012-05-09 16:33, malc wrote:
> On Wed, 9 May 2012, Jan Kiszka wrote:
>
>> On 2012-05-03 20:51, malc wrote:
>>> On Thu, 3 May 2012, Jan Kiszka wrote:
>>>
>>>> On 2012-05-03 16:32, malc wrote:
>>>>> On Thu, 3 May 2012, Jan Kiszka wrote:
>>>>>
>>>>>> Not only clean up enabled voices but any registered one. Backends like
>>>>>> pulsaudio rely on unconditional fini handler invocations.
>>>>>>
>>>>>> This fixes "Memory pool destroyed but not all memory blocks freed!"
>>>>>> warnings on VM shutdowns when pa is used.
>>>>>
>>>>> Perhaps it's better to actually handle VOICE_DISABLE in pa's ctl_[in|out]?
>>>>
>>>> This might be some additional issue (that pa is not supporting
>>>> enable/disable). In any case, it is unrelated to this one: fini
>>>> corresponds to init. And as we initialized the voice, we also have to
>>>> finalize it on shutdown. That's what this patch is fixing.
>>>>
>>>
>>> The issue is that i don't remember exactly why it iterates only over
>>> enabled voices, maybe there was a reason, maybe there wasn't, need to
>>> think it over.
>>
>> Any news on this?
>>
>
> Nope.
Can we please get this or similar fix in 1.1.? It not only cures the
annoying warning, I just noticed that, without it, the qemu process
hangs like this on exit when audio was in use by the guest:
(gdb) bt
#0 0x00007f4c2f01b5f0 in sem_wait () from /lib64/libpthread.so.0
#1 0x00007f4c2a695f58 in pa_semaphore_wait () from
/usr/lib64/libpulsecommon-0.9.22.so
#2 0x00007f4c2a67d0a4 in ?? () from /usr/lib64/libpulsecommon-0.9.22.so
#3 0x00007f4c2a67d1ab in ?? () from /usr/lib64/libpulsecommon-0.9.22.so
#4 0x00007f4c2a67fa50 in pa_memimport_free () from
/usr/lib64/libpulsecommon-0.9.22.so
#5 0x00007f4c2a688930 in pa_pstream_unlink () from
/usr/lib64/libpulsecommon-0.9.22.so
#6 0x00007f4c2de1a3ea in ?? () from /usr/lib64/libpulse.so.0
#7 0x00007f4c2de1ad58 in ?? () from /usr/lib64/libpulse.so.0
#8 0x00007f4c30be1aa4 in qpa_audio_fini (opaque=0x7f4c311a98e0) at
/data/qemu-kvm/audio/paaudio.c:875
#9 0x00007f4c2b9fc5a1 in __run_exit_handlers () from /lib64/libc.so.6
#10 0x00007f4c2b9fc5f5 in exit () from /lib64/libc.so.6
#11 0x00007f4c2b9e5c04 in __libc_start_main () from /lib64/libc.so.6
#12 0x00007f4c30bd5219 in _start () at ../sysdeps/x86_64/elf/start.S:103
Thanks,
Jan
--
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
next prev parent reply other threads:[~2012-05-16 18:01 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-03 18:56 [Qemu-devel] [PATCH 1.1] audio: Always call fini on exit Jan Kiszka
2012-05-03 19:32 ` malc
2012-05-03 20:02 ` Jan Kiszka
2012-05-03 23:51 ` malc
2012-05-09 19:27 ` Jan Kiszka
2012-05-09 19:33 ` malc
2012-05-16 18:01 ` Jan Kiszka [this message]
2012-05-24 7:10 ` Gerd Hoffmann
2012-05-24 7:11 ` Gerd Hoffmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4FB3EB83.1010506@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=av1474@comtv.ru \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).