From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27987 invoked by alias); 21 Nov 2012 18:47:02 -0000 Received: (qmail 27898 invoked by uid 22791); 21 Nov 2012 18:47:00 -0000 X-SWARE-Spam-Status: No, hits=-3.7 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from e06smtp12.uk.ibm.com (HELO e06smtp12.uk.ibm.com) (195.75.94.108) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 21 Nov 2012 18:46:55 +0000 Received: from /spool/local by e06smtp12.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 21 Nov 2012 18:46:52 -0000 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp12.uk.ibm.com (192.168.101.142) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 21 Nov 2012 18:46:50 -0000 Received: from d06av05.portsmouth.uk.ibm.com (d06av05.portsmouth.uk.ibm.com [9.149.37.229]) by b06cxnps4076.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id qALIkgoh48365630 for ; Wed, 21 Nov 2012 18:46:42 GMT Received: from d06av05.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av05.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id qALIknGY018663 for ; Wed, 21 Nov 2012 11:46:49 -0700 Received: from BR87Z6LW (dyn-9-152-212-247.boeblingen.de.ibm.com [9.152.212.247]) by d06av05.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id qALIknqO018657; Wed, 21 Nov 2012 11:46:49 -0700 From: Andreas Arnez To: Pedro Alves 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> Date: Wed, 21 Nov 2012 18:47:00 -0000 In-Reply-To: <50A3C376.9080602@redhat.com> (Pedro Alves's message of "Wed, 14 Nov 2012 16:14:46 +0000") Message-ID: <874nki6bfq.fsf@linux.vnet.ibm.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii x-cbid: 12112118-8372-0000-0000-000004666DE3 X-IsSubscribed: yes 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/msg00059.txt.bz2 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. 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.