[Spice-devel] [spice-gtk v1 09/10] channel-main: check if file-transfer was completed on idle

Victor Toso lists at victortoso.com
Mon Aug 1 12:50:56 UTC 2016


Hi,

On Mon, Aug 01, 2016 at 12:58:58PM +0200, Christophe Fergeau wrote:
> Hey,
>
> On Sat, Jul 30, 2016 at 12:26:30AM +0200, Victor Toso wrote:
> > This patch avoids a race condition. The race happens when the flush
> > callback is in idle when we receive a completed transfer status for
> > the same file-transfer which will be marked as completed and removed
> > from FileTransferOperations hash table.
>
> Can you expand a bit on the race? Where is the "completed transfer
> status" that we receive coming from? From the agent? Or do you just
> mean that we have flushed the queue, so we get the expected "completed
> transfer" message from the agent, but the flush callback did not get a
> chance to run yet because it was scheduled to run in an idle while the
> "completed transfer" message is dealt with immediatly?

Only agent can send the 'complete transfer' message but in case of
error, we mark the xfer-task as completed too and both situations could
trigger the race but I only saw the first case; We can see it easily
when we are transferring a lot of files at once, the message that we
receive from agent is faster then flush callback in idle.

I'll try to expand it in v2, thanks!

>
> Christophe



> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel



More information about the Spice-devel mailing list