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

2014-09-24 Thread Jeremy White
[snip] > So we should be good with that code here. Thanks for doing that analysis; that is interesting. I guess it's good news that the bug I found affects only Xspice audio users. I have to admit I find the overall structure of the code somewhat troubling. I'll go ahead and submit my patc

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

2014-09-24 Thread Christophe Fergeau
Hey, On Fri, Sep 19, 2014 at 10:22:16AM -0500, Jeremy White wrote: > This thread veered; I'd like to bring it back, if I can. > > I've got a clear case of thread unsafety in XSpice. > spice_server_playback_put_samples is called from a different thread than the > main thread. If the main thread c

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

2014-09-19 Thread Jeremy White
This thread veered; I'd like to bring it back, if I can. I've got a clear case of thread unsafety in XSpice. spice_server_playback_put_samples is called from a different thread than the main thread. If the main thread calls main_dispatcher_handle_mm_time_latency while we're putting samples, v

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

2014-09-09 Thread Han Pilmeyer
On 09/09/2014 15:00, Han Pilmeyer wrote: The problems I see: - Sound and video are out of sync - Sounds stops after several minutes (could be around 5 minutes as you suggest) - When I chat in Lync, sound gets choppy during the typing. I also lose the microphone, i.e. others cannot hear me afte

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

2014-09-09 Thread Han Pilmeyer
On 09/09/2014 11:06, nicolas prochazka wrote: i'm sorry but it's very difficult to answer that. It depends of combinaison of spice-gtk , spice-server and qemu . Now without your patch, with last git spice gtk, spice-server and qemu 2.x, it seems to be work. ( sound does not disapear but video i

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

2014-09-09 Thread nicolas prochazka
i'm sorry but it's very difficult to answer that. It depends of combinaison of spice-gtk , spice-server and qemu . Now without your patch, with last git spice gtk, spice-server and qemu 2.x, it seems to be work. ( sound does not disapear but video is bas ) but with my last bug report, i wrote : v

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

2014-09-08 Thread Jeremy White
On 09/08/2014 03:33 PM, nicolas prochazka wrote: sorry, nothing , a lot of video frames seems to be drop. The issue that my patch would solve, if you had encountered this problem, would be random crashes and hangs. There was some sense that you lost sound after a few minutes. Is that proble

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

2014-09-08 Thread nicolas prochazka
sorry, nothing , a lot of video frames seems to be drop. 2014-09-08 20:39 GMT+02:00 Jeremy White : > Hi Nicolas, > > On 09/08/2014 12:56 PM, nicolas prochazka wrote: > >> Hello, >> I've done differents tests, with the differents combinaisons between >> qemu X and spice-server, >> I can say that

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

2014-09-08 Thread Jeremy White
Hi Nicolas, On 09/08/2014 12:56 PM, nicolas prochazka wrote: Hello, I've done differents tests, with the differents combinaisons between qemu X and spice-server, I can say that is since video adaptative streaming, the video streaming is bad compare to the old version (spice 0.12.3 / qemu 1.7

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

2014-09-08 Thread nicolas prochazka
Hello, I've done differents tests, with the differents combinaisons between qemu X and spice-server, I can say that is since video adaptative streaming, the video streaming is bad compare to the old version (spice 0.12.3 / qemu 1.7 ). When i set SPICE_DISABLE_ADAPTIVE_STREAMING=Y , my tests sho

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

2014-09-08 Thread Jeremy White
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

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

2014-09-08 Thread Christophe Fergeau
On Mon, Sep 08, 2014 at 11:26:58AM +0200, Christophe Fergeau wrote: > Hey, > > 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

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

2014-09-08 Thread Christophe Fergeau
Hey, 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 f

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

2014-09-06 Thread Jeremy White
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. Cheers, Jeremy ___ Sp

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

2014-09-05 Thread Christophe Fergeau
Hey, Thanks for the detailed analysis, and as usual, very late answer :( On Fri, Aug 22, 2014 at 01:41:11PM -0500, Jeremy White wrote: > I'm hoping to ask for some advice on the spice server. > > Background: > I've hit a bug with Xspice. The current implementation uses a separate > thread to gr

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

2014-09-03 Thread Jeremy White
2. Surgically modify the snd_worker.c calls that handle the Playback channel to introduce a mutex; lock and release that mutex around operations. This is the direction I'm leaning, but I don't see a lot of evidence that this is commonly done. Now, with patch that solves my problem. Stop me

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

2014-08-22 Thread Jeremy White
I'm hoping to ask for some advice on the spice server. Background: I've hit a bug with Xspice. The current implementation uses a separate thread to grab pcm data from a fifo. That same thread creates and drives the playback channel, and then pushes that data out using spice_server_playback_p