[erlang-bugs] Re: sctp chunked messages

Anders Nygren anders.nygren@REDACTED
Wed Sep 16 18:20:33 CEST 2009


On Wed, Sep 16, 2009 at 10:04 AM, Raimo Niskanen
<raimo+erlang-bugs@REDACTED> wrote:
> 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?

It is almost one month ago that I tested this but I am pretty sure
I got the same error on OpenSuSE 11.1, is I think it is a general
Linux problem.

> I assume it has to be
> client and server on different machines to get chunking.

Yes

>
> I suspect it is an Ubuntu/Linux kernel bug,

But then SCTP would basically not work on Linux, so I doubt
it.

> 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...

I am on vacation this week, but I can do some more tests next week
if You need any more information.

/Anders

>
>
>> /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