[Vortex] Problem mixing wait_replies and vortex_channel_set_serialize()

Francis Brosnan Blazquez francis at aspl.es
Tue Oct 18 12:25:44 CEST 2011


> Hi, 

Hi Phil,

> I’m trying to work though an issue I’ve found in the Vortex library.
> I’m using the votex-1.1.7.b4612.g4612 release on a 64bit Linux
> machine. I think I’ve tracked down how the issue is occurring, and I
> believe it would be easy to fix, but since I don’t know the library
> well, I don’t feel comfortable addressing the problem myself. The
> problem I am seeing is that when I call
> vortex_channel_set_serialize(channe, axl_true); for a particular
> channel, I never receive any frames. Looking through the logs, it
> appears that vortex believes that it hasn’t received the first message
> on the channel, and so it is queuing the frames for later deliver.

Ok,

> I’ve dumped the TCP traffic, just to make sure there wasn’t something
> wrong at that level, and all the messages and sequence numbers are
> correct, so I figured it must be something else. Additionally, if I
> leave the serialization as the default (i.e. do not call
> vortex_channel_set_serialize(channe, axl_true)), then my frame handler
> is called. However, I really want to take advantage the serialization
> provided by the library since that would make my code much simpler.

Ok,

> At any rate, I believe I’ve tracked down the problem. The first 2
> messages I send on the channel  use vortex_channel_send_msg_and_wait()
> to receive the frames. Just before sending the third message, I make a
> call to vortex_set_channel_complete_flag(chan, axl_false) to disable
> frame joining. The first 2 messages (and replies) are MSG/RPY style
> communications and are relatively small. The third message is a
> MSG/ANS pattern message, where each ANS is potentially very large, so
> allowing vortex to join the frames is likely to exhaust memory.

Ok,

> If I’m reading the code right, it looks like when the first 2 replies
> are received, because I am using wait_replies, the code that updates
> the sequence numbers is not getting executed. (i.e.
> __vortex_channel_invoke_received_handler is not getting called).
> Because of this, the serialize_next_seqno is not updated when the
> first 2 replies are received, and vortex will wait forever for data it
> has already received.

So, it is an interaction between channel serialize and wait reply...

> It seems like the fix would be to update the serialize_next_seqno even
> when a wait_reply is handling the message, but I can see how this may
> cause other problems.
> 
>  
> 
> I’m hoping someone can weigh in and let me know if this seems to be
> the case? Or am I way off base. I don’t think it would be too hard to
> adjust my code to not use wait_replies, but they are certainly
> convenient.

I didn't look into the issue but your analysis is solid. It only remains
to apply changes you think and see what happens. 

You can use regression tests [1][2] to check everything keeps working
after your changes. It would be great if you could add a reg test that
reproduces the bug to check bugfix introduced. 

Consider using source code from SVN [3] for your testing. It will be
next stable release in the next few days. 

Once you are done, please, submit a bug report at [4].

Cheers!

[1] https://dolphin.aspl.es/svn/publico/af-arch/trunk/libvortex-1.1/test/vortex-regression-client.c
[2] https://dolphin.aspl.es/svn/publico/af-arch/trunk/libvortex-1.1/test/vortex-regression-listener.c
[3] https://dolphin.aspl.es/svn/publico/af-arch/trunk/libvortex-1.1/
[4] http://bugzilla.aspl.es

> Thanks,
> 
> Phil
> 
> 
> _______________________________________________
> Vortex mailing list
> Vortex at lists.aspl.es
> http://lists.aspl.es/cgi-bin/mailman/listinfo/vortex

-- 
Francis Brosnan Blázquez <francis.brosnan at aspl.es>
ASPL
91 134 14 22 - 91 134 14 45 - 91 116 07 57

AVISO LEGAL

Este mensaje se dirige exclusivamente a su destinatario. Los datos
incluidos en el presente correo son confidenciales y sometidos a secreto
profesional, se prohíbe divulgarlos, en virtud de las leyes vigentes. Si
usted no lo es y lo ha recibido por error o tiene conocimiento del mismo
por cualquier motivo, le rogamos que nos lo comunique por este medio y
proceda a destruirlo o borrarlo.

En virtud de lo dispuesto en la Ley Orgánica 15/1999, de 13 de
diciembre, de Protección de Datos de Carácter Personal, le informamos de
que sus datos de carácter personal, recogidos de fuentes accesibles al
público o datos que usted nos ha facilitado previamente, proceden de
bases de datos propiedad de Advanced Software Production Line, S.L.
(ASPL). No obstante, usted puede ejercitar sus derechos de acceso,
rectificación, cancelación y oposición dispuestos en la mencionada Ley
Orgánica, notificándolo por escrito a:
ASPL - Protección Datos, C/Antonio Suárez 10 A-102, 28802, Alcalá de
Henares (Madrid).



More information about the Vortex mailing list