All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
To: linux-sctp@vger.kernel.org
Subject: Re: SCTP getting EAGAIN but poll or select return socket is writable
Date: Tue, 11 Apr 2017 19:36:16 +0000	[thread overview]
Message-ID: <20170411193616.GG911@localhost.localdomain> (raw)
In-Reply-To: <45198365-50CE-456C-8F4A-8BDA672B97F7@lurchi.franken.de>

On Tue, Apr 11, 2017 at 09:14:52PM +0200, Michael Tuexen wrote:
> > On 11. Apr 2017, at 21:08, Deepak Khandelwal <dazz.87@gmail.com> wrote:
> > 
> > Hi,
> > 
> > I am using 4.4.x kernel.
> > 
> > in context of LKSCTP, what could be the possible reasons that poll or
> > select on fd return false positive events, causing application do
> > write on fd but failed with EAGAIN ?
> I'm just guessing here... What if you can write something, but not
> something big as you try...
> So how big is the message you are trying so send?

That's possible, yes.

Another possibility (and I guess the only other one) is that you're
polling on a socket that has sndbuf available but you're sending a msg
to a peer that requires starting another assoc. If it fails to bind
while creating this new asoc during sendmsg, it will return EAGAIN too.
Like, you created a UDP-style socket, but didn't bind() nor connect(),
and called sendmsg() directly on it. Sendmsg() will do an indirect
bind() but somehow, you're out of ephemeral ports, or something else is
blocking it.

Best regards,
Marcelo

> 
> Best regards
> Michael
> > 
> > 
> > Best Regards,
> > Deepak
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

  parent reply	other threads:[~2017-04-11 19:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-11 19:14 SCTP getting EAGAIN but poll or select return socket is writable Michael Tuexen
2017-04-11 19:20 ` Deepak Khandelwal
2017-04-11 19:36 ` Marcelo Ricardo Leitner [this message]
2017-04-11 20:36 ` Deepak Khandelwal
2017-04-11 21:51 ` Marcelo Ricardo Leitner
2017-04-12  2:50 ` Deepak Khandelwal
2017-04-12 11:56 ` Neil Horman

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=20170411193616.GG911@localhost.localdomain \
    --to=marcelo.leitner@gmail.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.