netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* regression with poll(2)?
@ 2012-08-15 19:46 Sage Weil
  2012-08-15 20:45 ` Atchley, Scott
  2012-08-19 18:49 ` regression with poll(2) Sage Weil
  0 siblings, 2 replies; 13+ messages in thread
From: Sage Weil @ 2012-08-15 19:46 UTC (permalink / raw)
  To: netdev; +Cc: linux-kernel, ceph-devel

I'm experiencing a stall with Ceph daemons communicating over TCP that 
occurs reliably with 3.6-rc1 (and linus/master) but not 3.5.  The basic 
situation is:

 - the socket is two processes communicating over TCP on the same host, e.g. 

tcp        0 2164849 10.214.132.38:6801      10.214.132.38:51729     ESTABLISHED

 - one end writes a bunch of data in
 - the other end consumes data, but at some point stalls.
 - reads are nonblocking, e.g.

  int got = ::recv( sd, buf, len, MSG_DONTWAIT );

 and between those calls we wait with

  struct pollfd pfd;
  short evmask;
  pfd.fd = sd;
  pfd.events = POLLIN;
#if defined(__linux__)
  pfd.events |= POLLRDHUP;
#endif

  if (poll(&pfd, 1, msgr->timeout) <= 0)
    return -1;

 - in my case the timeout is ~15 minutes.  at that point it errors out, 
and the daemons reconnect and continue for a while until hitting this 
again.

 - at the time of the stall, the reading process is blocked on that 
poll(2) call.  There are a bunch of threads stuck on poll(2), some of them 
stuck and some not, but they all have stacks like

[<ffffffff8118f6f9>] poll_schedule_timeout+0x49/0x70
[<ffffffff81190baf>] do_sys_poll+0x35f/0x4c0
[<ffffffff81190deb>] sys_poll+0x6b/0x100
[<ffffffff8163d369>] system_call_fastpath+0x16/0x1b

 - you'll note that the netstat output shows data queued:

tcp        0 1163264 10.214.132.36:6807      10.214.132.36:41738     ESTABLISHED
tcp        0 1622016 10.214.132.36:41738     10.214.132.36:6807      ESTABLISHED

etc.

Is this a known regression?  Or might I be misusing the API?  What 
information would help track it down?

Thanks!
sage



^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2012-08-21 15:58 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-15 19:46 regression with poll(2)? Sage Weil
2012-08-15 20:45 ` Atchley, Scott
2012-08-15 21:03   ` Sage Weil
2012-08-19 18:49 ` regression with poll(2) Sage Weil
2012-08-20  8:07   ` Eric Dumazet
2012-08-20  9:04   ` Mel Gorman
2012-08-20  9:30     ` Eric Dumazet
2012-08-20 23:20       ` Andrew Morton
2012-08-21  5:16         ` Eric Dumazet
2012-08-20 16:54     ` Sage Weil
2012-08-21  7:05       ` Mel Gorman
2012-08-20 17:02     ` Linus Torvalds
2012-08-21 15:58       ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).