[Vortex] [BUG] Race condition in vortex_tls_start_negotiation_sync

AMIAUX Benoît b.amiaux at ateme.com
Fri Aug 20 10:27:52 CEST 2010

Forgot the actual patch...

> -----Original Message-----
> From: AMIAUX Benoît
> Sent: Friday, August 20, 2010 10:27 AM
> To: 'Vortex'
> Subject: RE: [BUG] Race condition in vortex_tls_start_negotiation_sync
> Hello,
> Attached patch fixes the issue for me.
> The main point is that we have to ref the connection we're using inside
> vortex_tls_start_negotiation_sync because it can be closed and un-
> referred if a timeout happens.
> Moreover, my version returns NULL in case of timeouts because it seems
> to be impossible without too many changes to ensure the input
> vortex_connection* pointer is valid on errors. This is due to the
> vortex_connection_unref in
> vortex_tls.c:895
> vortex_connection_unref (connection_aux, "(vortex tls process)");
> which is not thread-safe in our case. We cannot guarantee not too many
> unref happens if we return the old connection pointer.
> This patch works for me when I start 64 threads at once which tries to
> create TLS connections and fail repeatedly.
> Thanks you,
> Benoît Amiaux

Ce message et toutes les pièces jointes sont confidentiels et établis à l'intention exclusive de ses destinataires. Toute modification, édition, utilisation ou diffusion non autorisée est interdite. Si vous avez reçu ce message par erreur, merci de nous en avertir immédiatement. ATEME décline toute responsabilité au titre de ce message s'il a été altéré, déformé, falsifié ou encore édité ou diffusé sans autorisation.
This message and any attachments are confidential and intended solely for the addressees. Any unauthorized modification, edition, use or dissemination is prohibited. If you have received this message by mistake, please notify us immediately. ATEME decline all responsibility for this message if it has been altered, deformed, falsified or even edited or disseminated without authorization.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vortex_tls.patch
Type: application/octet-stream
Size: 6615 bytes
Desc: vortex_tls.patch
URL: <http://lists.aspl.es/pipermail/vortex/attachments/20100820/261cc3d4/attachment-0001.obj>

More information about the Vortex mailing list