[Spice-devel] Help with solving a thread safety issue

Jeremy White jwhite at codeweavers.com
Mon Sep 8 07:57:29 PDT 2014


>> On Sat, Sep 06, 2014 at 08:59:47AM -0500, Jeremy White wrote:
>>>> I think there actually is the same issue when running within QEMU: sound
>>>> is emitted from a QEMU thread:
>>>
>>> Is there a bug or someone that is working on that issue?  I'd be curious to
>>> see if my patch resolves the problem for them.
>>
>> I've only noticed this through code inspection/gdb breakpoints after you
>> pointed out the issue you found.  However, I'm fairly sure there has
>> been reports on this mailing list of sound stopping after a while when
>> watching a video. This matches very closely what you described.
>
> I was thinking of
> http://lists.freedesktop.org/archives/spice-devel/2014-July/017132.html
> Maybe there was another email.

I couldn't quickly figure out the threading arrangement in qemu, but if 
the main channel is being driven by a different thread than the audio 
channel, then I think this patch would have introduced a bug:

---
commit bf9e210b21a66210b19f69fcaa4542b393b7dc22
Author: Yonit Halperin <yhalperi at redhat.com>
Date:   Fri Jan 25 09:34:19 2013 -0500

     red_worker: video streams - adjust client playback latency

--

Of course, that's 18 months ago, so it seems to me we would have found 
it by now (despite it being a subtle, unpredictable bug that only occurs 
during video playback).

But, just to be sure, Nicolas, would you mind setting the 
SPICE_DISABLE_ADAPTIVE_STREAMING environment variable prior to running 
the client and seeing if that changes anything?

Cheers,

Jeremy


More information about the Spice-devel mailing list