From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17726 invoked by alias); 6 Mar 2013 18:08:24 -0000 Received: (qmail 17707 invoked by uid 22791); 6 Mar 2013 18:08:23 -0000 X-SWARE-Spam-Status: No, hits=-8.1 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_SPAMHAUS_DROP,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mga11.intel.com (HELO mga11.intel.com) (192.55.52.93) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 06 Mar 2013 18:07:52 +0000 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 06 Mar 2013 10:07:45 -0800 X-ExtLoop1: 1 Received: from irsmsx104.ger.corp.intel.com ([163.33.3.159]) by fmsmga002.fm.intel.com with ESMTP; 06 Mar 2013 10:07:44 -0800 Received: from irsmsx151.ger.corp.intel.com (163.33.192.59) by IRSMSX104.ger.corp.intel.com (163.33.3.159) with Microsoft SMTP Server (TLS) id 14.1.355.2; Wed, 6 Mar 2013 18:07:43 +0000 Received: from irsmsx102.ger.corp.intel.com ([169.254.2.244]) by IRSMSX151.ger.corp.intel.com ([169.254.4.245]) with mapi id 14.01.0355.002; Wed, 6 Mar 2013 18:07:43 +0000 From: "Metzger, Markus T" To: Jan Kratochvil CC: "gdb-patches@sourceware.org" , "markus.t.metzger@gmail.com" , "Himpel, Christian" Subject: RE: Crash of GDB with gdbserver btrace enabled [Re: [patch v9 00/23] branch tracing support for Atom] Date: Wed, 06 Mar 2013 18:08:00 -0000 Message-ID: References: <1362416770-19750-1-git-send-email-markus.t.metzger@intel.com> <20130306124334.GA29994@host2.jankratochvil.net> <20130306170622.GA25771@host2.jankratochvil.net> In-Reply-To: <20130306170622.GA25771@host2.jankratochvil.net> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes 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: 2013-03/txt/msg00224.txt.bz2 > -----Original Message----- > From: Jan Kratochvil [mailto:jan.kratochvil@redhat.com] > Sent: Wednesday, March 06, 2013 6:06 PM > To: Metzger, Markus T > Cc: gdb-patches@sourceware.org; markus.t.metzger@gmail.com; Himpel, Chris= tian > Subject: Re: Crash of GDB with gdbserver btrace enabled [Re: [patch v9 00= /23] branch tracing support for Atom] >=20 > Hi Markus, >=20 > On Wed, 06 Mar 2013 16:30:13 +0100, Metzger, Markus T wrote: > > I still disable threads in to_close which tries to talk to the target. >=20 > When one follows the Pedro's way which I forwarded to you in to_close one > should only clear resources, without doing any actions involving the rest= of > GDB infrastructure. >=20 > Do you think the attached patch still has some leaks or other issues? I'm not quite sure what the OS will do if tracing is requested twice for th= e same thread, i.e. repeated "record stop" followed by "record btrace" . We may g= et an error or we may get a second buffer, thus leaking resources (i.e. the mm= apped trace buffer). We will need another target method to disable branch tracing that is called by the "record stop" command. In a gdbserver --multi session, I would expect that we're leaking the mmapp= ed trace buffer also on re-run. I think this can be handled with an appropriate to_create_inferior method. Thanks a lot. I'll incorporate it and send an update of the patch series to= morrow. > An unrelated small cleanup is that btrace_disconnect should be IMO called= from > to_detach and not from detach_command. Thanks. I already fixed that then when I investigated the issue. Regards, Markus. Intel GmbH Dornacher Strasse 1 85622 Feldkirchen/Muenchen, Deutschland Sitz der Gesellschaft: Feldkirchen bei Muenchen Geschaeftsfuehrer: Christian Lamprechter, Hannes Schwaderer, Douglas Lusk Registergericht: Muenchen HRB 47456 Ust.-IdNr./VAT Registration No.: DE129385895 Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052