From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by sourceware.org (Postfix) with ESMTP id 1BB5C3851C19 for ; Wed, 13 May 2020 14:20:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 1BB5C3851C19 Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-365-whefVLqKOvOr5ZK_MjahsA-1; Wed, 13 May 2020 10:20:33 -0400 X-MC-Unique: whefVLqKOvOr5ZK_MjahsA-1 Received: by mail-wr1-f71.google.com with SMTP id 37so5512809wrc.4 for ; Wed, 13 May 2020 07:20:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=dDU4n+nvlA9H/jrbtCdSp4/M/PoFsUBd8NZw0/uftOE=; b=M5N6TiBdB93Gt/BGM6g0RGSkElJWxzuLEhNTPrkAtRKoRXOdcAljN0NoGlzSi8TGXY 0zYxzGWKFwZVDvAUmrBvGqu6e762nZyh2wG/jmA4OVYP9yLsXi21R2KMuyVRQeKEKQfV OsNtnk4b3ULPgWglejDqoAvi8SxcTm2coycbvcVIy2S61Rm9tLX4OAajCU7A2R2pgG8b netXPxafkcOgGMw9/d6wI76CZmkZbzi4+zLmX8qj2mt3fuMiscg0KQ4sPq4Dt3guQt33 E4/xPUeXsJdN+e+On2fGxiD2ZH2OieqWOcR6UhE5MUdBltGnGO2Yk4B39QgIhQpo0ckC A7aA== X-Gm-Message-State: AGi0PuYiMUjoM2jVkC5gobhxFO2lyzaJIjNUmCIa0McqP3pGsdFLHZkk x1up/QhiI3MiU/Vb8jntBqb/UoNSNg/+qBcT/tpQfk/ahiibpQR7v9R9/ehwic9pT6t4HPKWYm0 2KYkBLaFa+j1/EYN6usiYGQ== X-Received: by 2002:a5d:52c6:: with SMTP id r6mr25984435wrv.269.1589379631737; Wed, 13 May 2020 07:20:31 -0700 (PDT) X-Google-Smtp-Source: APiQypLuSXeiX0t3H3FaqZQ8qoZY7tsZFDD2RfUGjjHS5ljj3zHu+1QB+ZX5Xspf3R1AL1N05vqAhQ== X-Received: by 2002:a5d:52c6:: with SMTP id r6mr25984407wrv.269.1589379631475; Wed, 13 May 2020 07:20:31 -0700 (PDT) Received: from ?IPv6:2001:8a0:f909:7b00:56ee:75ff:fe8d:232b? ([2001:8a0:f909:7b00:56ee:75ff:fe8d:232b]) by smtp.gmail.com with ESMTPSA id 128sm30723608wme.39.2020.05.13.07.20.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 13 May 2020 07:20:30 -0700 (PDT) Subject: Re: [PATCH v7 3/5] gdb/remote: do not delete a thread if it has a pending exit event To: "Aktemur, Tankut Baris" , "gdb-patches@sourceware.org" References: From: Pedro Alves Message-ID: <25a07937-5488-97e3-b194-4030e585a806@redhat.com> Date: Wed, 13 May 2020 15:20:29 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-9.3 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 May 2020 14:20:38 -0000 On 5/4/20 4:33 PM, Aktemur, Tankut Baris via Gdb-patches wrote: > On Monday, May 4, 2020 4:43 PM, Pedro Alves wrote: >> Tankut, >> >> I'm trying to get back to this, and I would like to apply the whole >> series locally, but I'm afraid that I'm having trouble piecing the >> series together. >> Do you have a public branch where you have all the patches in the series >> applied? You could push it under users/ on sourceware.org for example. >> >> Thanks, >> Pedro Alves > > Hi Pedro, > > It's available at > https://github.com/barisaktemur/gdb/commits/thread-exit-in-stop-all-threads-v8 Thanks Tankut. I've been playing with this. I'm now convinced that the approach to make sure that we don't delete the last thread is the best one. I've been experimenting with it, and I think we're OK wrt the TARGET_WAITKIND_NO_RESUMED code in infrun.c. I pointed at before. I've poked at the multi-exit.exp testcase to make it spawn more than two inferiors, to make sure we always hit the race window, even on slower systems. I'm now looking at multi-kill.exp. I'll have something to show soon. Thanks, Pedro Alves