From: "Lars Povlsen" <lpovlsen@vitesse.com>
To: "eCos Disuss" <ecos-discuss@ecos.sourceware.org>
Subject: RE: [ECOS] Re: accept() FreeBSD hangs when out of resources
Date: Tue, 12 Jun 2007 15:49:00 -0000 [thread overview]
Message-ID: <376637F07F8A9242AD11921B15FA17DC1E6450@mx-dk.vsc.vitesse.com> (raw)
In-Reply-To: <466E8C04.90307@ds3switch.com>
This seems a lot like the problem I've seen - and reported on 17/4-07.
I've been able to occasionally reproduce it manually with a browser
(MSIE), but enabling TCP debug logging causes the problem to go away
(not occur).
AFAICS, it is a race condition in the TCP stack causing socket buffers
to be leaked (forever). Calling cyg_kmem_print_stats() displays the
problem (but you need reset to recover :-() :
Network stack mbuf stats:
mbufs 97, clusters 60, free clusters 1
Failed to get 0 times
Waited to get 0 times
Drained queues to get 0 times
VM zone 'ripcb':
Total: 64, Free: 64, Allocs: 0, Frees: 0, Fails: 0
VM zone 'tcpcb':
Total: 64, Free: 61, Allocs: 353, Frees: 350, Fails: 0
VM zone 'udpcb':
Total: 64, Free: 63, Allocs: 4, Frees: 3, Fails: 0
VM zone 'socket':
Total: 64, *Free: 0*, Allocs: 365, Frees: 293, Fails: 8
Misc mpool: total 98304, free 4192, max free block 3748
Mbufs pool: total 81792, free 69248, blocksize 128
Clust pool: total 163840, free 38912, blocksize 2048
FWIW, I have not had time to dig into this (as my attempts to produce a
test bench has failed...)
---Lars
-----Original Message-----
From: ecos-discuss-owner@ecos.sourceware.org
[mailto:ecos-discuss-owner@ecos.sourceware.org] On Behalf Of Tad
Sent: 12. juni 2007 14:05
To: eCos Disuss
Subject: Re: [ECOS] Re: accept() FreeBSD hangs when out of resources
Andrew Lunn wrote:
> On Mon, Jun 11, 2007 at 04:05:57PM -0800, Tad wrote:
>
>> Andrew Lunn wrote:
>>
>>> On Mon, Jun 11, 2007 at 03:42:07PM -0800, Tad wrote:
>>>
>>>
>>>>>> accept() won't return and won't timeout (>12hrs) when listen()
>>>>>> indicates a new connection, if out of sockets/file-descriptors
and all
>>>>>> TCP connections are in ESTABLISHED state.
>>>>>>
>>>>>>
>>>>> Where exactly is it blocked. Please could you provide a call
stack.
>>>>>
more info.
seems to be dependent on CYGNUM_FILEIO_NFILE rather than
CYGPKG_NET_MAXSOCKETS. reducing NFILE < MAXSOCKETS causes accept to
hang with fewer established connections than before reduction.
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
next prev parent reply other threads:[~2007-06-12 11:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-11 23:15 Tad
2007-06-12 3:51 ` Andrew Lunn
2007-06-12 3:57 ` Tad
2007-06-12 6:54 ` Andrew Lunn
2007-06-12 15:37 ` Tad
2007-06-12 15:49 ` Lars Povlsen [this message]
2007-06-12 16:08 ` [ECOS] listen (x, 0) on new TCP incoming connections doesn't stop select()/accept() Tad
2007-06-12 4:05 ` [ECOS] Re: Re: accept() FreeBSD hangs when out of resources Tad
2007-06-12 11:06 ` Andrew Lunn
2007-06-12 11:19 ` Andrew Lunn
[not found] ` <466F2FC7.8060704@ds3switch.com>
2007-06-13 0:09 ` [ECOS] "Fix" for atHTTP and HTTP socket requirements with mozilla POSTS Tad
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=376637F07F8A9242AD11921B15FA17DC1E6450@mx-dk.vsc.vitesse.com \
--to=lpovlsen@vitesse.com \
--cc=ecos-discuss@ecos.sourceware.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).