From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 605353858D20; Fri, 17 May 2024 18:08:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 605353858D20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1715969315; bh=dV9zvlaUpVPJwiAfrky5HsHl5m2zzShialf4McjoPgw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=WTuEjK+DZhYWni10cDtzVtcpIKPRMNeLGBSgdpmCI+V7WfgOjRuNBOfTEdj1KGQWT FdqsNV8bkj75Zc7fncZcbWVEUN96QoA1HwQFYv4qKYnmjXYEMHwZz47ep5RDY2W9wD vrqtYRkQeq0CmRqEOCsDgXjsFP8CDYneeCaRIRKk= From: "pedro at palves dot net" To: gdb-prs@sourceware.org Subject: [Bug threads/26286] FAIL: gdb.threads/attach-many-short-lived-threads.exp: iter 1: break at break_fn: 1 (SIGTRAP) Date: Fri, 17 May 2024 18:08:34 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: threads X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pedro at palves dot net X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D26286 Pedro Alves changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pedro at palves dot net --- Comment #6 from Pedro Alves --- The theory was that if we attached to a parent thread just after it forked/cloned a child, then we may have not seen the new child in the curre= nt iteration, but should see it in the next.=20=20 I had assumed that when clone syscall returns in the parent, the child proc= ess is already created and listed. Thus by the time we attach to the parent, t= he child will be garanteed to show in the next /proc directory listing. But I suppose it may happen that the kernel takes a bit to actually create = the child, and thus gdb could iterate over the list twice _before_ the child is created? If so, maybe we can call that a kernel bug? What other scenarios / races could break the "iterate twice" logic? --=20 You are receiving this mail because: You are on the CC list for the bug.=