Date: Thu, 20 Jun 2002 23:19:30 -0500 (CDT) From: Douglas Carmichael <dcarmich@ourservers.net> To: freebsd-questions@freebsd.org Subject: 'No buffer space available' with only 192 mbufs out of 2048 used?? Message-ID: <200206210419.g5L4JU615987@ourservers.net>
next in thread | raw e-mail | index | archive | help
I have a Pentium-200 with 32MB RAM running 4.6-RELEASE that I am using as a firewall/NAT gateway. Interface xl0 is my local network (192.168.1.1) and sis0 is the cable modem (addressed by DHCP.) The system forwards data across the interfaces fine (and I can telnet/ssh to it), but when I try to scp into the box or ftp files to it (even ftp/scp _from_ a shell on the box), it complains about having no buffer space available even though a netstat -m says that only 193 out of 8192 mbufs and 192 out of 2048 mbuf clusters are in use! What gives? i.e.: dcarmich@bsdserver:~$ ftp -v localhost ftp: socket: No buffer space available ftp> quit dcarmich@bsdserver:~$ ftp -v ftp.kernel.org ftp: socket: No buffer space available ftp> quit (This is from my laptop): dcarmich@nightfly:~$ ftp bsdserver.carmichael.lan Connected to bsdserver.carmichael.lan. 220 bsdserver.carmichael.lan FTP server (Version 6.00LS) ready. Name (bsdserver.carmichael.lan:dcarmich): 331 Password required for dcarmich. Password: 230 User dcarmich logged in. Remote system type is UNIX. Using binary mode to transfer files. ftp> put turbofloodlight.pdf local: turbofloodlight.pdf remote: turbofloodlight.pdf 200 PORT command successful. 425 Can't create data socket (....gibberish....): No buffer space available. ftp> quit dcarmich@nightfly:~$ scp turbofloodlight.pdf 192.168.1.1:. dcarmich@192.168.1.1's password: Received disconnect from 192.168.1.1: 2: Could not create socket pairs: No buffe r space available lost connection Here's a dmesg: Copyright (c) 1992-2002 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD 4.6-RELEASE #1: Wed Jun 19 03:25:17 CDT 2002 dcarmich@bsdserver.carmichael.lan:/usr/src/sys/compile/BSDSERVER Timecounter "i8254" frequency 1193182 Hz Timecounter "TSC" frequency 200455458 Hz CPU: Pentium/P55C (200.46-MHz 586-class CPU) Origin = "GenuineIntel" Id = 0x544 Stepping = 4 Features=0x8001bf<FPU,VME,DE,PSE,TSC,MSR,MCE,CX8,MMX> real memory = 33554432 (32768K bytes) avail memory = 30076928 (29372K bytes) Preloaded elf kernel "kernel" at 0xc02b3000. Intel Pentium detected, installing workaround for F00F bug Using $PIR table, 6 entries at 0xc00fdb40 npx0: <math processor> on motherboard npx0: INT 16 interface pcib0: <Host to PCI bridge> on motherboard pci0: <PCI bus> on pcib0 isab0: <Intel 82371AB PCI to ISA bridge> at device 7.0 on pci0 isa0: <ISA bus> on isab0 atapci0: <Intel PIIX4 ATA33 controller> port 0xf000-0xf00f at device 7.1 on pci0 ata0: at 0x1f0 irq 14 on atapci0 ata1: at 0x170 irq 15 on atapci0 pci0: <Intel 82371AB/EB (PIIX4) USB controller> at 7.2 irq 11 chip1: <Intel 82371AB Power management controller> port 0x5f00-0x5f0f at device 7.3 on pci0 sis0: <NatSemi DP83815 10/100BaseTX> port 0x6500-0x65ff mem 0xe2008000-0xe2008ff f irq 10 at device 17.0 on pci0 sis0: Ethernet address: 00:40:f4:52:be:58 miibus0: <MII bus> on sis0 ukphy0: <Generic IEEE 802.3u media interface> on miibus0 ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto xl0: <3Com 3c905B-TX Fast Etherlink XL> port 0x6600-0x667f mem 0xe2009000-0xe200 907f irq 9 at device 18.0 on pci0 xl0: Ethernet address: 00:50:04:6d:db:ec miibus1: <MII bus> on xl0 xlphy0: <3Com internal media interface> on miibus1 xlphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto pci0: <Cirrus Logic GD5464 SVGA controller> at 20.0 orm0: <Option ROM> at iomem 0xc0000-0xc7fff on isa0 fdc0: <NEC 72065B or clone> at port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on isa0 fdc0: FIFO enabled, 8 bytes threshold fd0: <1440-KB 3.5" drive> on fdc0 drive 0 atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0 vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 sc0: <System console> at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x300> sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0 sio0: type 16550A sio1 at port 0x2f8-0x2ff irq 3 on isa0 sio1: type 16550A ppc0: <Parallel port> at port 0x378-0x37f irq 7 on isa0 ppc0: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode ppc0: FIFO with 16/16/8 bytes threshold lpt0: <Printer> on ppbus0 lpt0: Interrupt-driven port IP packet filtering initialized, divert enabled, rule-based forwarding disabled, default to deny, unlimited logging DUMMYNET initialized (011031) ad0: 2060MB <SAMSUNG WU32165A (2.1GB)> [4186/16/63] at ata0-master UDMA33 acd0: CDROM <ATAPI CDROM> at ata1-slave PIO4 Mounting root from ufs:/dev/ad0s1a sis0: promiscuous mode enabled (Note: This is from snort, the IDS) ps -ax: PID TT STAT TIME COMMAND 0 ?? DLs 0:00.00 (swapper) 1 ?? ILs 0:00.03 /sbin/init -- 2 ?? DL 0:00.33 (pagedaemon) 3 ?? DL 0:00.00 (vmdaemon) 4 ?? DL 0:00.84 (bufdaemon) 5 ?? DL 0:00.53 (vnlru) 6 ?? DL 0:08.80 (syncer) 23 ?? Is 0:00.00 adjkerntz -i 91 ?? Ss 1:11.48 /sbin/natd -dynamic -punch_fw 7000:650 -use_sockets - 108 ?? Is 0:00.98 /usr/sbin/syslogd -s -s 115 ?? Is 0:00.02 /usr/sbin/inetd -wW -l -a 192.168.1.1 117 ?? Ss 0:01.16 /usr/sbin/cron 119 ?? Is 0:10.97 /usr/sbin/sshd 146 ?? Ss 1:08.57 /usr/local/bin/snort -i sis0 -q -I -D -c /usr/local/e 161 ?? I 0:00.01 /usr/libexec/getty std.9600 ttyd0 1814 ?? Ss 0:00.09 /usr/sbin/dhcpd -q xl0 2015 ?? Ss 0:00.06 /sbin/dhclient sis0 2082 ?? S 0:00.43 sshd: dcarmich@ttyp0 (sshd) 2083 p0 Ss 0:00.08 -bash (bash) 2088 p0 R+ 0:00.00 ps -ax 2089 p0 R+ 0:00.00 -bash (bash) 153 v0 Is+ 0:00.01 /usr/libexec/getty Pc ttyv0 154 v1 Is+ 0:00.01 /usr/libexec/getty Pc ttyv1 155 v2 Is+ 0:00.01 /usr/libexec/getty Pc ttyv2 156 v3 Is+ 0:00.01 /usr/libexec/getty Pc ttyv3 157 v4 Is+ 0:00.01 /usr/libexec/getty Pc ttyv4 158 v5 Is+ 0:00.01 /usr/libexec/getty Pc ttyv5 159 v6 Is+ 0:00.01 /usr/libexec/getty Pc ttyv6 160 v7 Is+ 0:00.01 /usr/libexec/getty Pc ttyv7 142 con- S 0:47.87 /usr/local/pdnsd/sbin/pdnsd mbuf stats: dcarmich@bsdserver:~$ netstat -m 193/352/8192 mbufs in use (current/peak/max): 193 mbufs allocated to data 192/268/2048 mbuf clusters in use (current/peak/max) 624 Kbytes allocated to network (10% of mb_map in use) 0 requests for memory denied 0 requests for memory delayed 0 calls to protocol drain routines dcarmich@bsdserver:~$ sysctl -a | grep nmb kern.ipc.nmbclusters: 2048 kern.ipc.nmbufs: 8192 /etc/rc.conf: # -- sysinstall generated deltas -- # Fri May 10 21:53:21 2002 # Created: Fri May 10 21:53:21 2002 # Enable network daemons for user convenience. # Please make all changes to this file, not to /etc/defaults/rc.conf. # This file now contains just the overrides from /etc/defaults/rc.conf. gateway_enable="YES" hostname="bsdserver.carmichael.lan" ifconfig_xl0="inet 192.168.1.1 netmask 255.255.255.0 media 100BaseTX mediaopt full-duplex" ifconfig_sis0="DHCP" icmp_log_redirect="YES" inetd_enable="YES" inetd_flags="-wW -l -a 192.168.1.1" syslogd_flags="-s -s" firewall_enable="YES" firewall_script="/etc/firewall/fwrules" isc_dhcpd_enable="YES" isc_dhcpd_program="/usr/sbin/dhcpd" isc_dhcpd_flags="-q xl0" natd_enable="YES" natd_interface="sis0" natd_flags="-dynamic -punch_fw 7000:650 -use_sockets -same_ports" kern_securelevel_enable="NO" moused_enable="NO" moused_type="NO" nfs_reserved_port_only="YES" sendmail_enable="NONE" sshd_enable="YES" named_enable="NO" named_flags="-u bind -g bind" usbd_enable="NO" Kernel config (tried using NMBCLUSTERS=0 and maxusers=0, but still no dice): machine i386 cpu I586_CPU ident BSDSERVER maxusers 32 #makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols options INET #InterNETworking options FFS #Berkeley Fast Filesystem options FFS_ROOT #FFS usable as root device [keep this!] options SOFTUPDATES #Enable FFS soft updates support options UFS_DIRHASH #Improve performance on big directories options MSDOSFS #MSDOS Filesystem options CD9660 #ISO 9660 Filesystem options CD9660_ROOT #CD-ROM usable as root, CD9660 required options PROCFS #Process filesystem options COMPAT_43 #Compatible with BSD 4.3 [KEEP THIS!] options KTRACE #ktrace(1) support options SYSVSHM #SYSV-style shared memory options SYSVMSG #SYSV-style message queues options SYSVSEM #SYSV-style semaphores options P1003_1B #Posix P1003_1B real-time extensions options _KPOSIX_PRIORITY_SCHEDULING options ICMP_BANDLIM #Rate limit bad replies options KBD_INSTALL_CDEV # install a CDEV entry in /dev options IPFIREWALL #IP firewalling options IPFIREWALL_VERBOSE #Enable logging to syslog options IPDIVERT #IP divert sockets options RANDOM_IP_ID #Randomize the IP packet ID field options TCP_DROP_SYNFIN options ICMP_BANDLIM options DUMMYNET options NMBCLUSTERS=2048 device isa device pci # Floppy drives device fdc0 at isa? port IO_FD1 irq 6 drq 2 device fd0 at fdc0 drive 0 # ATA and ATAPI devices device ata0 at isa? port IO_WD1 irq 14 device ata1 at isa? port IO_WD2 irq 15 device ata device atadisk # ATA disk drives device atapicd # ATAPI CDROM drives device atapifd # ATAPI floppy drives device atapist # ATAPI tape drives options ATA_STATIC_ID #Static device numbering # atkbdc0 controls both the keyboard and the PS/2 mouse device atkbdc0 at isa? port IO_KBD device atkbd0 at atkbdc? irq 1 flags 0x1 device psm0 at atkbdc? irq 12 device vga0 at isa? # syscons is the default console driver, resembling an SCO console device sc0 at isa? flags 0x100 # Floating point support - do not disable. device npx0 at nexus? port IO_NPX irq 13 # Serial (COM) ports device sio0 at isa? port IO_COM1 flags 0x10 irq 4 device sio1 at isa? port IO_COM2 irq 3 # Parallel port device ppc0 at isa? irq 7 device ppbus # Parallel port bus (required) device lpt # Printer # PCI Ethernet NICs that use the common MII bus controller code. # NOTE: Be sure to keep the 'device miibus' line in order to use these NICs! device miibus # MII bus support device sis # Silicon Integrated Systems SiS 900/SiS 7016 device xl # 3Com 3c90x (``Boomerang'', ``Cyclone'') # Pseudo devices - the number indicates how many units to allocate. pseudo-device loop # Network loopback pseudo-device ether # Ethernet support pseudo-device tun # Packet tunnel. pseudo-device pty # Pseudo-ttys (telnet etc) # The `bpf' pseudo-device enables the Berkeley Packet Filter. # Be aware of the administrative consequences of enabling this! pseudo-device bpf #Berkeley packet filter Any advice would be welcomed. Thank you. (and sorry for the test msg. ;) --Douglas To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200206210419.g5L4JU615987>