From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1524 invoked by alias); 20 Dec 2011 15:51:33 -0000 Received: (qmail 1510 invoked by uid 22791); 20 Dec 2011 15:51:31 -0000 X-SWARE-Spam-Status: No, hits=-5.7 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,TW_GJ X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 20 Dec 2011 15:51:11 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id pBKFp9fl012901 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 20 Dec 2011 10:51:09 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id pBKFp8oU005282; Tue, 20 Dec 2011 10:51:08 -0500 Received: from barimba (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id pBKFp6s5006942; Tue, 20 Dec 2011 10:51:07 -0500 From: Tom Tromey To: "Maciej W. Rozycki" Cc: , Keith Seitz Subject: Re: [PATCH] remote: Fix a crash on longjmp breakpoint removal References: Date: Tue, 20 Dec 2011 16:00:00 -0000 In-Reply-To: (Maciej W. Rozycki's message of "Tue, 13 Dec 2011 21:09:28 +0000") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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 X-SW-Source: 2011-12/txt/msg00677.txt.bz2 >>>>> "Maciej" == Maciej W Rozycki writes: Maciej> I have observed a crash, where GDB attempts to send a packet to Maciej> gdbserver after the remote target has already exited (and the Maciej> gdbserver process terminated) -- here's the tail of an example Maciej> remote session transcript: Maciej> I have tracked it down to remote_close calling Maciej> discard_all_inferiors, which in turn eventually calls Maciej> delete_thread_of_inferior, which calls Maciej> clear_thread_inferior_resources, which calls Maciej> delete_longjmp_breakpoint, which calls remote_remove_breakpoint, Maciej> which needs to send some packets to the remote target to get the Maciej> breakpoint removed. But at this point the remote file Maciej> descriptor has already been closed; after a W00 stop reply Maciej> gdbserver does not expect any further input anyway. You and Keith both came to the same diagnosis, but you have different patches: http://sourceware.org/ml/gdb-patches/2011-11/msg00212.html ... our patch review delays seem to have bitten us this time. Or anyway bitten the two of you, sorry about that. I am not sure which approach is better. I don't think I know enough about remote.c to say. Tom