From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B34133851C25; Thu, 19 Nov 2020 23:52:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B34133851C25 From: "palves at redhat dot com" To: gdb-prs@sourceware.org Subject: [Bug gdb/26754] Race condition when resuming threads and one does an exec Date: Thu, 19 Nov 2020 23:52:58 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: palves at redhat dot com 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: 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 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2020 23:52:58 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D26754 --- Comment #8 from Pedro Alves --- >> I would prefer to preserve gdb thread id =3D=3D 1 before / after exec, >> but that's a GDB concern, not a kernel interface concern. > I don't understand what you mean here. If we delete the zombie leader in reaction to PTRACE_EVENT_EXEC_BEGIN, then when we get the PTRACE_EVENT_EXEC, we'll create a new thread for the new leader, and that will end up with a GDB tid !=3D 1. 1.1 main () * 1.2 thread() and after exec we have: * 1.3 main () I'm thinking that it would be better to end up with: * 1.1 main () Similar to how if a non-threaded program execs, the main thread's thread nu= mber doesn't change. --=20 You are receiving this mail because: You are on the CC list for the bug.=