From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,71cddb4124190ee2 X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1994-09-22 06:53:15 PST Path: bga.com!news.sprintlink.net!howland.reston.ans.net!usc!nic-nac.CSU.net!charnel.ecst.csuchico.edu!olivea!decwrl!pa.dec.com!jac.zko.dec.com!moonbase.uvo.dec.com!jm From: jm@moonbase.uvo.dec.com (John McNulty) Newsgroups: comp.unix.osf.osf1 Subject: Re: LAT connections not being removed from /var/adm/utmp Date: 21 Sep 1994 09:39:15 GMT Organization: Digital Equipment Co. Ltd Distribution: world Message-ID: <35ov03$qik@jac.zko.dec.com> References: <3583kb$5de@risky.ecs.umass.edu> <359rch$i3u@jac.zko.dec.com> <35kqn2$gir@canopus.cc.umanitoba.ca> Reply-To: jm@moonbase.uvo.dec.com (John McNulty) NNTP-Posting-Host: moonbase.uvo.dec.com X-Newsreader: mxrn 6.18-16 > Apparently Scott Ruch's patch has yet to be invented, because I've been > in contact with DECsupport and have yet to receive it :-( 90% of our > users connect via LAT and we're starting to build up these defunct > processes very _QUICKLY_. > > We can't kill them because they were all created by PID 1 and we all know > what happens when you do a "kill -9 1" don't we. Does any guru out there > know how we can kill a defunct process that was created by init (PID 1) > without toasting the whole thing. > > I think the /var/adm/utmp problem Steve talked about is one in the same. Ok, this should clear up the mystery around this. Not all v3.0 systems are seeing this problem. To make sure that you are, try this test. If you can start kdbx (if you have DECnet or some other dynamically loaded kernel subsystem, kdbx won't start up and you'll need a patched dbx), then do this: $ kdbx -k /vmunix (kdbx) set $pid=1 (kdbx) list_action "struct proc *" p_osptr 0 thread->stack->uthread->proc->p_cpt r "p %c,%c->p_pid, %c->p_flag&0x440" Enter this on one command line: it dumps init's child list and display some interesting flags. This header describes the fields displayed, with a little sample output. PROC_PTR PID P_FLAGS & (SNOTASK|SWEXIT) --------------------------------------------------- 0xffffffff81b08d80 30857 0 0xffffffff81b24210 30858 0 0xffffffff81b26210 30861 0 0xffffffff81324d80 29764 0 . . . You want to look for a pattern like this: 0xffffffff81374d80 4459 1024 = SWEXIT 0xffffffff81382d80 4364 1088 = SNOTASK|SWEXIT 0xffffffff81376d80 3783 1088 0xffffffff81370d80 824 1024 0xffffffff8136e210 823 1088 0xffffffff8136ed80 822 1088 0xffffffff8136c210 821 1088 0xffffffff8136cd80 820 1088 0xffffffff8136a210 819 1088 The procs with flags = 1088 are unreaped zombie children of init. In this display, they are all from LAT gettys in inittab, so they show up as being csh, ksh, etc, processes. The procs with flags = 1024 are part of the problem. They are attempting to do some streams cleanup and are hung. Their presence in init's child list is causing the following zombies not to be cleaned up. The side effect of this is that when a LAT connected user logs out, init doesn't respawn the getty process, and eventually you'll run out of available LAT lines. If you're suffering from this problem then run this script from cron about once an hour. #!/bin/ksh ps -je | while read -u0 data do set $data case $7 in T) kill -CONT $2 ;; *) ;; esac done This will allow the involved child processes and their () parents to completely exit. Once all "1024" processes are clear from init's child list, the zombies remaining in the list will be cleaned up. This is only a work around, but will keep you up and running without having to reboot. A patch for this problem is currently under test, and will be generally available shortly. Contact your local CSC, quote IPMT case number UVO102126 and put your name down for the patch. -- John McNulty Digital Equipment Corporation CSC/UK Unix Support Group