From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 8658F3870899 for ; Wed, 12 Jun 2024 19:29:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8658F3870899 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8658F3870899 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718220561; cv=none; b=GwvtFPs5k2xuxbejXKQeFecxFQ+oZM34+A+XzJ169Vd9skcdxkqUPKKMl13o6X9v059yh5irLEOpdohrOpJsO94nQQzloPBwJim4xkGog03FVgMrV8SyJaYGlQoON6AwMUYpsdh5v+cUZhHPmvKO1l9TqEOjxlrrdedBI59cdfs= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718220561; c=relaxed/simple; bh=ea6rhbAD2L+qYpap8Hu5Lr7A2xsiBndCs8wdoarPR5g=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=wR4z0+DBCgfDaZi8pXpbuCmM0RIXiB1vE6SD/zfEJzSjbLY9IcggdcwlL94S8dDxyyPErvvajcw4x9ZZNwLUsM4B5VFi87WGmj4IAj3pNUnmttLAfy3AWa+Y6Bvbt5M3PCzaBX9ivnZSkLtR39Y55KAgf7CaQeVhVaUDOp3OViA= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1718220559; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Qwd7UBvrwNMSC2elGykFC/xKgsDyDN5zBwD5NOMsumA=; b=ScCVSVHjefFalUpDbSHNCmVYlTZdIAyFP8Qm9cIjgdWrhMe7TQMc2lz0VK9P4kewE1/U0f YQ7cAoemdRhgxbIKQUNc9btMpRd0bjWJCXa7kLDxyvlS3A7tuja0maWR5kW9XfJZ0V4/LH X4MGkxKcs5Z3PLXwNbjPnu/9kza4sJY= Received: from mail-pg1-f198.google.com (mail-pg1-f198.google.com [209.85.215.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-622-AIROJk-qPhSgRHx-NB8o9A-1; Wed, 12 Jun 2024 15:29:17 -0400 X-MC-Unique: AIROJk-qPhSgRHx-NB8o9A-1 Received: by mail-pg1-f198.google.com with SMTP id 41be03b00d2f7-6658175f9d4so154018a12.0 for ; Wed, 12 Jun 2024 12:29:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718220557; x=1718825357; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Qwd7UBvrwNMSC2elGykFC/xKgsDyDN5zBwD5NOMsumA=; b=UVdSYpFmZO88Nu6c3xEcKk6++jxY/aBpdFf6cmVD2Wy3lCBSKjw0OGwkS+fON66+3f eeVgnu2jJRiHeJ6xRFX51NFAnkDeESndEukjQQRWeZ4x12890Mgp5xNbyzTaY4HepG7J lopAOsNplh5/CUYHNNO1Ns+Jp5ZpzQBcB+bO0UQ1PwdZplR9fcRCQ9WRYDqOEgN9dQJu LbgJNKE/oV5MD5xqxvmz8mLPV7D1naxMmTWLrkbsj54GF7Y2avQ1aVBgDlRSWhptc9an 86rFyI3goelpStGny89xaEHRwQl+js52fQ8svTK1VmE72By4HpSLpCydjsTprOSzmTSF 8cew== X-Gm-Message-State: AOJu0YwwT0qEg8BGqRXoKqBs2aeJrakhBiQzN0/XwuUnternCB0KslMD 1zbo4p66a9DDcQcle22t34JNXvt1g4sC5YKbfATbb0f4zq2PxkpeR6kf+ZgcxW3twXifAaiuYja AliGiun+9xvDSJT1MkaOKfHRtWX2OJ/x+StXorNOUoU1H5tSAaqc52lTlWJE= X-Received: by 2002:a17:903:24f:b0:1f7:13b1:7530 with SMTP id d9443c01a7336-1f83b23db9cmr36427585ad.0.1718220556635; Wed, 12 Jun 2024 12:29:16 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFNaCba/kJoscTmaZVi/6XqrkyIlT4PsDPNqyLpnKLQU9XAF9cD64i31lUnyQX1OYp2kQrG6w== X-Received: by 2002:a17:903:24f:b0:1f7:13b1:7530 with SMTP id d9443c01a7336-1f83b23db9cmr36427365ad.0.1718220556262; Wed, 12 Jun 2024 12:29:16 -0700 (PDT) Received: from ?IPV6:2804:14d:8084:92c5::1001? ([2804:14d:8084:92c5::1001]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f6f298102bsm88338255ad.73.2024.06.12.12.29.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 12 Jun 2024 12:29:15 -0700 (PDT) Message-ID: <0839d3f5-4eb8-4c66-852f-a82e341ac577@redhat.com> Date: Wed, 12 Jun 2024 16:29:12 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] gdbserver: Don't try to reopen stdio just quit To: Mark Wielaard , Tom Tromey Cc: gdb-patches@sourceware.org, William Ferreira References: <20240611221916.3146658-1-mark@klomp.org> <87h6dyfeoo.fsf@tromey.com> <20240612143724.GG21923@gnu.wildebeest.org> <874j9yf1bs.fsf@tromey.com> <20240612192243.GI21923@gnu.wildebeest.org> From: Guinevere Larsen In-Reply-To: <20240612192243.GI21923@gnu.wildebeest.org> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.4 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_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 6/12/24 4:22 PM, Mark Wielaard wrote: > Hi Tom, > > On Wed, Jun 12, 2024 at 12:44:23PM -0600, Tom Tromey wrote: >>>>>>> "Mark" == Mark Wielaard writes: >>>> https://sourceware.org/pipermail/gdb-patches/2024-May/209398.html >> Mark> Yes, that is conceptually the same fix. I actually like it better. So >> Mark> I withdraw mine. Please approve and apply that one. >> >> I believe Andrew requested a test case. > That sounds tricky since it isn't directly observable from gdb itself > since it happens when gdb quits or closes the write side of gdbserver > stdio connection without killing gdbserver itself. So a testcase would > need to detect the gdbserver that gdb started is still running after > gdb itself is already gone. I don't know how to do that. > > Maybe you could try running: > > echo | gdbserver - /bin/true > > and see whether it terminates with a timeout? In theory, you could keep gdb running and just run a disconnect. I see the same 5s delay with gdbserver not closing the connection when running that. The problem is that when I suggested this to vvilliam, the problem didn't reproduce on TCL (and there were some other problems with his setup that delayed things more)... -- Cheers, Guinevere Larsen She/Her/Hers > > It will stop gdbserver and /bin/true with the patch, but go into an > infinite loop without. > > Cheers, > > Mark >