Subject: kern/629: "sleep 3" sleeps forever (from /etc/ppp/ip-down)
To: None <gnats-admin@sun-lamp.cs.berkeley.edu>
From: Bob Kemp <rsk@allegory.demon.co.uk>
List: netbsd-bugs
Date: 12/11/1994 08:35:28
>Number: 629
>Category: kern
>Synopsis: "sleep 3" sleeps forever (from /etc/ppp/ip-down)
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people (Kernel Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Dec 11 08:35:25 1994
>Originator: Bob Kemp
>Organization:
Bob Kemp rsk@allegory.demon.co.uk
>Release: 1.0
>Environment:
System: NetBSD allegory 1.0 NetBSD 1.0 (ALLEGORY) #0: Thu Dec 8 22:38:18 GMT 1994 root@allegory:/usr/src/sys/arch/i386/compile/ALLEGORY i386
>Description:
I have a dial-up Internet connection using PPP. It runs fine
except that when shutting down, the call to sleep 3 in /etc/ppp/ip-down
waits forever. When I kill the sleep procees, everything continues
as it should.
The system is pretty vanilla 1.0 (having just upgraded) but there
was a similar problem with a mongrel 1.0beta I ran before.
I have applied patches 0,2,3,4,5. Patch 1 is irrelevant to my system.
>How-To-Repeat:
I'm not sure what to put here (Advice Welcome!)
I cannot reproduce it except in /etc/ppp/ip-down
but there it is _boringly_consistent_.
Below are the outputs from "ps axglww" and "fstat -p 1235" but
first here is /etc/ppp/ip-down. "hangup" call kermit to hangup
the phone line. "timer_control end" kills the phone call timer
process.
> #!/bin/sh
>
> echo running $0
>
> # hangup
> # timer_control end
>
> hangup && timer_control end &
>
> sleep 3
> # /bin/sleep 2
>
> if [ -f /var/run/sendmail.pid ]; then
> set `cat /var/run/sendmail.pid`
> echo 'killing sendmail, PID =' $1
> kill $1
> sendmail -q & # clear the mail queues
> fi
>
> if [ -f /var/run/slurp.pid ]; then
> pid=`cat /var/run/slurp.pid`
> echo 'killing slurp, PID =' ${pid}
> kill ${pid}
> rm -f /var/run/slurp.pid
> fi
>
> if [ -f /usr/local/news/innd/innd.pid ] ; then
> pid=`cat /usr/local/news/innd/innd.pid`
> echo 'killing innd, PID =' ${pid}
> kill ${pid}
> fi
>
> echo -n Running nnmaster in the background...
> /usr/local/lib/nn/nnmaster -LM 2>&1 | logger &
> echo ''
UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT TIME COMMAND
0 0 0 0 -18 0 0 0 schedu DLs ?? 0:00.02 (swapper)
0 1 0 0 10 0 192 76 wait Is ?? 0:00.16 /sbin/init
0 2 0 0 -18 0 0 12 thrd_s DL ?? 0:01.82 (pagedaemon)
0 42 1 0 2 0 52 124 select Is ?? 0:00.06 portmap
0 50 1 0 2 0 72 224 select Ss ?? 0:00.71 syslogd
0 65 1 0 18 0 16 120 pause Ss ?? 0:00.76 update
0 67 1 0 18 0 156 228 pause Is ?? 0:00.28 cron
0 73 1 3 2 0 80 172 select Is ?? 0:00.12 lpd
0 79 1 0 2 0 100 188 select Is ?? 0:00.47 inetd
0 927 1 0 2 0 308 268 netcon Is ?? 0:00.10 sendmail: accepting connections (sendmail)
0 928 927 2 28 0 0 0 - Z ?? 0:00.00 (sendmail)
0 932 927 2 28 0 0 0 - Z ?? 0:00.00 (sendmail)
0 933 927 3 28 0 0 0 - Z ?? 0:00.00 (sendmail)
0 941 927 2 28 0 0 0 - Z ?? 0:00.00 (sendmail)
0 942 927 2 28 0 0 0 - Z ?? 0:00.00 (sendmail)
0 1235 1226 0 18 0 36 36 pause I ?? 0:00.04 sleep 3
0 1226 1 0 10 0 292 156 wait I 00- 0:00.07 /bin/sh /etc/ppp/ip-down ppp0 /dev/modem 57600 158.152.31.201 158.152.250.194
15 129 1 0 3 0 672 500 ttyin Is+ v0 0:01.77 -tcsh (tcsh)
32767 130 1 0 18 0 164 220 pause Ss+ v1 0:10.95 /usr/sbin/iostat 1 /usr/allegory/bin/IoStatus
15 131 1 2 18 0 708 520 pause Ss v2 0:06.69 -tcsh (tcsh)
15 1297 131 0 28 0 548 952 - T v2 0:00.70 vi slurp.msg
15 1315 131 5 29 0 240 172 - R+ v2 0:00.04 ps axglww
0 132 1 0 3 0 584 144 ttyin Is+ v3 0:00.93 -tcsh (tcsh)
0 133 1 1 3 0 48 144 ttyin Is+ v4 0:00.10 /usr/libexec/getty Pcvt ttyv4
>Fix:
>Audit-Trail:
>Unformatted: