From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 744 invoked by alias); 16 Jul 2009 19:49:08 -0000 Received: (qmail 735 invoked by uid 22791); 16 Jul 2009 19:49:08 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.45.13) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 16 Jul 2009 19:49:01 +0000 Received: from spaceape10.eur.corp.google.com (spaceape10.eur.corp.google.com [172.28.16.144]) by smtp-out.google.com with ESMTP id n6GJmwuB023418 for ; Thu, 16 Jul 2009 12:48:58 -0700 Received: from qyk16 (qyk16.prod.google.com [10.241.83.144]) by spaceape10.eur.corp.google.com with ESMTP id n6GJmNSB029081 for ; Thu, 16 Jul 2009 12:48:56 -0700 Received: by qyk16 with SMTP id 16so421367qyk.27 for ; Thu, 16 Jul 2009 12:48:55 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.109.194 with SMTP id k2mr29186qcp.68.1247773735556; Thu, 16 Jul 2009 12:48:55 -0700 (PDT) In-Reply-To: References: <20090605222214.66E2976BC4@localhost> <8ac60eac0906151139w23c6cc2ag9307d73232753f65@mail.gmail.com> <8ac60eac0906220910p5750f455u1e3dc462035d50b6@mail.gmail.com> <4A3FC8CA.5070700@vmware.com> <8ac60eac0906221321r45c43a13g87a830f8dd3487ea@mail.gmail.com> Date: Thu, 16 Jul 2009 20:45:00 -0000 Message-ID: <8ac60eac0907161248yf46afa8o2abe3b36d0f6d599@mail.gmail.com> Subject: Re: [patch] Fix for gdb.threads/staticthreads.exp failure on Linux From: Paul Pluzhnikov To: Doug Evans Cc: Michael Snyder , "gdb-patches@sourceware.org" Content-Type: multipart/mixed; boundary=0016361640ad449818046ed7f6a4 X-System-Of-Record: true 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: 2009-07/txt/msg00412.txt.bz2 --0016361640ad449818046ed7f6a4 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-length: 2223 On Wed, Jul 15, 2009 at 6:25 PM, Doug Evans wrote: > I like the patch. If thread enumeration fails during > try_thread_db_load_1 we ignore it and leave gdb to try again later. > When we get to this point we've already verified libthread_db is > (mostly) happy. > I kinda wonder, though, if that works then maybe gdb shouldn't do > thread enumeration at all here. There is the 'attach' scenario under which (I believe) we *should* do thread enumeration here. > I think a comment needs to be added to your patch, probably to the > call site of thread_db_find_new_threads_silently, that thoroughly > explains what's going on (assuming that's still the best solution). Added. > btw, the reason for the 1 known failure is, I'm guessing, because gdb > was built with the same toolchain that uses the older glibc, but the > test was run using a native toolchain that uses a newer glibc and the > mismatch is sufficient to trigger the failure. =A0At least that explains > things in my sandbox. =A0If I rebuild gdb with native gcc, or set > libthread-db-search-path to find the newer glibc, the kfail goes away. When gdb is built with native toolchain (glibc-2.7) and the test is built with the same, then there is no failure. When gdb is built with native toolchain, but the test is built against glibc-2.3.6, I see one KFAIL. When both gdb and the test are built against glibc-2.3.6, I see this: FAIL: gdb.threads/staticthreads.exp: running to main in runto FAIL: gdb.threads/staticthreads.exp: Continue to main's call of sem_post FAIL: gdb.threads/staticthreads.exp: handle SIG32 helps # of expected passes 6 # of unexpected failures 3 # of known failures 1 When gdb is built against glibc-2.3.6, but test with glibc-2.7, I see one KFAIL. I've retested attached patch under all four combinations above, which results in: gdb-glibc-2.7 test-glibc-2.7: no failures gdb-glibc-2.7 test-glibc-2.3.6: KFAIL: gdb.threads/staticthreads.exp: info threads (PRMS: gdb/1328) gdb-glibc-2.3.6 test-glibc-2.3.6: no failures gdb-glibc-2.3.6 test-glibc-2.7: KFAIL: gdb.threads/staticthreads.exp: info threads (PRMS: gdb/1328) and checked this in. Thanks, --=20 Paul Pluzhnikov --0016361640ad449818046ed7f6a4 Content-Type: text/plain; charset=US-ASCII; name="gdb-staticthreads-20090716.txt" Content-Disposition: attachment; filename="gdb-staticthreads-20090716.txt" Content-Transfer-Encoding: base64 X-Attachment-Id: f_fx7w8acd0 Content-length: 2030 SW5kZXg6IGxpbnV4LXRocmVhZC1kYi5jCj09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT0KUkNTIGZpbGU6IC9jdnMvc3JjL3NyYy9nZGIvbGludXgtdGhyZWFkLWRi LmMsdgpyZXRyaWV2aW5nIHJldmlzaW9uIDEuNjIKZGlmZiAtdSAtcCAtdSAt cjEuNjIgbGludXgtdGhyZWFkLWRiLmMKLS0tIGxpbnV4LXRocmVhZC1kYi5j CTIgSnVsIDIwMDkgMTc6MTI6MjUgLTAwMDAJMS42MgorKysgbGludXgtdGhy ZWFkLWRiLmMJMTYgSnVsIDIwMDkgMTk6NDA6MDcgLTAwMDAKQEAgLTU4OCw2 ICs1ODgsMjUgQEAgZW5hYmxlX3RocmVhZF9ldmVudF9yZXBvcnRpbmcgKHZv aWQpCiAgICAgfQogfQogCisvKiBTYW1lIGFzIHRocmVhZF9kYl9maW5kX25l d190aHJlYWRzXzEsIGJ1dCBzaWxlbnRseSBpZ25vcmUgZXJyb3JzLiAgKi8K Kworc3RhdGljIHZvaWQKK3RocmVhZF9kYl9maW5kX25ld190aHJlYWRzX3Np bGVudGx5IChwdGlkX3QgcHRpZCkKK3sKKyAgdm9sYXRpbGUgc3RydWN0IGdk Yl9leGNlcHRpb24gZXhjZXB0OworCisgIFRSWV9DQVRDSCAoZXhjZXB0LCBS RVRVUk5fTUFTS19FUlJPUikKKyAgICB7CisgICAgICB0aHJlYWRfZGJfZmlu ZF9uZXdfdGhyZWFkc18xIChwdGlkKTsKKyAgICB9CisKKyAgaWYgKGV4Y2Vw dC5yZWFzb24gPCAwICYmIGluZm9fdmVyYm9zZSkKKyAgeworICAgIG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