From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24751 invoked by alias); 20 Nov 2014 09:55:49 -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 24739 invoked by uid 89); 20 Nov 2014 09:55:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham 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; Thu, 20 Nov 2014 09:55:47 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sAK9tjtk006571 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 20 Nov 2014 04:55:45 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id sAK9thHC024751; Thu, 20 Nov 2014 04:55:44 -0500 Message-ID: <546DBA9F.9060600@redhat.com> Date: Thu, 20 Nov 2014 09:55:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.1 MIME-Version: 1.0 To: Joel Brobecker , gdb-patches@sourceware.org Subject: Re: RFC: skip_inline_frames failed assertion resuming from breakpoint on LynxOS References: <20141120051109.GR5774@adacore.com> <20141120051223.GA23720@adacore.com> In-Reply-To: <20141120051223.GA23720@adacore.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2014-11/txt/msg00456.txt.bz2 On 11/20/2014 05:12 AM, Joel Brobecker wrote: >> > I am still trying to reproduce the problem locally in order to >> > find out more, but I couldn't understand why, in principle, >> > one thread couldn't receive multiple notifications during >> > the same single-step if the system decides to queue up signals? >> > If that were the case, wouldn't the attached patch make sense? >> > (currently untested against the program that triggered the issue, >> > as I think I understand how inline-frame works, and what it does, >> > but I am not sure I get it all). > Thanks again! > -- Joel > > > 0001-skip_inline_frames-failed-assertion-resuming-from-br.patch > > > From f7ad35aa92a7007194582b1e23a110fc06b50cd1 Mon Sep 17 00:00:00 2001 > From: Joel Brobecker > Date: Thu, 20 Nov 2014 08:38:08 +0400 > Subject: [PATCH] skip_inline_frames failed assertion resuming from breakpoint > on LynxOS > > A user reported a failed assertion while debugging their program > on a LynxOS system (thus via GDBserver), when trying to resume > the program's execution after having reached a breakpoint: > > (gdb) continue > [...] > ../../src/gdb/inline-frame.c:339: internal-error: skip_inline_frames: Assertion `find_inline_frame_state (ptid) == NULL' failed. > > Turning infrun debug traces helps understand a little better what > happens: > > (gdb) continue > Continuing. > infrun: clear_proceed_status_thread (Thread 126) > [...] > infrun: clear_proceed_status_thread (Thread 142) > [...] > infrun: clear_proceed_status_thread (Thread 146) > infrun: clear_proceed_status_thread (Thread 125) > infrun: proceed (addr=0xffffffff, signal=GDB_SIGNAL_DEFAULT, step=0) > infrun: resume (step=1, signal=GDB_SIGNAL_0), trap_expected=1, current thread [Thread 142] at 0x10684838 trap_expected=1 indicates that GDB is about to step thread 142 _only_, leaving everything else stopped. Can you enable "set debug remote 1" as well? > infrun: wait_for_inferior () > infrun: target_wait (-1, status) = > infrun: 42000 [Thread 146], > infrun: status->kind = stopped, signal = GDB_SIGNAL_REALTIME_34 So how come we see an event for thread 146? That thread shouldn't have been resumed, so GDB shouldn't be getting an event for it. This is sounding like a bug in the target. > infrun: infwait_normal_state > infrun: TARGET_WAITKIND_STOPPED > infrun: stop_pc = 0x10a187f4 > infrun: context switch > infrun: Switching context from Thread 142 to Thread 146 > infrun: random signal (GDB_SIGNAL_REALTIME_34) > infrun: switching back to stepped thread > infrun: Switching context from Thread 146 to Thread 142 > infrun: resume (step=1, signal=GDB_SIGNAL_0), trap_expected=1, current thread [Thread 142] at 0x10684838 > infrun: prepare_to_wait > [...handling of similar events for threads 145, 144 and 143 snipped...] > infrun: prepare_to_wait > infrun: target_wait (-1, status) = > infrun: 42000 [Thread 146], > infrun: status->kind = stopped, signal = GDB_SIGNAL_REALTIME_34 > infrun: infwait_normal_state > infrun: TARGET_WAITKIND_STOPPED > infrun: stop_pc = 0x10a187f4 > infrun: context switch > infrun: Switching context from Thread 142 to Thread 146 > ../../src/gdb/inline-frame.c:339: internal-error: skip_inline_frames: Assertion `find_inline_frame_state (ptid) == NULL' failed. Thanks, Pedro Alves