Bug 21146 - inetd service looping logic is invalid for fast networks
inetd service looping logic is invalid for fast networks
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: netkit-base (Show other bugs)
7.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-11-20 17:29 EST by Scott M Stark
Modified: 2008-05-01 11:37 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-11-20 17:29:30 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Scott M Stark 2000-11-20 17:29:27 EST
I have redhat 7 running a cvs server on a 100mb local net with a
switched hub. When a burst of cvs pserver commands, or ftp commands,
etc. are issued against this box the inetd kills the service with
the complaint that it is looping. This is despite the fact that in
any 1 sec interval there are fewer than 5 connections active according
to netstat.

Here is a simple cvs query block run on a local client that fails
because the cvs service is terminated by inetd:
bash-2.04$ cat /tmp/run_cvs.sh 45
#!/bin/bash

let count=0
echo Running $1 co -c commands
while [ $count -lt $1 ]
do
        cvs -d :pserver:scott@valkyrie:/usr/local/cvsroot co -c &
        let count=$count+1
done
bash-2.04$ /tmp/run_cvs.sh 45
Running 45 co -c commands
cvs [checkout aborted]: recv() from server valkyrie: EOF
bash-2.04$ cvs [checkout aborted]: connect to valkyrie:2401 failed: 
Connection r
efused
cvs [checkout aborted]: connect to valkyrie:2401 failed: Connection refused
cvscvs  cvs[[ checkoutcheckout[ aborted] aborted]checkout: :  aborted]
connect to
 connect to : valkyrievalkyrieconnect to ::valkyrie24012401: failed:  
failed: 24
01Connection refusedConnection refused failed: Connection refused

bash-2.04$

Here is a netstat loop on the server watching the cvspserver port:

[root@valkyrie inetd]# while true; do echo `date`; netstat -n | grep 2401; 
sleep 1; done
Mon Nov 20 15:21:58 PST 2000
Mon Nov 20 15:21:59 PST 2000
Mon Nov 20 15:22:00 PST 2000
Mon Nov 20 15:22:01 PST 2000
Mon Nov 20 15:22:02 PST 2000
Mon Nov 20 15:22:03 PST 2000
Mon Nov 20 15:22:04 PST 2000
Mon Nov 20 15:22:05 PST 2000
Mon Nov 20 15:22:06 PST 2000
Mon Nov 20 15:22:08 PST 2000
Mon Nov 20 15:22:09 PST 2000
Mon Nov 20 15:22:10 PST 2000
tcp       70      0 172.17.66.52:2401       172.17.66.54:2413       
ESTABLISHED 
tcp        0      0 172.17.66.52:2401       172.17.66.54:2412       
ESTABLISHED 
tcp       63      0 172.17.66.52:2401       172.17.66.54:2411       
ESTABLISHED 
tcp        0      0 172.17.66.52:2401       172.17.66.54:2410       
CLOSE       
tcp        0      0 172.17.66.52:2401       172.17.66.54:2409       
CLOSE       
Mon Nov 20 15:22:11 PST 2000
tcp       70      0 172.17.66.52:2401       172.17.66.54:2432       
ESTABLISHED 
tcp        0      0 172.17.66.52:2401       172.17.66.54:2431       
ESTABLISHED 
tcp        1      0 172.17.66.52:2401       172.17.66.54:2430       
CLOSE_WAIT  
tcp        0      0 172.17.66.52:2401       172.17.66.54:2429       
CLOSE       
tcp        0      0 172.17.66.52:2401       172.17.66.54:2428       
CLOSE       
Mon Nov 20 15:22:12 PST 2000
Mon Nov 20 15:22:13 PST 2000
Mon Nov 20 15:22:14 PST 2000
Mon Nov 20 15:22:15 PST 2000
Mon Nov 20 15:22:16 PST 2000
Mon Nov 20 15:22:17 PST 2000
Mon Nov 20 15:22:18 PST 2000
Mon Nov 20 15:22:19 PST 2000

[root@valkyrie inetd]# tail /var/log/messages
Nov 20 15:09:30 valkyrie inetd[483]: auth/tcp: bind: Address already in use
Nov 20 15:10:00 valkyrie CROND[32756]:(root) CMD (   /sbin/rmmod -as) 
Nov 20 15:13:45 valkyrie inetd[483]: cvspserver/tcp server failing 
(looping), service terminated 
Nov 20 15:14:30 valkyrie inetd[483]: auth/tcp: bind: Address already in use
Nov 20 15:14:39 valkyrie inetd[483]: cvspserver/tcp server failing 
(looping), service terminated 
Nov 20 15:15:07 valkyrie inetd[483]: auth/tcp: bind: Address already in use
Nov 20 15:15:15 valkyrie inetd[483]: cvspserver/tcp server failing 
(looping), service terminated 
Nov 20 15:19:30 valkyrie inetd[483]: auth/tcp: bind: Address already in use
Nov 20 15:20:00 valkyrie CROND[982]: (root) CMD (   /sbin/rmmod -as) 
Nov 20 15:22:11 valkyrie inetd[483]: cvspserver/tcp server failing 
(looping), service terminated 
[root@valkyrie inetd]# 

This behavior needs to at least be configurable. The man page on inetd
says nothing about any such configuration.

The netkit-base-0.10-37 source module is not included in the disk 4
source cd or I would try to fix this issue myself.

[root@valkyrie inetd]# rpm -q -f /usr/sbin/inetd
netkit-base-0.10-37
[root@valkyrie inetd]# ls /mnt/cdrom/SRPMS/net*
/mnt/cdrom/SRPMS/net-tools-1.56-2.src.rpm
/mnt/cdrom/SRPMS/netcfg-2.36-1.src.rpm
/mnt/cdrom/SRPMS/netpbm-9.5-5.src.rpm
/mnt/cdrom/SRPMS/netscape-4.75-2.src.rpm
Comment 1 Jeff Johnson 2000-12-30 18:11:46 EST
There's a configuration parameter in /etc/inetd.conf to adjust the number of
connections/sec,
on a per-service basis. See "man 5 inetd.conf" for details.

Note You need to log in before you can comment on or make changes to this bug.