Xref: utzoo comp.unix.questions:6896 comp.unix.wizards:8310 comp.unix.microport:599 Path: utzoo!mnetor!uunet!husc6!m2c!ulowell!eagle!arosen From: arosen@eagle.ulowell.edu (MFHorn) Newsgroups: comp.unix.questions,comp.unix.wizards,comp.unix.microport Subject: Re: Trouble killing processes in SysV/AT Message-ID: <6832@swan.ulowell.edu> Date: 6 May 88 23:53:20 GMT References: <3950@killer.UUCP> <3951@killer.UUCP> <216@obie.UUCP> <52288@sun.uucp> Sender: news@swan.ulowell.edu Reply-To: arosen@hawk.ulowell.edu (MFHorn) Organization: University of Lowell, CS Dept. Lines: 36 In article <52288@sun.uucp> guy@gorodish.Sun.COM (Guy Harris) writes: >A *live* process that refuses to die, which is what was originally being >discussed, is a different matter. A very common cause of this is a driver that >blocks for a very long time - possibly forever - with a priority less than or >equal to PZERO. On a Sequent Balance 21K with 6 processors, we recently had a user with a program that failed to exit properly. It seemed to get stuck when it tried to exit. The annoying thing was each time he ran it, we'd lose one of our processors (whichever one tried to perform the exit). Since the process was in kernel mode, it couldn't receive any signals. After it was run a few times, the machine was 6 times slower than usual; we had to reboot. Would a program that does the following get rid of the process? 1: Gets the process' proc struct from the kernel. 2: Changes fields like the status, priority, cpu usage, wchan, exit status and maybe others so the kernel will have good reason to terminate the process. 3: Writes the new struct back out (open /dev/mem for write, lseek, write). If something along these lines would work, it should carry over to most unixes since they all should have the same or similar fields in the proc struct. I've written programs that change a process' proc struct; it's proabably not a good idea (you should be _very_ careful if you try it), but it does work. [it can be pretty fun. "Ok, let's make this vi privileged..."] I'd like people's opinions before I start trying to create some immortal processes to nuke. Andy Rosen | arosen@hawk.ulowell.edu | "I got this guitar and I ULowell, Box #3031 | ulowell!arosen | learned how to make it Lowell, Ma 01854 | | talk" -Thunder Road RD in '88 - The way it should be