Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Sep 2002 14:05:56 -0700
From:      "Robert McIntosh" <mcintoshrt@attbi.com>
To:        <freebsd-questions@freebsd.org>
Subject:   ftpd & getpeername (Please Help!)
Message-ID:  <NGBBJOICILCKCBEEIOGHGEOMCBAA.mcintoshrt@attbi.com>

next in thread | raw e-mail | index | archive | help
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<FPU,VME,DE,PSE,TSC,MSR,MCE,CX8>
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: <math processor> on motherboard
Sep  6 09:08:29 spotted /kernel: npx0: INT 16 interface
Sep  6 09:08:29 spotted /kernel: pcib0: <Host to PCI bridge> on motherboard
Sep  6 09:08:29 spotted /kernel: pci0: <PCI bus> on pcib0
Sep  6 09:08:29 spotted /kernel: isab0: <Intel 82371FB PCI to ISA bridge> at
device 7.0 on pci0
Sep  6 09:08:29 spotted /kernel: isa0: <ISA bus> on isab0
Sep  6 09:08:29 spotted /kernel: atapci0: <Intel PIIX ATA controller> 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: <unknown card> (vendor=0x127a,
dev=0x1002) at 9.0 irq 11
Sep  6 09:08:29 spotted /kernel: sis0: <NatSemi DP83815 10/100BaseTX> 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: <MII bus> on sis0
Sep  6 09:08:29 spotted /kernel: ukphy0: <Generic IEEE 802.3u media
interface> 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: <S3 Trio graphics accelerator> at
11.0 irq 9
Sep  6 09:08:29 spotted /kernel: fdc0: <NEC 72065B or clone> 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: <Keyboard controller (i8042)> at
port 0x60,0x64 on isa0
Sep  6 09:08:29 spotted /kernel: atkbd0: <AT Keyboard> flags 0x1 irq 1 on
atkbdc0
Sep  6 09:08:29 spotted /kernel: kbd0 at atkbd0
Sep  6 09:08:29 spotted /kernel: vga0: <Generic ISA VGA> at port 0x3c0-0x3df
iomem 0xa0000-0xbffff on isa0
Sep  6 09:08:29 spotted /kernel: sc0: <System console> 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 <Maxtor 90432D2> [8374/16/63]
at ata0-master PIO4
Sep  6 09:08:29 spotted /kernel: ad2: 2014MB <WDC AC32100H> [4092/16/63] at
ata1-master WDMA2
Sep  6 09:08:29 spotted /kernel: ad3: 28629MB <QUANTUM FIREBALLP LM30>
[58168/16/63] at ata1-slave PIO4
Sep  6 09:08:29 spotted /kernel: acd0: CDROM <FX001DE> 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 <mss
1460> (DF) [tos 0x8]
17:42:29.291307 spectacled.orangeowl.lan.1103 >
spotted.orangeowl.lan.ftp-data: S 1281274:1281274(0) ack 3065978943 win 8760
<mss 1460> (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




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