From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31530 invoked by alias); 6 Nov 2014 21:12:45 -0000 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 Received: (qmail 31512 invoked by uid 89); 6 Nov 2014 21:12:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: dancol.org Received: from dancol.org (HELO dancol.org) (96.126.100.184) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 06 Nov 2014 21:12:43 +0000 Received: from [195.89.19.114] (helo=[172.17.183.206]) by dancol.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84) (envelope-from ) id 1XmUMD-0006fB-64; Thu, 06 Nov 2014 13:12:41 -0800 Message-ID: <545BE441.6020309@dancol.org> Date: Thu, 06 Nov 2014 21:12:00 -0000 From: Daniel Colascione User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Pedro Alves , gdb-patches@sourceware.org Subject: Re: [PATCH] Warn users about mismatched PID namespaces References: <5451AB7E.40709@dancol.org> <54522DC7.2090100@redhat.com> <54522FE0.9050508@dancol.org> <545233C8.4070402@redhat.com> <5452345D.4040601@dancol.org> <5452391C.8020709@redhat.com> <545A020F.6080104@redhat.com> In-Reply-To: <545A020F.6080104@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ei35WaiO1ddMqnufCFXb5A11slqcSF8Qn" X-IsSubscribed: yes X-SW-Source: 2014-11/txt/msg00121.txt.bz2 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --ei35WaiO1ddMqnufCFXb5A11slqcSF8Qn Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-length: 1582 On 11/05/2014 10:55 AM, Pedro Alves wrote: > On 10/30/2014 01:11 PM, Pedro Alves wrote: >> On 10/30/2014 12:51 PM, Daniel Colascione wrote: >>> On 10/30/2014 12:49 PM, Pedro Alves wrote: >>>> On 10/30/2014 12:32 PM, Daniel Colascione wrote: >>>>> On 10/30/2014 12:23 PM, Pedro Alves wrote: >>>>>> On 10/30/2014 03:07 AM, Daniel Colascione wrote: >>>>>> >>>>>>> diff --git a/gdb/linux-thread-db.c b/gdb/linux-thread-db.c >>>>>>> index 352fac1..4089417 100644 >>>>>>> - --- a/gdb/linux-thread-db.c >>>>>>> +++ b/gdb/linux-thread-db.c >>>>>>> @@ -1223,6 +1223,25 @@ thread_db_new_objfile (struct objfile *objfi= le) >>>>>>> static void >>>>>>> thread_db_inferior_created (struct target_ops *target, int from_tt= y) >>>>>>> { >>>>>>> + /* If the child is in a different PID namespace, its idea of its= PID >>>>>>> + will differ from our idea of its PID. When we scan the child= 's >>>>>>> + thread list, we'll mistakenly think it has no threads since t= he >>>>>>> + thread PID fields won't match the PID we give to >>>>>>> + libthread_db. */ >>>>>> >>>>>> Why not give libthread_db the right PID then? >>>>> >>>>> How do you suggest find it?=20 >>>> >>>> Isn't it visible somewhere in /proc ? >>> >>> Not AFAICT, but maybe I overlooked something. >> >> Oh well... >=20 > FYI, looks like exposing the info in /proc is in the works > as well. I just stumbled uppon this: >=20 > https://lkml.org/lkml/2014/11/5/174 That's good to hear. It won't help users of current kernels though. Anyway, my paperwork just went through. Is there anything I need to do now? --ei35WaiO1ddMqnufCFXb5A11slqcSF8Qn Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" Content-length: 819 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCAAGBQJUW+RBAAoJEN4WImmbpWBlUFcP/RCFP10n6RktmWZ+PyaUZcOK 7IYG5y56cXzqqsnWOl7t8t2zOUIpEbxXzE2akTQF7muhlo2avWbqzS2rmtuTWzOw RCyZjXmeGNkfEkZRVQAVyyZB5DrMHMr+nrefND75aUdVgxP4qhzGIUUbvY9f5vnX 2BfkgTuTg+ZrTEsBT9NVeMN6fjLyCks6d/0XceBZlnm1ZLZAWZAPODYTEj3nIT1A NoMEEZBhzY7CitD9HVW0HUTaAe48qn3qdIf9jAFMqfsZec3+PVD8xn7Wkl1R21T+ nBJBPwJgN1jsQJUwAxMPqwGGomoPSe4NE4vSbZrIcdAmNiE1X/mWfXaK+0HdWJgJ 7Zf4RbezUi09lKt1q0XOgdeH8RtlO1y1tfIjRzI+8GCSPFkjhBz9JuE3kxwGBSEb m/n/p2/68RX/cV3HGYruQmFZSVVgmL1BFtWJ2VNrF5hlAlgpUOHSTTlx4/sa+AhT i5sReTlNondCOPJHUiEoDMlhtO8XcLKfk6wyFRQrE60M2hjxFu7DtRISybqpoG+h 63lwAbptHHaKZmJDRM1wRh2A8eGHGTFCQw9GFad8SI6ESTkkSJk+5lCrqBIkUQ+U vD9OLbjZ7Kl14eFYb0+ebe6lGpQXmhK76mnkTdxD1H9wdI5xe7qJ1lDNQDpnEB7P +63UrGYnr2n1j389AD+Q =12cw -----END PGP SIGNATURE----- --ei35WaiO1ddMqnufCFXb5A11slqcSF8Qn--