From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1680 invoked by alias); 16 Feb 2011 16:02:21 -0000 Mailing-List: contact archer-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: List-Id: Received: (qmail 1667 invoked by uid 22791); 16 Feb 2011 16:02:19 -0000 X-SWARE-Spam-Status: No, hits=-6.3 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: Wed, 16 Feb 2011 16:02:00 -0000 From: Jan Kratochvil To: Roland McGrath Cc: Oleg Nesterov , Project Archer Subject: Re: ptrace improvement: PTRACE_O_INHERIT Message-ID: <20110216160209.GA19339@host1.dyn.jankratochvil.net> References: <20110211192423.78FFC1802A2@magilla.sf.frob.com> <20110211203755.GA5367@redhat.com> <20110212005855.E764C1814A4@magilla.sf.frob.com> <20110212190253.GA31866@redhat.com> <20110214193052.3EC8D1814BA@magilla.sf.frob.com> <20110214193812.GA20765@redhat.com> <20110215003551.BC1EA1802A2@magilla.sf.frob.com> <20110215130805.GA30742@redhat.com> <20110215214333.GA18086@host1.dyn.jankratochvil.net> <20110215220153.470031806E0@magilla.sf.frob.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110215220153.470031806E0@magilla.sf.frob.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2011-q1/txt/msg00059.txt.bz2 On Tue, 15 Feb 2011 23:01:53 +0100, Roland McGrath wrote: > (that probably being asynchronous detach, not requiring stopped tracees, and > not supporting any parting-signal feature). That may be too asynchronous. After GDB/gcore/etc. finishes new PTRACE_ATTACH must complete successfully. I never know if it is already guaranteed or not but in practice it works now. If there is no PTRACE_DETACH_ALL_TIDS(pid) and PTRACE_O_THREAD_INHERIT is in use GDB probably has to repeatedly iterate /proc/PID/task/*/status till all have TracerPid == 0. > the attach-group implementation will be sufficiently hairy that the kernel > community would demand that we do some simpler incremental changes first > before attempting it (such as what I proposed for ATTACH_NOSTOP, which > eliminates the SIGSTOP and rolls in atomic option-setting). thread_db_find_new_threads_2 already does an ugly loop of repeated threads finding. There are also some failures that can be probably fixed by changing td_ta_thr_iter to readdir(/proc/PID/task) (RH#677654). There are some pending bugs in GDB about it. Thanks, Jan