From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 13C7E3858D28; Mon, 4 Mar 2024 10:54:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 13C7E3858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1709549692; bh=znH/z+YoDjY3enop+wSjYphzPyIMl5fuYUhkVa/pWKA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=CwTFglKFXuswnKA2ElRtjqmYWqScQMlceTLy+RFa+biYYXJsnTyyTKfifdxEApsM4 VmPCBNIWlbaq1qqkQQ4Cru8Sb5NVWLtoPD+lEJpHaw/6sVWsskj1mJyJmPVKY2SXsR D3RZ2yv/WPdr7/tLRXzfI5+vIgUgicKpkUW8ZdUg= From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug gdb/31440] [gdb] FAIL: gdb.python/py-progspace-events.exp: inferior 1 (timeout) Date: Mon, 04 Mar 2024 10:54:51 +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: vries at gcc dot gnu.org 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 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31440 --- Comment #5 from Tom de Vries --- I added some debug printfs, and got the following output. Passing case: ... (gdb) PASS: gdb.python/py-progspace-events.exp: continue to breakpoint: run= to breakpt in inferior 2 continue^M Continuing.^M not removable: inf 1^M not deletable: inf 2^M [Inferior 2 (process 4549) exited normally]^M not removable: inf 1^M not deletable: inf 2^M (gdb) not removable: inf 1^M not deletable: inf 2^M PASS: gdb.python/py-progspace-events.exp: continue until inferior 2 exits inferior 1^M [Switching to inferior 1 [process 4546] (py-progspace-events)]^M [Switching to thread 1.1 (process 4546)]^M #0 breakpt () at py-progspace-events.c:28^M 28 { /* Nothing. */ }^M (gdb) PASS: gdb.python/py-progspace-events.exp: inferior 1 step^M not deletable: inf 1^M delete_inferior: inf 2^M FreeProgspaceEvent: ^M ... Failing case: ... (gdb) PASS: gdb.python/py-progspace-events.exp: continue to breakpoint: run= to breakpt in inferior 2 continue^M Continuing.^M not removable: inf 1^M not deletable: inf 2^M [Inferior 2 (process 4752) exited normally]^M not removable: inf 1^M not deletable: inf 2^M (gdb) PASS: gdb.python/py-progspace-events.exp: continue until inferior 2 e= xits inferior 1^M [Switching to inferior 1 [process 4742] (py-progspace-events)]^M [Switching to thread 1.1 (process 4742)]^M #0 breakpt () at py-progspace-events.c:28^M 28 { /* Nothing. */ }^M (gdb) not deletable: inf 1^M delete_inferior: inf 2^M FreeProgspaceEvent: ^M FAIL: gdb.python/py-progspace-events.exp: inferior 1 (timeout) step^M ... So, it seems there's a race between some event and the "inferior 1" command. In the passing case, the event is handled first. During handling, prune_inferiors is called, but it can't remove inferior 1, because it's sti= ll the current one. In the failing case, the "inferior 1" is handled first. Then during handlin= g of the event, prune_inferiors is called, and it can remove inferior 1 because = it's no longer the current one. --=20 You are receiving this mail because: You are on the CC list for the bug.=