From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12939 invoked by alias); 16 Feb 2014 20:45:23 -0000 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 Received: (qmail 12925 invoked by uid 89); 16 Feb 2014 20:45:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.0 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 16 Feb 2014 20:45:21 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1WF8aT-0004wk-EV from Maciej_Rozycki@mentor.com ; Sun, 16 Feb 2014 12:45:17 -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); Sun, 16 Feb 2014 12:45:17 -0800 Received: from [172.30.64.222] (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.2.247.3; Sun, 16 Feb 2014 20:45:15 +0000 Date: Sun, 16 Feb 2014 20:45:00 -0000 From: "Maciej W. Rozycki" To: Jan Kratochvil CC: Subject: Re: [patch] testsuite: Fix "ERROR: no fileid for" In-Reply-To: <20140216181018.GA20118@host2.jankratochvil.net> Message-ID: References: <20140206205814.GA18495@host2.jankratochvil.net> <20140207151018.GA20010@host2.jankratochvil.net> <20140216181018.GA20118@host2.jankratochvil.net> User-Agent: Alpine 1.10 (DEB 962 2008-03-14) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-SW-Source: 2014-02/txt/msg00516.txt.bz2 Hi Jan, > ping: I expect you are fine with this "incomplete" fix so I will check it in. Yes, I am. > > > Can you provide a more elaborate log of your test session? > > > > $ echo 'set gdbserver_reconnect_p 1' >test.exp;runtest test.exp > > > > > What are the exact conditions for this problem to trigger? > > > > If GDB does not run and the testsuite tries to close down it errors. > > > > > > > I'm asking because I fear your change could defeat the purpose of the > > > commit you referred to if there's a catastrophic failure causing GDB to > > > crash while running gdb.base/solib-disc.exp -- in such a case an instance > > > of gdbserver would stay behind running, ruining the remaining part of the > > > test suite in environments where only a single TCP port is available for > > > the RSP connection. > > > > If GDB has crashed then gdb_spawn_id still exists (although it does not work). > > So my patch does not change anything. And also currently it will leave the > > stale gdbserver running anyway. Correct. I wasn't sure of the spawn ID situation, thanks for the clarification. > > In general if gdb_spawn_id does not exist then send_gdb + gdb_expect just do > > not make sense anyway. So this patch just prevents the error in such case. I'm still curious as to the actual use for such a scenario, but from the corectness POV your fix is valid indeed. > > The killing of stale gdbserver could be improved multiple ways (also as > > suggested by Pedro in the original thread) but that is IMO outside of the > > scope of this patch. Apparently if there is no good response from GDB then > > gdb_finish() should try to call gdb_start just to kill that gdbserver, IIUC. So do I. Thanks for your fix and apologies for the delay. Maciej