From: David Ashley <dash@xdr.com>
To: linux-kernel@vger.kernel.org
Subject: Possible socket problem?
Date: Thu, 6 Mar 2003 09:38:14 -0800 [thread overview]
Message-ID: <200303061738.h26HcEF1021753@xdr.com> (raw)
I'm seeing some strange behaviour with sockets under 2.4.20, and the
same thing on 2.4.18. I haven't tried any other kernel versions though or
done any more investigation, but all signs seem to point to a socket problem
in the kernel.
My program is reading from a socket produced like this:
sock=socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
I connect() the socket to an external server (an IMAP mail server). The server
throws lots of data down the line. The indication is that if the socket's
receive buffer fills up, I can no longer read from the socket, the read
just blocks forever. Same if I select() on the socket, it never reports data
is ready. I can tcpdump and see plenty of data having arrived after
the point where the last read succeeded.
The problem goes away if I do this:
i=4096;
j=setsockopt(sock,SOL_SOCKET,SO_RCVBUF,&i,sizeof(i));
It still occured when I set the RCVBUF size to 50000.
When the freeze happens I can find the last data received from the socket
in the tcpdump log, and it always is the last bytes in a single tcp packet.
More tcp packets follow, but they don't cause the read() to return.
I'm not doing any ioctl's or weird stuff, and I only read() or write() to the
socket.
-Dave
reply other threads:[~2003-03-06 17:27 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=200303061738.h26HcEF1021753@xdr.com \
--to=dash@xdr.com \
--cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®