From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 57820 invoked by alias); 3 Aug 2015 16:20:16 -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 57809 invoked by uid 89); 3 Aug 2015 16:20:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 03 Aug 2015 16:20:15 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 31735ABD; Mon, 3 Aug 2015 16:20:14 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t73GKCsa002692; Mon, 3 Aug 2015 12:20:13 -0400 Message-ID: <55BF94BC.6090904@redhat.com> Date: Mon, 03 Aug 2015 16:20:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Yao Qi CC: gdb-patches@sourceware.org Subject: Re: [PATCH/7.10 2/2] gdbserver: Fix non-stop / fork / step-over issues References: <1438362229-27653-1-git-send-email-palves@redhat.com> <1438362229-27653-3-git-send-email-palves@redhat.com> <86a8u8e754.fsf@gmail.com> In-Reply-To: <86a8u8e754.fsf@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2015-08/txt/msg00028.txt.bz2 On 08/03/2015 04:14 PM, Yao Qi wrote: > Pedro Alves writes: > >> I fixed some of these issues recently, but there's a lot more to >> do. Fixing that one just exposes other similar problems elsewhere. >> Meanwhile, I've filed PR18749 and kfailed the test for native. > > This test case also exposes the issue on arm-linux with gdbserver, > > (gdb) PASS: gdb.threads/fork-plus-threads-2.exp: detach-on-fork=on: continue & > [New Thread 29905]^M > [New Thread 29900]^M > [New Thread 29895]^M > [New Thread 29898]^M > [New Thread 29902]^M > [New Thread 29896]^M > [New Thread 29903]^M > [New Thread 29901]^M > [New Thread 29899]^M > [New Thread 29904]^M > [New Thread 29897]^M > Error in testing breakpoint condition:^M > Cannot access memory at address 0x11094^M > FAIL: gdb.threads/fork-plus-threads-2.exp: detach-on-fork=on: inferior 1 exited Ah, OK, so I guess it'll fail on all targets where gdbserver does not handle the breakpoint condition server-side. > Remote debugging from host 127.0.0.1^M > ^M > Child exited with status 0^M > GDBserver exiting^M > ../../binutils-gdb/gdb/thread.c:936: internal-error: finish_thread_state: Assertion `tp' failed.^M > A problem internal to GDB has been detected,^M > further debugging may prove unreliable.^M > Quit this debugging session? (y or n) monitor exit^M > Please answer y or n.^M > ../../binutils-gdb/gdb/thread.c:936: internal-error: finish_thread_state: Assertion `tp' failed.^ I've seem this too while developing the patch. I saw it happen when the connection is abruptly closed while there's a finish_thread_state cleanup installed (while gdb is handling an event, within fetch_inferior_event). The connection-close deletes all threads, and the cleanup wants to finish the state of a now-nonexisting thread. See [palves/fork_stale_running] on my github. Thanks, Pedro Alves