From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8481 invoked by alias); 13 Mar 2012 14:50:56 -0000 Received: (qmail 8470 invoked by uid 22791); 13 Mar 2012 14:50:54 -0000 X-SWARE-Spam-Status: No, hits=-6.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 13 Mar 2012 14:50:39 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q2DEocnE011460 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 13 Mar 2012 10:50:38 -0400 Received: from host2.jankratochvil.net (ovpn-116-16.ams2.redhat.com [10.36.116.16]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q2DEoY27011482 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Tue, 13 Mar 2012 10:50:37 -0400 Date: Tue, 13 Mar 2012 14:50:00 -0000 From: Jan Kratochvil To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: [patch 2/3] attach-fail-reasons: Say more than ptrace: Operation not permitted. Message-ID: <20120313145034.GA354@host2.jankratochvil.net> References: <20120306061710.GB24004@host2.jankratochvil.net> <4F58BA4A.9090903@redhat.com> <20120313094307.GA25939@host2.jankratochvil.net> <4F5F226F.5090304@redhat.com> <20120313135457.GA8363@host2.jankratochvil.net> <4F5F5B0F.8010804@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4F5F5B0F.8010804@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-03/txt/msg00435.txt.bz2 On Tue, 13 Mar 2012 15:34:55 +0100, Pedro Alves wrote: > E.g., with a multi-threaded exec, the execing thread just disappears > from /proc/TID as in reality the kernel changed the execing thread's TID, so > it's possible we end trying to open the non-existing /proc/TID/... before handling > the exec event. I think there were other ways for a tracee to be completely > killed/removed behind the tracer's back, but maybe that was only with older kernels, > if it ever was. I do not see when exactly this race may happen. Still I always thought /proc is racy by design, it does not have to be (not sure if it currently is or is not). > dynamic string growth with delete[]/new[] to reallocate (instead of std::string, not > knowing its existence), The difference is statistically everyone knows STL but nobody knows GDB-specific (or Sourceware-specific) libraries/functions. This makes learning curve of possible contributors needlessly steep. Thanks, Jan