From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 52555 invoked by alias); 23 Aug 2017 13:10:21 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 52522 invoked by uid 89); 23 Aug 2017 13:10:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 23 Aug 2017 13:10:17 +0000 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3ACADC04D2F1; Wed, 23 Aug 2017 13:10:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 3ACADC04D2F1 Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=palves@redhat.com Received: from [127.0.0.1] (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7E31C5C473; Wed, 23 Aug 2017 13:10:14 +0000 (UTC) Subject: Re: Host GDB disconnect while waiting for tracee status change To: Dmitry Antipov , Yao Qi References: <5febbe3e-926f-78bb-db88-901b44e2e258@nvidia.com> <867exusnn8.fsf@gmail.com> <98251d5d-646b-296c-acf6-43ec4accd4e0@nvidia.com> Cc: gdb@sourceware.org, Ryan Bissell , Mikhail Filimonov From: Pedro Alves Message-ID: Date: Wed, 23 Aug 2017 13:10:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <98251d5d-646b-296c-acf6-43ec4accd4e0@nvidia.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2017-08/txt/msg00062.txt.bz2 On 08/23/2017 10:37 AM, Dmitry Antipov wrote: > Immediately after killing gdb, gdbserver reports: > ... > client connection closed > my_waitpid (-1, 0x40000001) > my_waitpid (-1, 0x40000001): status(ffffffff), 0 > LWFE: waitpid(-1, ...) returned 0, ERRNO-OK > leader_pid=21352, leader_lp!=NULL=1, num_lwps=1, zombie=0 > sigsuspend'ing > ... > > Next, a new instance of gdb is unable to reconnect: ... > And it seems that there is no similar issue in a non-stop mode. For > example: ... > This way, a new instance of gdb can reconnect: Right, because in non-stop mode, linux-low.c doesn't usually block inside mywait....sigsuspend. See server.c:resume. In non-stop mode, gdbserver waits for both socket events and target events at the same time in the event loop. The non-stop variant of the RSP is asynchronous. Thanks, Pedro Alves