| Message ID | 20260504071636.1571615-4-markus.t.metzger@intel.com |
|---|---|
| State | New |
| Headers |
Return-Path: <gdb-patches-bounces~patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id D822F4B99F4E for <patchwork@sourceware.org>; Mon, 4 May 2026 07:18:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D822F4B99F4E Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=Or2RJYVl X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.16]) by sourceware.org (Postfix) with ESMTPS id 4ACC44BA2E39 for <gdb-patches@sourceware.org>; Mon, 4 May 2026 07:16:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4ACC44BA2E39 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=intel.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 4ACC44BA2E39 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=198.175.65.16 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777879019; cv=none; b=b8CchFxf2MHdVjUuqbAeUPejx04XTUxqOE4t1NM5+eWD0ZbHuBOAPAxAby431276559K4hJl5Hoof8Af6GrEt+gPrjk9m9l1PhN4EifZu//fls+O6lJ9U0Hy/quqSdI3quBxO/kvM6dx6AI7DjAa8jUoaG7dF5tortLjo9srqaQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777879019; c=relaxed/simple; bh=SWtOIxrxOVMC4mTh55L/5cHf8Yey1kvD2NLsTP0jFGo=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=kCuivuuTcFDrbiyckuL+DJrGlLgUtrz9Lp1jd4e1YXkyaVQUuYMScEnJH3pLsUmJaUAlFGmvx7pLHaiqzXBGVTiGKLC0AAgoR1a9Q8uSR/yILpnnzuSQPoScKqKXoC6oB/8G7JUuQm8rtEOu/k1yDBU+UaLPXe8ejRfkbyA6pu0= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4ACC44BA2E39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1777879019; x=1809415019; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=SWtOIxrxOVMC4mTh55L/5cHf8Yey1kvD2NLsTP0jFGo=; b=Or2RJYVl2WDrhtaAxKUyaerDgF+gdSkrr0oPprxTggPb4kf2SBA7WHl8 F+2iFa0OmmKPiAkKe1BmWsj64VrbZztPZ422RxkP2CKW2jgEjKE8oXLKl DTAF5c/1wj2dQhPhmi909pm6Vyx2tet5NFKln1pPMh2EwUF0v6gPJAaWy 76iK+0tBjIbZPpl8q/Mw0cRwOika2gtt+UDSorJ4gLxGtWdQfymTUI/FH cucClpa2toy7/tkwBznIczVw/rCHTiGG2grnVNhkx5zvhSwz+E7SA7yO5 x4ayMhNEa/BcjVHZRJyFmGO6zMn9uNvm51eAO6QwwVRzA+MU91ATr4Rof g==; X-CSE-ConnectionGUID: XiHcdChqRHm9lkIyzjxUHg== X-CSE-MsgGUID: DOp6gL1yRLy51JusJ9AniQ== X-IronPort-AV: E=McAfee;i="6800,10657,11775"; a="78926002" X-IronPort-AV: E=Sophos;i="6.23,215,1770624000"; d="scan'208";a="78926002" Received: from fmviesa004.fm.intel.com ([10.60.135.144]) by orvoesa108.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 May 2026 00:16:56 -0700 X-CSE-ConnectionGUID: SG7MzbZMTNq2y4GShOVH3Q== X-CSE-MsgGUID: Fd0gD/9zSOOixtWa6INSLA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,215,1770624000"; d="scan'208";a="237221342" Received: from gkldtt-dev-004.igk.intel.com (HELO localhost) ([10.123.221.202]) by fmviesa004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 May 2026 00:16:49 -0700 From: Markus Metzger <markus.t.metzger@intel.com> To: gdb-patches@sourceware.org Subject: [PATCH] gdb, testsuite: increase timeout in gdb.threads/attach-non-stop.exp Date: Mon, 4 May 2026 07:16:33 +0000 Message-Id: <20260504071636.1571615-4-markus.t.metzger@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260504071636.1571615-1-markus.t.metzger@intel.com> References: <20260504071636.1571615-1-markus.t.metzger@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-9.5 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list <gdb-patches.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=subscribe> Errors-To: gdb-patches-bounces~patchwork=sourceware.org@sourceware.org |
| Series |
gdb, testsuite: increase timeout in gdb.threads/attach-non-stop.exp
|
|
Commit Message
Metzger, Markus T
May 4, 2026, 7:16 a.m. UTC
Attaching sporadically timed out on my system while reading symbols...
Reading symbols from .../attach-non-stop...
(gdb) gdb_do_cache: can_spawn_for_attach ( )
builtin_spawn .../attach-non-stop
attach 729532
Attaching to program: .../attach-non-stop, process 729532
[New LWP 729574 (id 2)]
[New LWP 729573 (id 3)]
[New LWP 729572 (id 4)]
[New LWP 729571 (id 5)]
[New LWP 729570 (id 6)]
[New LWP 729569 (id 7)]
[New LWP 729568 (id 8)]
[New LWP 729567 (id 9)]
[New LWP 729566 (id 10)]
[New LWP 729565 (id 11)]
Reading symbols from /lib/x86_64-linux-gnu/libc.so.6...
FAIL: gdb.threads/attach-non-stop.exp: target-non-stop=off: non-stop=on: cmd=attach: attach (timeout)
Adjust the timeout to avoid sporadic fails.
---
gdb/testsuite/gdb.threads/attach-non-stop.exp | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
Comments
On 5/4/26 3:16 AM, Markus Metzger wrote: > Attaching sporadically timed out on my system while reading symbols... > > Reading symbols from .../attach-non-stop... > (gdb) gdb_do_cache: can_spawn_for_attach ( ) > builtin_spawn .../attach-non-stop > attach 729532 > Attaching to program: .../attach-non-stop, process 729532 > [New LWP 729574 (id 2)] > [New LWP 729573 (id 3)] > [New LWP 729572 (id 4)] > [New LWP 729571 (id 5)] > [New LWP 729570 (id 6)] > [New LWP 729569 (id 7)] > [New LWP 729568 (id 8)] > [New LWP 729567 (id 9)] > [New LWP 729566 (id 10)] > [New LWP 729565 (id 11)] > Reading symbols from /lib/x86_64-linux-gnu/libc.so.6... > FAIL: gdb.threads/attach-non-stop.exp: target-non-stop=off: non-stop=on: cmd=attach: attach (timeout) > > Adjust the timeout to avoid sporadic fails. Not saying it's necessarily a bad idea, but I'd like some more details on what is taking so long. From the above, I understand that GDB is reading debug info for libc, which is not that big in the grand scheme of things... I'd like to know "this step is taking about X seconds", just to make sure we don't paper over an actual problem. Simon
Hello Simon, >On 5/4/26 3:16 AM, Markus Metzger wrote: >> Attaching sporadically timed out on my system while reading symbols... >> >> Reading symbols from .../attach-non-stop... >> (gdb) gdb_do_cache: can_spawn_for_attach ( ) >> builtin_spawn .../attach-non-stop >> attach 729532 >> Attaching to program: .../attach-non-stop, process 729532 >> [New LWP 729574 (id 2)] >> [New LWP 729573 (id 3)] >> [New LWP 729572 (id 4)] >> [New LWP 729571 (id 5)] >> [New LWP 729570 (id 6)] >> [New LWP 729569 (id 7)] >> [New LWP 729568 (id 8)] >> [New LWP 729567 (id 9)] >> [New LWP 729566 (id 10)] >> [New LWP 729565 (id 11)] >> Reading symbols from /lib/x86_64-linux-gnu/libc.so.6... >> FAIL: gdb.threads/attach-non-stop.exp: target-non-stop=off: non-stop=on: >cmd=attach: attach (timeout) >> >> Adjust the timeout to avoid sporadic fails. > >Not saying it's necessarily a bad idea, but I'd like some more details >on what is taking so long. From the above, I understand that GDB is >reading debug info for libc, which is not that big in the grand scheme >of things... > >I'd like to know "this step is taking about X seconds", just to make >sure we don't paper over an actual problem. The issue happens sporadically, typically while running the entire test suite (I use FORCE_PARALLEL). I tried reproducing it by just running this one test but couldn't. I cannot say what takes so long and how long exactly it takes, but increasing the timeout helped the test pass, so it wasn't actually hanging. One sporadic fail less. Regards, Markus. Intel Deutschland GmbH Registered Address: Dornacher Strasse 1, 85622 Feldkirchen, Germany Tel: +49 89 991 430, www.intel.de Managing Directors: Harry Demas, Jeffrey Schneiderman, Yin Chong Sorrell Chairperson of the Supervisory Board: Nicole Lau Registered Seat: Munich Commercial Register: Amtsgericht Muenchen HRB 186928
On 2026-05-05 02:15, Metzger, Markus T wrote: > Hello Simon, > >> On 5/4/26 3:16 AM, Markus Metzger wrote: >>> Attaching sporadically timed out on my system while reading symbols... >>> >>> Reading symbols from .../attach-non-stop... >>> (gdb) gdb_do_cache: can_spawn_for_attach ( ) >>> builtin_spawn .../attach-non-stop >>> attach 729532 >>> Attaching to program: .../attach-non-stop, process 729532 >>> [New LWP 729574 (id 2)] >>> [New LWP 729573 (id 3)] >>> [New LWP 729572 (id 4)] >>> [New LWP 729571 (id 5)] >>> [New LWP 729570 (id 6)] >>> [New LWP 729569 (id 7)] >>> [New LWP 729568 (id 8)] >>> [New LWP 729567 (id 9)] >>> [New LWP 729566 (id 10)] >>> [New LWP 729565 (id 11)] >>> Reading symbols from /lib/x86_64-linux-gnu/libc.so.6... >>> FAIL: gdb.threads/attach-non-stop.exp: target-non-stop=off: non-stop=on: >> cmd=attach: attach (timeout) >>> >>> Adjust the timeout to avoid sporadic fails. >> >> Not saying it's necessarily a bad idea, but I'd like some more details >> on what is taking so long. From the above, I understand that GDB is >> reading debug info for libc, which is not that big in the grand scheme >> of things... >> >> I'd like to know "this step is taking about X seconds", just to make >> sure we don't paper over an actual problem. > > The issue happens sporadically, typically while running the entire test > suite (I use FORCE_PARALLEL). I tried reproducing it by just running this > one test but couldn't. > > I cannot say what takes so long and how long exactly it takes, but increasing > the timeout helped the test pass, so it wasn't actually hanging. One sporadic > fail less. If the timeout is mostly related to how you run the testsuite, then I think it would be more appropriate to set a local timeout factor. For instance, because I build GDB with -O0, with all kinds of checks that make it slower (_GLIBCXX_DEBUG, ASan), I also get some random timeouts that are not there when building normally, so I use: echo 'set gdb_test_timeout [expr 5 * $timeout]' >> testsuite/site.exp in my build directory. Simon
Hello Simon, >On 2026-05-05 02:15, Metzger, Markus T wrote: >> Hello Simon, >> >>> On 5/4/26 3:16 AM, Markus Metzger wrote: >>>> Attaching sporadically timed out on my system while reading symbols... >>>> >>>> Reading symbols from .../attach-non-stop... >>>> (gdb) gdb_do_cache: can_spawn_for_attach ( ) >>>> builtin_spawn .../attach-non-stop >>>> attach 729532 >>>> Attaching to program: .../attach-non-stop, process 729532 >>>> [New LWP 729574 (id 2)] >>>> [New LWP 729573 (id 3)] >>>> [New LWP 729572 (id 4)] >>>> [New LWP 729571 (id 5)] >>>> [New LWP 729570 (id 6)] >>>> [New LWP 729569 (id 7)] >>>> [New LWP 729568 (id 8)] >>>> [New LWP 729567 (id 9)] >>>> [New LWP 729566 (id 10)] >>>> [New LWP 729565 (id 11)] >>>> Reading symbols from /lib/x86_64-linux-gnu/libc.so.6... >>>> FAIL: gdb.threads/attach-non-stop.exp: target-non-stop=off: non- >stop=on: >>> cmd=attach: attach (timeout) >>>> >>>> Adjust the timeout to avoid sporadic fails. >>> >>> Not saying it's necessarily a bad idea, but I'd like some more details >>> on what is taking so long. From the above, I understand that GDB is >>> reading debug info for libc, which is not that big in the grand scheme >>> of things... >>> >>> I'd like to know "this step is taking about X seconds", just to make >>> sure we don't paper over an actual problem. >> >> The issue happens sporadically, typically while running the entire test >> suite (I use FORCE_PARALLEL). I tried reproducing it by just running this >> one test but couldn't. >> >> I cannot say what takes so long and how long exactly it takes, but increasing >> the timeout helped the test pass, so it wasn't actually hanging. One sporadic >> fail less. > >If the timeout is mostly related to how you run the testsuite, then I >think it would be more appropriate to set a local timeout factor. For >instance, because I build GDB with -O0, with all kinds of checks that >make it slower (_GLIBCXX_DEBUG, ASan), I also get some random timeouts >that are not there when building normally, so I use: > > echo 'set gdb_test_timeout [expr 5 * $timeout]' >> testsuite/site.exp > >in my build directory. Thanks for the hint. Let me try that instead of this patch. Markus. Intel Deutschland GmbH Registered Address: Dornacher Strasse 1, 85622 Feldkirchen, Germany Tel: +49 89 991 430, www.intel.de Managing Directors: Harry Demas, Jeffrey Schneiderman, Yin Chong Sorrell Chairperson of the Supervisory Board: Nicole Lau Registered Seat: Munich Commercial Register: Amtsgericht Muenchen HRB 186928
diff --git a/gdb/testsuite/gdb.threads/attach-non-stop.exp b/gdb/testsuite/gdb.threads/attach-non-stop.exp index 3f55459e7ed..d9ba38e58bf 100644 --- a/gdb/testsuite/gdb.threads/attach-non-stop.exp +++ b/gdb/testsuite/gdb.threads/attach-non-stop.exp @@ -48,10 +48,12 @@ proc test {target_non_stop non_stop cmd} { set any "\[^\r\n\]*" if {$cmd == "attach"} { - gdb_test_multiple "attach $testpid" $test { - -re "Attaching to program:${any}process $testpid\r\n.*$gdb_prompt " { - pass $test - set attached 1 + with_timeout_factor 10 { + gdb_test_multiple "attach $testpid" $test { + -re "Attaching to program:${any}process $testpid\r\n.*$gdb_prompt " { + pass $test + set attached 1 + } } }