From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16493 invoked by alias); 21 Nov 2012 19:19:01 -0000 Received: (qmail 16484 invoked by uid 22791); 21 Nov 2012 19:18:58 -0000 X-SWARE-Spam-Status: No, hits=-7.8 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 21 Nov 2012 19:18:49 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qALJIjhc013000 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 21 Nov 2012 14:18:45 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id qALJIhaI029712; Wed, 21 Nov 2012 14:18:44 -0500 Message-ID: <50AD2913.1090603@redhat.com> Date: Wed, 21 Nov 2012 19:19:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121029 Thunderbird/16.0.2 MIME-Version: 1.0 To: Andreas Arnez CC: jan.kratochvil@redhat.com, gdb@sourceware.org Subject: Re: Strange behavior of sigstep-threads.exp? References: <878vacnlem.fsf@linux.vnet.ibm.com> <50A125FD.8090504@redhat.com> <87vcd9le9r.fsf@linux.vnet.ibm.com> <50A3C376.9080602@redhat.com> <874nki6bfq.fsf@linux.vnet.ibm.com> In-Reply-To: <874nki6bfq.fsf@linux.vnet.ibm.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2012-11/txt/msg00060.txt.bz2 On 11/21/2012 06:46 PM, Andreas Arnez wrote: > Pedro Alves writes: > >> linux-nat.c always gives preference to a SIGTRAP over other signals, >> so it's unexpected that a trap could be lost. Maybe while GDB goes >> about stopping all threads with SIGSTOP (in effect, only the >> single-stepped thread), the single step has actually completed, but >> the kernel manages to report the SIGSTOP first, for some bizarre >> reason? IOW, the kernel loses the trap. > > Right, the kernel loses the trap. Great (that GDB isn't at fault). :-) > While processing the SIGUSR1 from thread #2, GDB stops all other threads > with SIGSTOP -- in this case the single-stepped thread #1. Now if the > SIGSTOP is sent after thread #1 has received the single-step exception, > but before the kernel has decided what signals to present, the kernel > suppresses the SIGTRAP and just delivers the SIGSTOP instead. > > Discussed this with the s390 kernel maintainer. A kernel patch is on > the way. Thanks. -- Pedro Alves