Re: mbuf shortage situations (followup)

1999-09-17 Thread Brian F. Feldman
On Mon, 13 Sep 1999, Matthew Dillon wrote: > The case that is causing the panics is with the non-interrupt mbuf > allocation mechanism. Specifically, the case where M_WAIT is used. > > The second problem under discussion, which really ought to be separated > out from the mbuf pan

Re: mbuf shortage situations (followup)

1999-09-17 Thread Brian F. Feldman
On Mon, 13 Sep 1999, Matthew Dillon wrote: > The case that is causing the panics is with the non-interrupt mbuf > allocation mechanism. Specifically, the case where M_WAIT is used. > > The second problem under discussion, which really ought to be separated > out from the mbuf pa

Re: mbuf shortage situations (followup)

1999-09-17 Thread Matthew Dillon
:In 4.3, the code was able to deal with cluster allocation failing. We :have a somewhat different situation now, because many network :interface devices have less-flexible DMA mechanisms which don't allow :packet reception into non-contiguous buffers, so we need to have at :least a certain number

Re: mbuf shortage situations (followup)

1999-09-17 Thread Matthew Dillon
:In 4.3, the code was able to deal with cluster allocation failing. We :have a somewhat different situation now, because many network :interface devices have less-flexible DMA mechanisms which don't allow :packet reception into non-contiguous buffers, so we need to have at :least a certain number

Re: mbuf shortage situations (followup)

1999-09-17 Thread Matthew Dillon
I think that what needs to be done is to split the problem in two. First, allow the mbuf routines to return a failure even with M_WAIT. If M_WAIT is used, it simply means 'try harder, sleeping a bit if necessary'. This requires ensuring that all the networking code deal with the

Re: mbuf shortage situations (followup)

1999-09-17 Thread Matthew Dillon
I think that what needs to be done is to split the problem in two. First, allow the mbuf routines to return a failure even with M_WAIT. If M_WAIT is used, it simply means 'try harder, sleeping a bit if necessary'. This requires ensuring that all the networking code deal with th

Re: mbuf shortage situations (followup)

1999-09-14 Thread Stas Kisel
> From woll...@khavrinen.lcs.mit.edu Mon Sep 13 22:39:37 1999 > > I'm also aware of the possiblity of some people not liking the > > fact that we tsleep() forever (e.g. tsleep(x,x,x,0)). > > I don't have any problem with sleeping forever -- but I am concerned > about the possibility of deadloc

Re: mbuf shortage situations (followup)

1999-09-13 Thread Bosko Milekic
On Mon, 13 Sep 1999, Garrett Wollman wrote: !>< said: !> !>> This message is in MIME format. The first part should be readable text, !>> while the remaining parts are likely unreadable without MIME-aware tools. !>> Send mail to [EMAIL PROTECTED] for more info. !> !>It would be preferable

Re: mbuf shortage situations (followup)

1999-09-13 Thread Bosko Milekic
On Mon, 13 Sep 1999, Garrett Wollman wrote: !>< said: !> !>> This message is in MIME format. The first part should be readable text, !>> while the remaining parts are likely unreadable without MIME-aware tools. !>> Send mail to m...@docserver.cac.washington.edu for more info. !> !>It woul

Re: mbuf shortage situations (followup)

1999-09-13 Thread Bosko Milekic
!>I think that what needs to be done is to split the problem in two. First, !>allow the mbuf routines to return a failure even with M_WAIT. If M_WAIT !>is used, it simply means 'try harder, sleeping a bit if necessary'. This !>requires ensuring that all the networking code de

Re: mbuf shortage situations (followup)

1999-09-13 Thread Bosko Milekic
!>I think that what needs to be done is to split the problem in two. First, !>allow the mbuf routines to return a failure even with M_WAIT. If M_WAIT !>is used, it simply means 'try harder, sleeping a bit if necessary'. This !>requires ensuring that all the networking code dea

Re: mbuf shortage situations (followup)

1999-09-13 Thread Garrett Wollman
< said: > This message is in MIME format. The first part should be readable text, > while the remaining parts are likely unreadable without MIME-aware tools. > Send mail to [EMAIL PROTECTED] for more info. It would be preferable if text were sent as text, since MIME-encoded patches requir

Re: mbuf shortage situations (followup)

1999-09-13 Thread Garrett Wollman
< said: > This message is in MIME format. The first part should be readable text, > while the remaining parts are likely unreadable without MIME-aware tools. > Send mail to m...@docserver.cac.washington.edu for more info. It would be preferable if text were sent as text, since MIME-encode

Re: mbuf shortage situations (followup)

1999-09-12 Thread Bosko Milekic
Hello (again), On Thu, 9 Sep 1999, Stas Kisel wrote: !>> From [EMAIL PROTECTED] Thu Sep 9 16:17:27 1999 !> !>> > Probably it is not self-evident why we HAVE to drop this connection. !>> !>> So what if someone manages to crash a program due to a DOS attack ? !>> An easy one that comes to mind i

Re: mbuf shortage situations (followup)

1999-09-12 Thread Bosko Milekic
Hello (again), On Thu, 9 Sep 1999, Stas Kisel wrote: !>> From ava...@cheops.anu.edu.au Thu Sep 9 16:17:27 1999 !> !>> > Probably it is not self-evident why we HAVE to drop this connection. !>> !>> So what if someone manages to crash a program due to a DOS attack ? !>> An easy one that comes to

Re: mbuf shortage situations

1999-09-09 Thread Stas Kisel
> From ja...@puck.nether.net Thu Sep 9 18:10:06 1999 > I am creating about 100 icmp sockets, and as they are > created, allocate a very large SO_RCVBUF: > (void)setsockopt(localstruct->icmp_s, SOL_SOCKET, > SO_RCVBUF, (char *)&hold, sizeof(hold)); This can be a part

Re: mbuf shortage situations

1999-09-09 Thread Stas Kisel
> From [EMAIL PROTECTED] Thu Sep 9 18:10:06 1999 > I am creating about 100 icmp sockets, and as they are > created, allocate a very large SO_RCVBUF: > (void)setsockopt(localstruct->icmp_s, SOL_SOCKET, > SO_RCVBUF, (char *)&hold, sizeof(hold)); This can be a part of

Re: mbuf shortage situations

1999-09-09 Thread Mike Smith
> I would get out of mbufs, increase maxusers. Either my code > is less agressive than originally, or something has changed in > some of the freebsd releases since then, even slightly to prevent this > from currently happening. I'm not sure which. NetBSD also suffers > from this problem, a

Re: mbuf shortage situations

1999-09-09 Thread Mike Smith
> I would get out of mbufs, increase maxusers. Either my code > is less agressive than originally, or something has changed in > some of the freebsd releases since then, even slightly to prevent this > from currently happening. I'm not sure which. NetBSD also suffers > from this problem,

Re: mbuf shortage situations

1999-09-09 Thread Stas Kisel
> From ava...@cheops.anu.edu.au Thu Sep 9 16:17:27 1999 > > Probably it is not self-evident why we HAVE to drop this connection. > > So what if someone manages to crash a program due to a DOS attack ? > An easy one that comes to mind is syslogd. It's often stuck in disk-wait > and can easily be

Re: mbuf shortage situations

1999-09-09 Thread Jared Mauch
On Thu, Sep 09, 1999 at 01:45:39PM +0400, Stas Kisel wrote: > > From: Darren Reed > > > The problem with this is the BSD TCP/IP implementation ACK's (or at least > > attempts to ACK) data as soon as it is received and it is a big no-no to > > discard queued data that has already been ACK'd. > >

Re: mbuf shortage situations

1999-09-09 Thread Stas Kisel
> From [EMAIL PROTECTED] Thu Sep 9 16:17:27 1999 > > Probably it is not self-evident why we HAVE to drop this connection. > > So what if someone manages to crash a program due to a DOS attack ? > An easy one that comes to mind is syslogd. It's often stuck in disk-wait > and can easily be target

Re: mbuf shortage situations

1999-09-09 Thread Jared Mauch
On Thu, Sep 09, 1999 at 01:45:39PM +0400, Stas Kisel wrote: > > From: Darren Reed <[EMAIL PROTECTED]> > > > The problem with this is the BSD TCP/IP implementation ACK's (or at least > > attempts to ACK) data as soon as it is received and it is a big no-no to > > discard queued data that has alrea

Re: mbuf shortage situations

1999-09-09 Thread Darren Reed
In some mail from Karl Pielorz, sie said: > > Darren Reed wrote: > > > > It is evil connection. Good applications do read data from their sockets, > > > and evil ones do not. And ever if it is good, but silly or busy > > > application, good clients do not send so much data that application > > >

Re: mbuf shortage situations

1999-09-09 Thread Karl Pielorz
Darren Reed wrote: > > It is evil connection. Good applications do read data from their sockets, > > and evil ones do not. And ever if it is good, but silly or busy > > application, good clients do not send so much data that application > > can not process it. Am I wrong, there are any examples? >

Re: mbuf shortage situations

1999-09-09 Thread Darren Reed
In some mail from Stas Kisel, sie said: > > > From: Darren Reed > > > The problem with this is the BSD TCP/IP implementation ACK's (or at least > > attempts to ACK) data as soon as it is received and it is a big no-no to > > discard queued data that has already been ACK'd. > > Probably it is no

Re: mbuf shortage situations

1999-09-09 Thread Darren Reed
In some mail from Karl Pielorz, sie said: > > Darren Reed wrote: > > > > It is evil connection. Good applications do read data from their sockets, > > > and evil ones do not. And ever if it is good, but silly or busy > > > application, good clients do not send so much data that application > > >

Re: mbuf shortage situations

1999-09-09 Thread Karl Pielorz
Darren Reed wrote: > > It is evil connection. Good applications do read data from their sockets, > > and evil ones do not. And ever if it is good, but silly or busy > > application, good clients do not send so much data that application > > can not process it. Am I wrong, there are any examples?

Re: mbuf shortage situations

1999-09-09 Thread Darren Reed
In some mail from Stas Kisel, sie said: > > > From: Darren Reed <[EMAIL PROTECTED]> > > > The problem with this is the BSD TCP/IP implementation ACK's (or at least > > attempts to ACK) data as soon as it is received and it is a big no-no to > > discard queued data that has already been ACK'd. >

Re: mbuf shortage situations

1999-09-09 Thread Stas Kisel
> From: Darren Reed > The problem with this is the BSD TCP/IP implementation ACK's (or at least > attempts to ACK) data as soon as it is received and it is a big no-no to > discard queued data that has already been ACK'd. Probably it is not self-evident why we HAVE to drop this connection. It i

Re: mbuf shortage situations

1999-09-09 Thread Stas Kisel
> From: Darren Reed > > In some mail from Stas Kisel, sie said: > [...] > > IMHO it is a good idea to develop tcp_drain() from /sys/netinet/tcp_subr.c > > It should be quite intellectual to select a target - a process or a uid, > > which does not read properly from it's sockets, and has many data

Re: mbuf shortage situations

1999-09-09 Thread Stas Kisel
> From: Darren Reed <[EMAIL PROTECTED]> > The problem with this is the BSD TCP/IP implementation ACK's (or at least > attempts to ACK) data as soon as it is received and it is a big no-no to > discard queued data that has already been ACK'd. Probably it is not self-evident why we HAVE to drop th

Re: mbuf shortage situations

1999-09-09 Thread Stas Kisel
> From: Darren Reed <[EMAIL PROTECTED]> > > In some mail from Stas Kisel, sie said: > [...] > > IMHO it is a good idea to develop tcp_drain() from /sys/netinet/tcp_subr.c > > It should be quite intellectual to select a target - a process or a uid, > > which does not read properly from it's sockets

mbuf shortage situations

1999-09-09 Thread Stas Kisel
(probably some debugging), but I wouldn't mind doing this. However, I'd > like to know if there are objections to doing this or, in fact, if there > are any suggestions on how to handle mbuf shortage situations (aside from > just limiting -- although limiting is in itself a good solu

mbuf shortage situations

1999-09-09 Thread Stas Kisel
ably some debugging), but I wouldn't mind doing this. However, I'd > like to know if there are objections to doing this or, in fact, if there > are any suggestions on how to handle mbuf shortage situations (aside from > just limiting -- although limiting is in itself a good solu

Re: mbuf shortage situations

1999-09-07 Thread Don Lewis
On Sep 5, 9:18pm, Matthew Dillon wrote: } Subject: Re: mbuf shortage situations } : The only reason that I see for which we would actually panic() in } :this situation (as opposed to suffer the packet loss) is if we get to the } :point where we're losing packets because some script kid s

Re: mbuf shortage situations

1999-09-07 Thread Don Lewis
On Sep 5, 9:18pm, Matthew Dillon wrote: } Subject: Re: mbuf shortage situations } : The only reason that I see for which we would actually panic() in } :this situation (as opposed to suffer the packet loss) is if we get to the } :point where we're losing packets because some scrip

Re: mbuf shortage situations

1999-09-05 Thread Matthew Dillon
s handeled relatively 'cleanly' :(probably some debugging), but I wouldn't mind doing this. However, I'd :like to know if there are objections to doing this or, in fact, if there :are any suggestions on how to handle mbuf shortage situations (aside from :just limiting -- although limitin

Re: mbuf shortage situations

1999-09-05 Thread Matthew Dillon
s handeled relatively 'cleanly' :(probably some debugging), but I wouldn't mind doing this. However, I'd :like to know if there are objections to doing this or, in fact, if there :are any suggestions on how to handle mbuf shortage situations (aside from :just limiting -- although limitin

mbuf shortage situations

1999-09-05 Thread Bosko Milekic
#x27;d like to know if there are objections to doing this or, in fact, if there are any suggestions on how to handle mbuf shortage situations (aside from just limiting -- although limiting is in itself a good solution and I'm glad that Brian F. is working on that). Cheers, Bosko. /* *

mbuf shortage situations

1999-09-05 Thread Bosko Milekic
#x27;d like to know if there are objections to doing this or, in fact, if there are any suggestions on how to handle mbuf shortage situations (aside from just limiting -- although limiting is in itself a good solution and I'm glad that Brian F. is working on that). Cheers, Bosko. /* * Bo