LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* poll() blocked / packets not received ?
@ 2008-10-20  8:25 Nicolas Cannasse
  2008-10-20 10:15 ` swivel
  0 siblings, 1 reply; 10+ messages in thread
From: Nicolas Cannasse @ 2008-10-20  8:25 UTC (permalink / raw)
  To: linux-kernel

Hello,

We have an application that uses pthreads and (blocking) sockets.

When the application runs with one single thread in separate processes 
(using fork()) we don't get any problem.

However when it's multithreaded, we sometimes get stuck while poll()ing 
a socket (with events set to POLLIN). Even after the other side of the 
connection has closed its side of the connection, we are still stuck 
here. Adding a timeout only makes the poll() exit with 0, so we loop.

In case we don't loop the next operation is a recv() which will block as 
well (which is consistent).

It seems like nothing is longer received on the socket but it's 
difficult to verify with tcpdump since our server outputs something like 
15MB at peek time with 150 hits per seconds.

We have Shorewall installed and enabled, but what seems strange is that 
the problem depends on multithreading. It also occurs much more often on 
the 4 core machines than on a 2 core ones (both with Hyperthreading 
activated). We're using kernel 2.6.20-15-server (#2 SMP) provided by Ubuntu.

Any tip on we could fix that or investigate further would be 
appreciated. After one month of debugging we're really out of solution now.

Best,
Nicolas

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

end of thread, other threads:[~2008-10-21  5:13 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-20  8:25 poll() blocked / packets not received ? Nicolas Cannasse
2008-10-20 10:15 ` swivel
2008-10-20 10:46   ` Nicolas Cannasse
2008-10-20 11:39     ` swivel
2008-10-20 12:13       ` Nicolas Cannasse
2008-10-20 12:39       ` Nicolas Cannasse
2008-10-20 15:53         ` David Schwartz
2008-10-20 17:24           ` Nicolas Cannasse
2008-10-20 23:21             ` David Schwartz
2008-10-21  5:12             ` Willy Tarreau

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