All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adam Endrodi <adam.endrodi@nsn.com>
To: linux-sctp@vger.kernel.org
Subject: Re: Memory issue with kernel sctp_connectx
Date: Fri, 06 Mar 2015 11:13:41 +0000	[thread overview]
Message-ID: <20150306111341.GC2684@timmy> (raw)
In-Reply-To: <CACoz=-y7yC27C7_jopeJy=55J_Og9czP9fVY_xVE6Zmoo7apTA@mail.gmail.com>

On Fri, Mar 06, 2015 at 11:52:05AM +0100, ext Danny Smit wrote:
> 
> I'm look into a possible memory issue when using sctp_connectx. This
> week I've asked to following on the CentOS mailing list:

I think you'll find this thread relevant:
http://www.spinics.net/lists/linux-sctp/msg03705.html

> ------------------------------
> I'm running into a possible memory issue with the SCTP implementation
> in CentOS 6, using lksctp-tools. So far I've not seen the problem with
> other distributions yet.
> 
> The problem is that whenever a SCTP client connection is initiated to
> a second host and port at which no SCTP server application is
> listening
> 
> The scenario is simple:
> - call socket() to create a socket.
> - call sctp_connectx() to establish a connection.
> 
> The last call is repeated periodically to retry to establish a connection.
> 
> When looking on the wire using wireshark it shows that an SCTP INIT
> packet is sent to the second host, which replies with an SCTP ABORT.
> 
> This is exactly according to the SCTP specification. However it
> appears ABORT isn't propagated into to application layer that calls
> sctp_connectx().
[...] 
> Note that the API is used in non-blocking mode.

This case sctp_connectx() doesn't wait until the connection is established.
You need to use sctp_recvmsg() to get the notification.

> Furthermore, because reconnect attempts are made, a steady memory
> increasement occurs. Looking at /proc/meminfo, the increasement occurs
> in SUnreclaim, the kernel slab cache.

Perhaps these are the event being queued up?

-- 
So if you walk away, who is gonna stay?

  parent reply	other threads:[~2015-03-06 11:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-06 10:39 Memory issue with kernel sctp_connectx Danny Smit
2015-03-06 10:52 ` Danny Smit
2015-03-06 11:13 ` Adam Endrodi [this message]
2015-03-06 15:42 ` Danny Smit
2015-03-06 16:29 ` Adam Endrodi
2015-03-07 19:44 ` Danny Smit
2015-03-09  9:40 ` Adam Endrodi
2015-03-09 13:15 ` Danny Smit
2015-03-10 19:28 ` Vlad Yasevich
2015-03-12 11:00 ` Danny Smit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150306111341.GC2684@timmy \
    --to=adam.endrodi@nsn.com \
    --cc=linux-sctp@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.