From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26047 invoked by alias); 3 Feb 2020 15:13:09 -0000 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 Received: (qmail 26038 invoked by uid 89); 3 Feb 2020 15:13:09 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-9.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.1 spammy=luis X-HELO: mx1.osci.io Received: from polly.osci.io (HELO mx1.osci.io) (8.43.85.229) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 03 Feb 2020 15:13:08 +0000 Received: by mx1.osci.io (Postfix, from userid 994) id 48D472058E; Mon, 3 Feb 2020 10:13:06 -0500 (EST) Received: from gnutoolchain-gerrit.osci.io (gnutoolchain-gerrit.osci.io [8.43.85.239]) by mx1.osci.io (Postfix) with ESMTP id 299E8201F1; Mon, 3 Feb 2020 10:13:03 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by gnutoolchain-gerrit.osci.io (Postfix) with ESMTP id 02B692816C; Mon, 3 Feb 2020 10:13:03 -0500 (EST) X-Gerrit-PatchSet: 2 Date: Mon, 03 Feb 2020 15:13:00 -0000 From: "Tom de Vries (Code Review)" To: Tankut Baris Aktemur , gdb-patches@sourceware.org Cc: Pedro Alves , Luis Machado Auto-Submitted: auto-generated X-Gerrit-MessageType: comment Subject: [review v2] infrun: handle already-exited threads when attempting to stop X-Gerrit-Change-Id: I7cec98f40283773b79255d998511da434e9cd408 X-Gerrit-Change-Number: 133 X-Gerrit-ChangeURL: X-Gerrit-Commit: a32b3dcee11cd3a9f40c5f07757a514074b9051f In-Reply-To: References: X-Gerrit-Comment-Date: Mon, 3 Feb 2020 10:13:02 -0500 Reply-To: gnutoolchain-gerrit@osci.io MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline User-Agent: Gerrit/3.0.3-79-g83ff7f88f1 Content-Type: text/plain; charset=UTF-8 Message-Id: <20200203151303.02B692816C@gnutoolchain-gerrit.osci.io> X-SW-Source: 2020-02/txt/msg00043.txt.bz2 Tom de Vries has posted comments on this change. Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/133 ...................................................................... Patch Set 2: > Patch Set 2: > > FTR, I build patchset 2 and tested the example from PR25478, and hit an assert: > ... > Thread 1 "gdb" hit Breakpoint 1, stop_all_threads () at /data/gdb_versions/devel/src/gdb/infrun.c:4395 > 4395 int iterations = 0; > (master-gdb) c > Continuing. > infrun: stop_all_threads > infrun: stop_all_threads, pass=0, iterations=0 > infrun: Thread 0x7ffff7fa6740 (LWP 32692) not executing > infrun: Thread 0x7ffff77fe700 (LWP 32696) executing, need stop > infrun: target_wait (-1.0.0, status) = > infrun: 32692.32696.0 [Thread 0x7ffff77fe700 (LWP 32696)], > infrun: status->kind = signalled, signal = GDB_SIGNAL_KILL > infrun: stop_all_threads status->kind = signalled, signal = GDB_SIGNAL_KILL Thread 0x7ffff77fe700 (LWP 32696) > > Program terminated with signal SIGKILL, Killed. > The program no longer exists. > infrun: stop_all_threads, pass=1, iterations=1 > infrun: stop_all_threads done > thread.c:95: internal-error: thread_info* inferior_thread(): Assertion `tp' failed. > ... I've: - ported patch set 2 to master - integrated the fix in patch set 3 of https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/759 such that the assert above is fixed. - build and reg-tested on x86_64-linux Available at https://github.com/vries/gdb/tree/handle-already-exited-threads-when-attempting-to-stop-try-master-2 . Note: this does not address all the comments on patch set 2. -- Gerrit-Project: binutils-gdb Gerrit-Branch: master Gerrit-Change-Id: I7cec98f40283773b79255d998511da434e9cd408 Gerrit-Change-Number: 133 Gerrit-PatchSet: 2 Gerrit-Owner: Tankut Baris Aktemur Gerrit-Reviewer: Luis Machado Gerrit-Reviewer: Pedro Alves Gerrit-Reviewer: Tankut Baris Aktemur Gerrit-CC: Tom de Vries Gerrit-Comment-Date: Mon, 03 Feb 2020 15:13:02 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment