[Spice-devel] [PATCH] tests: add a new case for event loop timers

Christophe Fergeau cfergeau at redhat.com
Fri Feb 12 16:09:00 UTC 2016


Hey,

On Wed, Feb 10, 2016 at 06:00:39AM -0500, Frediano Ziglio wrote:
> > 
> > Check that cancelling a timer the timer callback is not called.
> > 
> > This can happen in latency code (red-channel.c).
> > In red_channel_client_cancel_ping_timer latency timer is cancelled and
> > state is set to PING_STATE_NONE however if timer was already active what
> > happens is that the red_channel_client_ping_timer is called and the line
> > 
> >   spice_assert(rcc->latency_monitor.state == PING_STATE_TIMER);
> > 
> > is triggered causing spice-server to abort.
> > This happens as GLib loop add all active sources to an array but if the
> > timer is deactivated before the event is dispatched the event will be
> > dispatched unless the source is destroyed.
> > 
> > Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> 
> Small note:
> This tests make the "make check" fails, this is expected the current
> code does not handle it. I had a small discussion with Christophe on how to
> fix it. One way is revert timer handling to create and destroy the source
> during timer_cancel.

ACK to the new test once it's not failing :) I'd just revert the timer
change for now as this is also causing build failures on RHEL6.

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20160212/112d3cf2/attachment.sig>


More information about the Spice-devel mailing list