[Vortex] BUG(?): Increasing channel window size breaks connection

Jens Alfke jens at mooseyard.com
Tue Apr 22 01:52:02 CEST 2008


Unfortunately even with my latest fix, the receiver is still aborting  
the connection as soon as the sender starts sending data in volume.

The backtrace when Vortex panics and decides to close the connection is:

#0  vortex_frame_get_next (connection=0xdb64590) at /Hack/Others/ 
Vortex/vortex/src/MacOSX/../../src/vortex_frame_factory.c:880
#1  0x001ab703 in __vortex_reader_process_socket (ctx=0x86e800,  
connection=0xdb64590) at /Hack/Others/Vortex/vortex/src/MacOSX/../../ 
src/vortex_reader.c:314
#2  0x001ac834 in __vortex_reader_check_connection_list (ctx=0x86e800,  
on_reading=0x3c05c0, con_cursor=0x3ddcf0, changed=1) at /Hack/Others/ 
Vortex/vortex/src/MacOSX/../../src/vortex_reader.c:1027
#3  0x001acd95 in __vortex_reader_run (ctx=0x86e800) at /Hack/Others/ 
Vortex/vortex/src/MacOSX/../../src/vortex_reader.c:1260
#4  0x94679c55 in _pthread_start ()

What's happening is:
vortex_frame_get_next calls vortex_frame_receive_raw to read more bytes.
vortex_frame_receive_raw calls vortex_connection_invoke_receive, which  
returns error VORTEX_EWOULDBLOCK.
vortex_frame_receive returns 0.
vortex_frame_get_next responds to the 0 by closing the connection with  
error "remote peer have closed connection while reading the rest of  
the frame".

This looks similar to the other SSL-related error I reported recently  
(which has been fixed). I think the socket reports data is available,  
but SSL reads the data and it's not a complete cipher block yet, so it  
doesn't output any data to Vortex. Vortex shouldn't panic here, it  
should just wait for more data to arrive and try reading again.

I'm not sure why this only happens after I increase the window size …  
it seems like something that could happen even with the default 4096  
size. Maybe it just gets more likely as the window gets larger?

—Jens
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1875 bytes
Desc: not available
Url : http://lists.aspl.es/pipermail/vortex/attachments/20080421/b4126ce5/attachment.bin 


More information about the Vortex mailing list