CVSROOT: /cvs Module name: src Changes by: kette...@cvs.openbsd.org 2014/02/09 04:17:19
Modified files: sys/sys : proc.h sys/kern : kern_exit.c kern_sig.c Log message: Fix the lock order reversal problem in the code that stops traced multi-threaded processes when they receive a signal: 1. Make the parent of the process (the tracer) wait for all threads to be stopped (in wait4(2)) instead of the thread that received the signal. This prevents us from calling tsleep(9) recursively. 2. Assume that we already hold the kernel lock if the P_SINTR flag is set (just like we already assumed we were holding the scheduler lock) and don't try to grab it again. This should fix the panic that many people reported when debugging multi-threaded programs with gdb(1). ok & lots of help from guenther@