Bug 15457

Summary: inetd makes FreeBSD crash
Product: Base System Reporter: emmanuel.dupont <emmanuel.dupont>
Component: miscAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 3.3-RELEASE   
Hardware: Any   
OS: Any   

Description emmanuel.dupont 1999-12-13 12:30:01 UTC
I was testing scripts with inetd. It crash the pc.

Fix: 

sorry i can't
How-To-Repeat: echo prox 3128/tcp >>/etc/services
echo prox stream tcp nowait/3 root /tmp/prox.sh prox.sh >> /etc/inetd.conf
cat >/tmp/prox.sh <<EOF
#!/bin/sh
/usr/bin/awk ' {print ;  print >> "/tmp/prox.log"}'
EOF
chmod 550 /tmp/prox.sh
kill -HUP `cat /var/run/inetd.pid`
telnet localhost prox
Comment 1 alex 1999-12-13 13:14:08 UTC
I can't reproduce this.

alex:~ $ uname -a
FreeBSD cichlids.cichlids.com 4.0-CURRENT FreeBSD 4.0-CURRENT #1: Sat
Dec  4 18:55:47 CET 1999
alex@cichlids.cichlids.com:/usr/src/sys/compile/cichlids  i386
Comment 2 Sheldon Hearn 1999-12-13 13:57:07 UTC
On Mon, 13 Dec 1999 04:26:26 PST, emmanuel.dupont@alcatel.fr wrote:

> I was testing scripts with inetd. It crash the pc.

What does "it crash the pc" mean?  Any messages in /var/log/messages?
Any panic message on the console?

> #!/bin/sh
> /usr/bin/awk ' {print ;  print >> "/tmp/prox.log"}'

Okay, so you're effectively offering the same service as inetd's builtin
echo service, except that you're logging what you receive to disk.

Are you sure you've got enough space in /tmp?  Is /tmp and MFS?  If so,
is its size limited, or are you giving the outside world an easy way to
exhaust your swap?

Also, I notice you're using 3.3-RELEASE.  You should be aware that a
number of problems in inetd have been fixed in 3.3-STABLE recently.
None of these problems cause "crash the pc" symptoms, which I've never
seen inetd do in any case.

Ciao,
Sheldon.
Comment 3 ed 1999-12-13 14:10:35 UTC
I made a mistake, the problem is not inetd. It's a null-fs one.
I  did a "mount_null /home/tmp  /tmp"  ( my / was full ).
I and i changed the fstab too.
It  worked fine (seems to) but it hang with the script "/tmp/prox.sh",
inetd is not guilty.
Reading the "man page" i see that  null-fs was buggy so i think you
can close this call.
Comment 4 Sheldon Hearn freebsd_committer freebsd_triage 1999-12-13 15:38:06 UTC
State Changed
From-To: open->closed

Misdiagnosed problem.  Thanks for the quick follow-up, btw.