From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11149 invoked by alias); 16 Jul 2009 20:45:46 -0000 Received: (qmail 11140 invoked by uid 22791); 16 Jul 2009 20:45:45 -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.33.17) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 16 Jul 2009 20:45:39 +0000 Received: from wpaz37.hot.corp.google.com (wpaz37.hot.corp.google.com [172.24.198.101]) by smtp-out.google.com with ESMTP id n6GKjZqf027344 for ; Thu, 16 Jul 2009 21:45:36 +0100 Received: from bwz7 (bwz7.prod.google.com [10.188.26.7]) by wpaz37.hot.corp.google.com with ESMTP id n6GKj7JD019043 for ; Thu, 16 Jul 2009 13:45:33 -0700 Received: by bwz7 with SMTP id 7so364476bwz.8 for ; Thu, 16 Jul 2009 13:45:32 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.52.13 with SMTP id e13mr112293muk.52.1247777132878; Thu, 16 Jul 2009 13:45:32 -0700 (PDT) In-Reply-To: <8ac60eac0907161248yf46afa8o2abe3b36d0f6d599@mail.gmail.com> References: <20090605222214.66E2976BC4@localhost> <8ac60eac0906151139w23c6cc2ag9307d73232753f65@mail.gmail.com> <8ac60eac0906220910p5750f455u1e3dc462035d50b6@mail.gmail.com> <4A3FC8CA.5070700@vmware.com> <8ac60eac0906221321r45c43a13g87a830f8dd3487ea@mail.gmail.com> <8ac60eac0907161248yf46afa8o2abe3b36d0f6d599@mail.gmail.com> Date: Thu, 16 Jul 2009 21:16:00 -0000 Message-ID: Subject: Re: [patch] Fix for gdb.threads/staticthreads.exp failure on Linux From: Doug Evans To: Paul Pluzhnikov Cc: Michael Snyder , "gdb-patches@sourceware.org" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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/msg00414.txt.bz2 On Thu, Jul 16, 2009 at 12:48 PM, Paul Pluzhnikov w= rote: > 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. Right. But for "run", that's my question. >> 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 =A0 =A0 =A0 =A0 =A0 =A06 > # of unexpected failures =A0 =A0 =A0 =A03 > # of known failures =A0 =A0 =A0 =A0 =A0 =A0 1 > > When gdb is built against glibc-2.3.6, but test with glibc-2.7, I see > one KFAIL. That's what I see too. > I've retested attached patch under all four combinations above, which > results in: > > gdb-glibc-2.7 =A0 test-glibc-2.7: =A0 no failures > gdb-glibc-2.7 =A0 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: =A0 KFAIL: > gdb.threads/staticthreads.exp: info threads (PRMS: gdb/1328) > > and checked this in. Thanks. I tweaked the comment a bit.