From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17503 invoked by alias); 22 Feb 2011 19:39:46 -0000 Mailing-List: contact archer-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: List-Id: Received: (qmail 17494 invoked by uid 22791); 22 Feb 2011 19:39:45 -0000 X-SWARE-Spam-Status: No, hits=-6.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Date: Tue, 22 Feb 2011 19:39:00 -0000 From: Oleg Nesterov To: Roland McGrath Cc: Jan Kratochvil , Project Archer Subject: Re: ptrace improvement: PTRACE_O_INHERIT Message-ID: <20110222193124.GA3257@redhat.com> References: <20110215003551.BC1EA1802A2@magilla.sf.frob.com> <20110215130805.GA30742@redhat.com> <20110215214333.GA18086@host1.dyn.jankratochvil.net> <20110215215634.2665A1806E0@magilla.sf.frob.com> <20110216193356.GB15576@redhat.com> <20110216194534.2D39018020E@magilla.sf.frob.com> <20110216200110.GA17601@redhat.com> <20110219194758.GA8994@host1.dyn.jankratochvil.net> <20110219202921.GA12280@redhat.com> <20110221195405.D27B11801F8@magilla.sf.frob.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110221195405.D27B11801F8@magilla.sf.frob.com> User-Agent: Mutt/1.5.18 (2008-05-17) X-SW-Source: 2011-q1/txt/msg00091.txt.bz2 On 02/21, Roland McGrath wrote: > > > However. With or without PTRACE_O_TRACEEXIT, the thread can't go away > > until ptracer does do_wait(WEXITED). And until it does do_wait() tkill() > > succeeds even if the tracee is dead/zombie. > > That is true except in the case of MT exec (de_thread). Ah! Indeed you are right, I forgot about this case again. > The other threads > live in the process at the time when another does exec will be immediately > reaped without the chance for the debugger to see its death report. Unless I missed something again, other threads are visible to wait(). But, in case de_thread() changes the leader, it does release_task(old_leader). However, from ptrace pov it looks as if the execing thread goes away, it changes its pid. This reminds me. PTRACE_O_TRACEEXIT is not reliable if arch_ptrace_stop_needed(). This is only sparc/ia64 so far, but we were going to change ptrace_stop() so that it never stops if the process was really killed by SIGKILL... Oleg.