Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 04 Nov 2001 00:35:46 +0100
From:      Trond Davidsen <trond.davidsen@ii.uib.no>
To:        Archie Cobbs <archie@dellroad.org>
Cc:        freebsd-net@FreeBSD.ORG
Subject:   Re: Mpd with a large number, 200+ , of bundles
Message-ID:  <3BE47F52.2050001@ii.uib.no>
References:  <200111031831.fA3IVl424031@arch20m.dellroad.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Archie Cobbs wrote:

> 
> I think this error must be coming from the socket code. I wonder
> if increasing the receive buffer size on the netgraph socket would
> help.. try this patch for example:
> 
> Index: main.c
> ===================================================================
> RCS file: /home/cvs/freebsd/src/usr.sbin/ngctl/main.c,v
> retrieving revision 1.4.2.3
> diff -u -r1.4.2.3 main.c
> --- main.c	2001/01/09 06:52:25	1.4.2.3
> +++ main.c	2001/11/03 18:29:33
> @@ -145,6 +145,13 @@
>  	if (NgMkSockNode(name, &csock, &dsock) < 0)
>  		err(EX_OSERR, "can't create node");
>  
> +    {
> +	int size = 128 * 1024;
> +
> +	if (setsockopt(csock, SOL_SOCKET, SO_RCVBUF, &size, sizeof(size)) == -1)
> +		err(1, "setsockopt");
> +    }
> +
>  	/* Do commands as requested */
>  	if (ac == 0) {
>  		if (fp != NULL) {
> 
> 

After applying this patch, running 'ngctl list' lists bundles 240 - 160:

[removed lots of output]

   Name: mpd-pptp160     Type: ppp             ID: 00000330   Num hooks: 6
   Name: ng170           Type: iface           ID: 0000032f   Num hooks: 1
   Name: <unnamed>       Type: socket          ID: 0000032e   Num hooks: 2
   Name: <unnamed>       Type: vjc             ID: 0000032d   Num hooks: 4
   Name: <unnamed>       Type: bpf             ID: 0000032c   Num hooks: 3
   Name: fxp0            Type: ether           ID: 00000001   Num hooks: 0
ngctl: send msg: No such file or directory
vpn-gw3#


Running 'ngctl -d list' lists bundles 240 - 160:

[removed lots of output]

   Name: mpd-pptp160     Type: ppp             ID: 00000330   Num hooks: 6
   Name: ng170           Type: iface           ID: 0000032f   Num hooks: 1
   Name: <unnamed>       Type: socket          ID: 0000032e   Num hooks: 2
   Name: <unnamed>       Type: vjc             ID: 0000032d   Num hooks: 4
   Name: <unnamed>       Type: bpf             ID: 0000032c   Num hooks: 3
   Name: fxp0            Type: ether           ID: 00000001   Num hooks: 0
ngctl: sendto([bfbffbf8]:): No such file or directory
ngctl: send msg: No such file or directory
vpn-gw3#


Running 'ngctl -dd list' fills the screen with message dumps, and ends 
with 'Bus error (core dumped)', gdb shows this:

[removed lots of output]

Program received signal SIGBUS, Bus error.
0x2806a12e in _NgDebugBytes () from /usr/lib/libnetgraph.so.1
(gdb) bt
#0  0x2806a12e in _NgDebugBytes () from /usr/lib/libnetgraph.so.1
#1  0x2806a051 in _NgDebugMsg () from /usr/lib/libnetgraph.so.1
#2  0x2806af7b in NgRecvMsg () from /usr/lib/libnetgraph.so.1
#3  0x804a791 in ListCmd (ac=0, av=0xbfbfca5c)
     at /usr/src/usr.sbin/ngctl/list.c:93
#4  0x80495d2 in DoCommand (ac=1, av=0xbfbfca58)
     at /usr/src/usr.sbin/ngctl/main.c:306
#5  0x804956e in DoParseCommand (line=0xbfbfd2f8 "list")
     at /usr/src/usr.sbin/ngctl/main.c:290
#6  0x804949b in DoInteractive () at /usr/src/usr.sbin/ngctl/main.c:268
#7  0x8048e47 in main (ac=0, av=0xbfbffc30)
     at /usr/src/usr.sbin/ngctl/main.c:160
#8  0x8048b81 in _start ()
(gdb)


Trond



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3BE47F52.2050001>