[Vortex] Auto-discard notification Re: disconnecting bug ???

Francis Brosnan Blazquez francis at aspl.es
Mon Apr 14 19:27:23 CEST 2008


>         Hello!

Hi Mikhail,

(I've found your message automatically discarded. You must join before
posting to the mailing list.)

>         Looks like there is a bug in 
>         __vortex_channel_block_until_replies_are_sent
>         function. This function called then i trying to close
>         connection.
>         
>         Connection cannot be closed if the side which trying to close
>         connection (client or listener) was sending replies (RPYs) to
>         the other side. 
>         I working with MSG/RPY scheme - for each MSG i answer one RPY.
>         In case of big RPY (more than 4kb) vortex_sequencer splits it
>         into frames by 4kb. Each time then sequences sends frame by
>         channel it increases channel->last_reply_written variable.
>         Infinite loop happens then i trying to close connection:
>         
>         (vortex_channel.c:3793) while
>         (channel->last_message_received !=
>         (channel->last_reply_written)) {
>         
>         Here last_message_received is equal to the number of MSG's
>         received and last_reply_written is equal to the number of
>         frames sent back. If my RPY's are big - there is infinite
>         loop. I suggest to fix it in this way:
>         
>         while (channel->last_message_received !=
>         (channel->last_reply_sent-1)) {
>         
>         "-1" in "last_reply_sent-1" is because difference in channel
>         initialization:
>         
>                 channel->last_message_received          = -1;
>                 channel->last_reply_sent                = 0;
>                 channel->last_reply_written             = -1;
>         
>         
>         
>         I have attached patch for this bug to this message.

This is bug that has been around these days ([1]). 

The patch wasn't applied but digging into the problem (taking into
account your description on how to reproduce it) I've found there was an
error at the reply handling which was counting all replies as sent
without checking if they were complete frames (a reply fragment can't be
considered as a reply sent)...

..maybe this is what is causing ([1]) bug reports at closing session. 

This is now fixed (with a regression test that replays the problem and
check the fix introduced). 

Thanks Mikhail for reporting, providing a problem description, and a
patch!

>         WBR, Mikhail

[1] http://lists.aspl.es/pipermail/vortex/2008-April/000449.html

-- 
Francis Brosnan Blazquez <francis at aspl.es>
Advanced Software Production Line, S.L.




More information about the Vortex mailing list