Chris Wedgwood wrote: > kill(..., SIGKILL) doesn't work to kill host-OS processes created in > the exec path in TT mode --- for this we need PTRACE_KILL (it did work > in previous kernels, but not by design). Without this process will > accumulate on the host-OS (although the won't be visible inside UML). > > Signed-off-by: Chris Wedgwood > --- > > Yes, there are other fixes along these lines which are needed but one > at a time as we test these... > > Index: cw-current/arch/um/kernel/tt/exec_user.c > =================================================================== > --- cw-current.orig/arch/um/kernel/tt/exec_user.c 2004-11-03 02:10:18.064830204 -0800 > +++ cw-current/arch/um/kernel/tt/exec_user.c 2004-11-03 02:12:10.447716745 -0800 > @@ -35,7 +35,8 @@ > tracer_panic("do_exec failed to get registers - errno = %d", > errno); > > - kill(old_pid, SIGKILL); > + if (ptrace(PTRACE_KILL, old_pid, NULL, NULL)) > + printk("Warning: ptrace(PTRACE_KILL, %d, ...) saw %d\n", errno); > > if(ptrace_setregs(new_pid, regs) < 0) > tracer_panic("do_exec failed to start new proc - errno = %d", > > > ------------------------------------------------------- > This SF.Net email is sponsored by: > Sybase ASE Linux Express Edition - download now for FREE > LinuxWorld Reader's Choice Award Winner for best database on Linux. > http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click > _______________________________________________ > User-mode-linux-devel mailing list > User-mode-linux-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel Now, there are some patches out there, to fix the problem: - this one here - uml-hang-on-2.6.9-host from BlaisorBlade - patch-fix-uml-hang-on-2.6.9-host to combine the two and add some new stuff After a discussion on #uml yesterday, I tried to find out, which parts of the patches are really neccessary. Now here are the results: 1) Chris' patch is neccessary to avoid the amassing threads in tt-mode. 2) All parts from BlaisorBlade's patch regarding SKAS are needed to not have SKAS hanging on shutdown. I used the os_kill_ptraced_process() inserted here for Chris' part. 3) The changes done in switch_to_tt() from BlaisorBlades patch are not needed. Thus, my rework of this isn't needed, too. 4) In release_thread_tt() my change has to inserted, else UML doesn't boot on my system. 5) The changes, I did for kill_of_processes_tt and kill_idlers are not needed. 6) I inserted some small changes in kill_of_processes_tt and kill_idlers to have the killing process waiting for the killed one to exit. Not really needed, but cleaner. 7) I saw some zombies not being reaped immediately before the exec() in case of reboot. Thus, I added a small waitpid-loop in tracer(). Also, not needed, but cleaner. The resulting new patch is attached in a tar-ball. It applies to 2.6.9-bb2, but you have to remove the patch "uml-hang-on-2.6.9-host and add my small series of patches, which also is in the tar-ball. The fix some small problems, let SKAS reboot without problems and add the new SYSEMU_SINGLESTEP-mode (but runs on older hosts also). Series: patch-bb1-fix-1 patch-fix-elf_aux patch-fix-sysemu-tt patch-fix-reboot-skas patch-close-all-fds which is the unnamed patch from Jeff, adapted to 2.6.9-bb2 patch-SYSEMU_SINGLESTEP-1 patch-SYSEMU_SINGLESTEP-2 patch-rework-uml-hang-on-2.6.9-host Regards Bodo