From: chris schlund <chrisschlund@gmx.de>
To: Rick Jones <rick.jones2@hp.com>
Cc: netdev@vger.kernel.org
Subject: Re: Socket hangs in read() when putting interface down
Date: Wed, 06 Jun 2007 15:55:26 +0200 [thread overview]
Message-ID: <4666BCCE.2020806@gmx.de> (raw)
In-Reply-To: <4665A05F.9080600@hp.com>
>> This may be ok on a major interface like eth0 but it is a problem when
>> using a ppp interface via GSM data or GPRS connection.
>> Killing the pppd while the socket waits in read() produces the same
>> behaviour. Also a broken connection looks the same.
>> It is reproducable on several 2.6 kernel versions including the lastest
>> stable 2.6.21.
>>
>> On my understanding "ifconfig down" should lead into a read() error.
>
> Why? Can't traffic for the endpoint arrive via some other interface on
> the system? I would think that getting out of a blocking read()
> requires the application to either have a timer running (and so get out
> of read() with EINTR) or to have keepalives enabled on the TCP
> connection (I'm assuming TCP for an AF_INET, SOCK_STREAM although I
> suppose it could be SCTP)
>
> rick jones
Of course, you are right.
I am so focused to my small embedded world, that I simply have forgotten
how IP-traffic works in big systems (to clarify my first post: I'm using
TCP).
Your hint with the self produced signal to get out of read() was very
helpful for me. Thats what I was missing.
I also learned another think, while reading the list FAQ:
PEBCAC (=Problem exists between chair and computer)
Obviously, thats what best described me!
Thank you very much!
Chris Schlund
prev parent reply other threads:[~2007-06-06 13:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-05 15:11 Socket hangs in read() when putting interface down chris schlund
2007-06-05 17:41 ` Rick Jones
2007-06-06 13:55 ` chris schlund [this message]
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=4666BCCE.2020806@gmx.de \
--to=chrisschlund@gmx.de \
--cc=netdev@vger.kernel.org \
--cc=rick.jones2@hp.com \
/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.