From owner-freebsd-questions Fri Sep 6 14: 2:44 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0E82737B400 for ; Fri, 6 Sep 2002 14:02:35 -0700 (PDT) Received: from sccrmhc01.attbi.com (sccrmhc01.attbi.com [204.127.202.61]) by mx1.FreeBSD.org (Postfix) with ESMTP id 22FAD43E4A for ; Fri, 6 Sep 2002 14:02:34 -0700 (PDT) (envelope-from mcintoshrt@attbi.com) Received: from spectacled ([12.224.18.112]) by sccrmhc01.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with SMTP id <20020906210233.GBPS9751.sccrmhc01.attbi.com@spectacled> for ; Fri, 6 Sep 2002 21:02:33 +0000 From: "Robert McIntosh" To: Subject: ftpd & getpeername (Please Help!) Date: Fri, 6 Sep 2002 14:05:56 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi, I'm using FreeBSD 4.3 (I know, a few point versions back but it works great) as a home server. It works great except for one important service. Occasionally when I try to transfer files of size ( > 500 KB), ftpd stalls or takes such an intolerable amount of time that I cancel the job and restart the FreeBSD server. About 1/3 of the time, the restart resolves the problem and file transferring is nice and zippy. When file transferring does stall (or runs at a snail's pace), it stalls in all services that deal with larger files ( again, > 500 KB) - i.e., smbd, ftpd, smptd. It's a given that the problem is software, not hardware. I've finally become annoyed enough with it that I began investigating the odd behavior. The server's got a Netgear FA311 NIC, which may be the root of my woes, but hopefully not. Here are some outputs - 1) /var/log/messages Sep 6 09:08:28 spotted /kernel: Copyright (c) 1992-2001 The FreeBSD Project. Sep 6 09:08:28 spotted /kernel: Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 Sep 6 09:08:28 spotted /kernel: The Regents of the University of California. All rights reserved. Sep 6 09:08:28 spotted /kernel: FreeBSD 4.3-RELEASE #0: Thu Feb 14 17:33:22 PST 2002 Sep 6 09:08:28 spotted /kernel: robert@spotted.orangeowl.lan:/usr/src/sys/compile/ORANGEOWL Sep 6 09:08:28 spotted /kernel: Timecounter "i8254" frequency 1193182 Hz Sep 6 09:08:28 spotted /kernel: CPU: Pentium/P54C (119.75-MHz 586-class CPU) Sep 6 09:08:28 spotted /kernel: Origin = "GenuineIntel" Id = 0x526 Stepping = 6 Sep 6 09:08:28 spotted /kernel: Features=0x1bf Sep 6 09:08:28 spotted /kernel: real memory = 33554432 (32768K bytes) Sep 6 09:08:28 spotted /kernel: avail memory = 29827072 (29128K bytes) Sep 6 09:08:28 spotted /kernel: Preloaded elf kernel "kernel" at 0xc02f2000. Sep 6 09:08:28 spotted /kernel: Intel Pentium detected, installing workaround for F00F bug Sep 6 09:08:28 spotted /kernel: md0: Malloc disk Sep 6 09:08:29 spotted /kernel: npx0: on motherboard Sep 6 09:08:29 spotted /kernel: npx0: INT 16 interface Sep 6 09:08:29 spotted /kernel: pcib0: on motherboard Sep 6 09:08:29 spotted /kernel: pci0: on pcib0 Sep 6 09:08:29 spotted /kernel: isab0: at device 7.0 on pci0 Sep 6 09:08:29 spotted /kernel: isa0: on isab0 Sep 6 09:08:29 spotted /kernel: atapci0: port 0x3000-0x300f at device 7.1 on pci0 Sep 6 09:08:29 spotted /kernel: ata0: at 0x1f0 irq 14 on atapci0 Sep 6 09:08:29 spotted /kernel: ata1: at 0x170 irq 15 on atapci0 Sep 6 09:08:29 spotted /kernel: pci0: (vendor=0x127a, dev=0x1002) at 9.0 irq 11 Sep 6 09:08:29 spotted /kernel: sis0: port 0x6000-0x60ff mem 0xf4010000-0xf4010fff irq 10 at device 10.0 on pci0 Sep 6 09:08:29 spotted /kernel: sis0: Ethernet address: 00:02:e3:0a:43:16 Sep 6 09:08:29 spotted /kernel: miibus0: on sis0 Sep 6 09:08:29 spotted /kernel: ukphy0: on miibus0 Sep 6 09:08:29 spotted /kernel: ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto Sep 6 09:08:29 spotted /kernel: pci0: at 11.0 irq 9 Sep 6 09:08:29 spotted /kernel: fdc0: at port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on isa0 Sep 6 09:08:29 spotted /kernel: fdc0: FIFO enabled, 8 bytes threshold Sep 6 09:08:29 spotted /kernel: fd0: <1440-KB 3.5" drive> on fdc0 drive 0 Sep 6 09:08:29 spotted /kernel: atkbdc0: at port 0x60,0x64 on isa0 Sep 6 09:08:29 spotted /kernel: atkbd0: flags 0x1 irq 1 on atkbdc0 Sep 6 09:08:29 spotted /kernel: kbd0 at atkbd0 Sep 6 09:08:29 spotted /kernel: vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 Sep 6 09:08:29 spotted /kernel: sc0: at flags 0x100 on isa0 Sep 6 09:08:29 spotted /kernel: sc0: VGA <16 virtual consoles, flags=0x300> Sep 6 09:08:29 spotted /kernel: sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0 Sep 6 09:08:29 spotted /kernel: sio0: type 16550A Sep 6 09:08:29 spotted /kernel: sio1 at port 0x2f8-0x2ff irq 3 on isa0 Sep 6 09:08:29 spotted /kernel: sio1: type 16550A Sep 6 09:08:29 spotted /kernel: ad0: 4121MB [8374/16/63] at ata0-master PIO4 Sep 6 09:08:29 spotted /kernel: ad2: 2014MB [4092/16/63] at ata1-master WDMA2 Sep 6 09:08:29 spotted /kernel: ad3: 28629MB [58168/16/63] at ata1-slave PIO4 Sep 6 09:08:29 spotted /kernel: acd0: CDROM at ata0-slave using PIO3 Sep 6 09:08:29 spotted /kernel: Mounting root from ufs:/dev/ad0s1a Sep 6 09:08:30 spotted named[164]: starting (/etc/namedb/named.conf). named 8.2.3-REL Sat Apr 21 08:32:02 GMT 2001 jkh@narf.osd.bsdi.com:/usr/obj/usr/src/usr.sbin/named Sep 6 09:08:30 spotted named[164]: limit files set to fdlimit (1024) Sep 6 09:08:30 spotted named[165]: Ready to answer queries. Sep 6 09:11:41 spotted su: robert to root on /dev/ttyp0 Sep 6 09:12:01 spotted ftpd[286]: getpeername (/usr/libexec/ftpd): Socket operation on non-socket This last line is most suspicious - I think this is where the majority of the problem is, but I'm green enough not to know where to start with getpeername. I turned on debugging with ftpd to see what's going on to get this message. Here's some output from tcpdump on sis0 - 17:42:28.043180 spotted.orangeowl.lan.telnet > spectacled.orangeowl.lan.1102: P 4254354914:4254354942(28) ack 1266560 win 17520 (DF) [tos 0x10] 17:42:28.113206 spotted.orangeowl.lan.telnet > spectacled.orangeowl.lan.1102: P 0:28(28) ack 1 win 17520 (DF) [tos 0x10] 17:42:28.113370 spectacled.orangeowl.lan.1102 > spotted.orangeowl.lan.telnet: . ack 28 win 15683 (DF) 17:42:29.278443 spectacled.orangeowl.lan.1100 > spotted.orangeowl.lan.ftp: P 1261628:1261634(6) ack 3982627374 win 8314 (DF) 17:42:29.279015 spotted.orangeowl.lan.ftp > spectacled.orangeowl.lan.1100: P 1:31(30) ack 6 win 17520 (DF) [tos 0x10] 17:42:29.279407 spectacled.orangeowl.lan.1100 > spotted.orangeowl.lan.ftp: P 6:22(16) ack 31 win 8284 (DF) 17:42:29.280147 spotted.orangeowl.lan.ftp > spectacled.orangeowl.lan.1100: P 31:60(29) ack 22 win 17520 (DF) [tos 0x10] 17:42:29.281601 spectacled.orangeowl.lan.1100 > spotted.orangeowl.lan.ftp: P 22:28(6) ack 60 win 8255 (DF) 17:42:29.281981 spotted.orangeowl.lan.ftp > spectacled.orangeowl.lan.1100: P 60:90(30) ack 28 win 17520 (DF) [tos 0x10] 17:42:29.282472 spectacled.orangeowl.lan.1100 > spotted.orangeowl.lan.ftp: P 28:44(16) ack 90 win 8225 (DF) 17:42:29.283119 spotted.orangeowl.lan.ftp > spectacled.orangeowl.lan.1100: P 90:119(29) ack 44 win 17520 (DF) [tos 0x10] 17:42:29.283547 spectacled.orangeowl.lan.1100 > spotted.orangeowl.lan.ftp: P 44:52(8) ack 119 win 8196 (DF) 17:42:29.283936 spotted.orangeowl.lan.ftp > spectacled.orangeowl.lan.1100: P 119:139(20) ack 52 win 17520 (DF) [tos 0x10] 17:42:29.284464 spectacled.orangeowl.lan.1100 > spotted.orangeowl.lan.ftp: P 52:75(23) ack 139 win 8176 (DF) 17:42:29.284969 spotted.orangeowl.lan.ftp > spectacled.orangeowl.lan.1100: P 139:169(30) ack 75 win 17520 (DF) [tos 0x10] 17:42:29.285289 spectacled.orangeowl.lan.1100 > spotted.orangeowl.lan.ftp: P 75:81(6) ack 169 win 8146 (DF) 17:42:29.291067 spotted.orangeowl.lan.ftp-data > spectacled.orangeowl.lan.1103: S 3065978942:3065978942(0) win 16384 (DF) [tos 0x8] 17:42:29.291307 spectacled.orangeowl.lan.1103 > spotted.orangeowl.lan.ftp-data: S 1281274:1281274(0) ack 3065978943 win 8760 (DF) 17:42:29.291462 spotted.orangeowl.lan.ftp-data > spectacled.orangeowl.lan.1103: . ack 1 win 17520 (DF) [tos 0x8] 17:42:29.291998 spotted.orangeowl.lan.ftp > spectacled.orangeowl.lan.1100: P 169:224(55) ack 81 win 17520 (DF) [tos 0x10] 17:42:29.316740 spotted.orangeowl.lan.ftp-data > spectacled.orangeowl.lan.1103: . 1:1461(1460) ack 1 win 17520 (DF) [tos 0x8] 17:42:29.316971 spotted.orangeowl.lan.ftp > spectacled.orangeowl.lan.1100: P 224:248(24) ack 81 win 17520 (DF) [tos 0x10] 17:42:29.317088 spotted.orangeowl.lan.ftp-data > spectacled.orangeowl.lan.1103: FP 1461:1526(65) ack 1 win 17520 (DF) [tos 0x8] ps aux root 32 0.0 0.2 208 64 ?? Is 2:08AM 0:00.00 adjkerntz -i root 161 0.0 1.9 928 564 ?? Ss 9:08AM 0:00.62 syslogd -s root 165 0.0 5.8 2380 1716 ?? Is 9:08AM 0:00.29 named daemon 167 0.0 1.4 924 412 ?? Is 9:08AM 0:00.01 /usr/sbin/portmap root 186 0.0 2.3 1040 664 ?? Is 9:08AM 0:00.09 inetd -wW root 188 0.0 2.2 968 648 ?? Is 9:08AM 0:00.27 /usr/sbin/cron root 191 0.0 5.2 2484 1540 ?? Is 9:08AM 0:00.29 sendmail: accepti root 195 0.0 4.2 2488 1228 ?? Is 9:08AM 0:02.93 /usr/sbin/sshd root 212 0.0 1.5 892 444 ?? Is 9:08AM 0:00.01 moused -p /dev/cu root 225 0.0 3.5 1620 1028 ?? Ss 9:08AM 0:01.59 /usr/local/apache nobody 227 0.0 3.7 1676 1076 ?? I 9:08AM 0:00.02 /usr/local/apache nobody 228 0.0 3.7 1664 1072 ?? I 9:08AM 0:00.01 /usr/local/apache nobody 229 0.0 3.5 1632 1016 ?? I 9:08AM 0:00.00 /usr/local/apache nobody 230 0.0 3.5 1632 1016 ?? I 9:08AM 0:00.00 /usr/local/apache nobody 231 0.0 3.5 1632 1016 ?? I 9:08AM 0:00.00 /usr/local/apache root 232 0.0 4.0 2368 1188 ?? Is 9:08AM 0:00.01 smbd -D -s /usr/l root 234 0.0 2.3 1160 680 ?? Is 9:08AM 0:00.02 /usr/libexec/ftpd root 248 0.0 1.8 1004 528 ?? S 9:08AM 0:00.29 /usr/local/libexe nobody 249 0.0 3.5 1640 1036 ?? I 9:08AM 0:00.00 /usr/local/apache nobody 250 0.0 3.5 1640 1036 ?? I 9:08AM 0:00.00 /usr/local/apache nobody 251 0.0 3.5 1640 1036 ?? I 9:08AM 0:00.00 /usr/local/apache root 261 0.0 1.9 1060 552 ?? S 9:09AM 0:00.07 /usr/local/libexe root 266 0.0 1.9 936 568 v0 Is+ 9:09AM 0:00.03 /usr/libexec/gett root 267 0.0 1.9 936 568 v1 Is+ 9:09AM 0:00.03 /usr/libexec/gett root 268 0.0 1.9 936 568 v2 Is+ 9:09AM 0:00.03 /usr/libexec/gett root 269 0.0 1.9 936 568 v3 Is+ 9:09AM 0:00.03 /usr/libexec/gett root 270 0.0 1.9 936 568 v4 Is+ 9:09AM 0:00.03 /usr/libexec/gett root 271 0.0 1.9 936 568 v5 Is+ 9:09AM 0:00.03 /usr/libexec/gett root 272 0.0 1.9 936 568 v6 Is+ 9:09AM 0:00.02 /usr/libexec/gett root 273 0.0 1.9 936 568 v7 Is+ 9:09AM 0:00.03 /usr/libexec/gett root 470 0.0 4.5 3540 1316 ?? S 1:30PM 0:00.10 smbd -D -s /usr/l ftp 494 0.0 2.7 1220 784 ?? I 1:50PM 0:00.08 ftpd: spectacled: root 495 0.0 2.8 1236 808 ?? Ss 1:51PM 0:00.16 telnetd robert 496 0.0 1.1 628 328 p0 Is 1:51PM 0:00.12 -sh (sh) root 506 0.0 3.0 1324 892 p0 S 1:52PM 0:00.23 _su (csh) root 0 0.0 0.0 0 0 ?? DLs 2:08AM 0:00.02 (swapper) Does someone know what these symptoms are indicative of? Any help or places to triple check would be most appreciated. Thanks a bunch! -Robert To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message