From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20187 invoked by alias); 7 Mar 2012 20:08:50 -0000 Received: (qmail 20171 invoked by uid 22791); 7 Mar 2012 20:08:47 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,TW_GJ X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 07 Mar 2012 20:08:32 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1S5N9z-0006Ob-74 from Maciej_Rozycki@mentor.com ; Wed, 07 Mar 2012 12:08:31 -0800 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Wed, 7 Mar 2012 12:08:23 -0800 Received: from [172.30.11.135] (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.1.289.1; Wed, 7 Mar 2012 20:08:29 +0000 Date: Wed, 07 Mar 2012 20:08:00 -0000 From: "Maciej W. Rozycki" To: Tom Tromey , Pedro Alves CC: , Keith Seitz Subject: Re: [PATCH] remote: Fix a crash on longjmp breakpoint removal In-Reply-To: Message-ID: References: User-Agent: Alpine 1.10 (DEB 962 2008-03-14) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" 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: 2012-03/txt/msg00244.txt.bz2 On Tue, 20 Dec 2011, Tom Tromey wrote: > 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. So I have finally got back to it and noticed that this: http://sourceware.org/ml/gdb-patches/2012-01/msg00701.html has already fixed the problem -- shall we close gdb/13333 then? I think we should still add Keith's test case to cover any possible future breakage in this area -- the fix didn't include any. I suggest that we retrofit the ChangeLog entry with a reference too. Maciej