[erlang-bugs] Re: sctp chunked messages
Raimo Niskanen
raimo+erlang-bugs@REDACTED
Wed Sep 16 17:04:41 CEST 2009
On Thu, Aug 20, 2009 at 03:23:38PM -0500, Anders Nygren wrote:
> After some more testing I have found that
> 1, the error only happens when it is the client that is receiving chunked
> messages.
> 2, it works correctly on Solaris
>
As far as I know, SCTP shall not chunk messages, other than
under the hood, so the inet_drv should not have to
reassemble chunks.
http://tools.ietf.org/html/draft-ietf-tsvwg-sctpsocket-13#section-3.1.4
There are a few exceptions: if the application's
receive buffer is too small, or if the protocol stack
is running low on buffers, a message without the MSG_EOR
bit set may arrive, indicating truncation.
inet_drv is then supposed to report the error and not the message.
I have problems getting my hands on more than one Ubuntu machine;
which Ubuntu variant are you using, and is it sufficient
if the client runs Ubuntu? I assume it has to be
client and server on different machines to get chunking.
I suspect it is an Ubuntu/Linux kernel bug, or an inet_drv
bug that mishandles partial messages. But since it seems
to be low load it is hardly the protocol stack running
low on buffers... So there should not even be a partial message.
Or maybe the default buffer size is small on Ubuntu,
and buffer size option handling is broken in inet_drv...
> /Anders
>
> On Wed, Aug 19, 2009 at 4:06 PM, Anders Nygren<anders.nygren@REDACTED> wrote:
> > Hi
> > I am having a problem with chunked messages. When I try to send a
> > message that is ~2kByte, it gets split into two chunks. But gen_sctp
> > does not reassemble the chunks and only delivers the last chunk to
> > my application.
> > I have attached a simple test case to demonstrate the problem.
> >
> > To run
> > Machine A:
> > sctp_err:server(IP,Port).
> >
> > Machine B:
> > sctp_err:client(IP,Port).
> >
> > I dont know if this is related but sometimes I also receive a
> > {sctp_error, enoent} before the the #sctp_sndrcvinfo with the second
> > chunk.
> >
> > This is using
> > OTP R13B01
> > Between two machines running Ubuntu
> >
> > uname -a
> > Linux curso-laptop 2.6.28-14-generic #47-Ubuntu SMP Sat Jul 25
> > 00:28:35 UTC 2009 i686 GNU/Linux
> >
> > uname -a
> > Linux glr-desktop 2.6.28-13-generic #45-Ubuntu SMP Tue Jun 30 19:49:51
> > UTC 2009 i686 GNU/Linux
> >
> > /Anders
> >
>
> ________________________________________________________________
> erlang-bugs mailing list. See http://www.erlang.org/faq.html
> erlang-bugs (at) erlang.org
>
--
/ Raimo Niskanen, Erlang/OTP, Ericsson AB
More information about the erlang-bugs
mailing list