From owner-cvs-all@FreeBSD.ORG Wed Jun 20 07:22:07 2007 Return-Path: X-Original-To: cvs-all@freebsd.org Delivered-To: cvs-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A1EAD16A469; Wed, 20 Jun 2007 07:22:07 +0000 (UTC) (envelope-from davidxu@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id 919E013C45A; Wed, 20 Jun 2007 07:22:07 +0000 (UTC) (envelope-from davidxu@freebsd.org) Received: from [127.0.0.1] (root@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id l5K7M3UV053482; Wed, 20 Jun 2007 07:22:05 GMT (envelope-from davidxu@freebsd.org) Message-ID: <4678D5BF.9020609@freebsd.org> Date: Wed, 20 Jun 2007 15:22:39 +0800 From: David Xu User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.13) Gecko/20070516 X-Accept-Language: en-us, en MIME-Version: 1.0 To: John Baldwin References: <200506060513.j565DCur032340@repoman.freebsd.org> <200706192026.41638.jhb@freebsd.org> In-Reply-To: <200706192026.41638.jhb@freebsd.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/kern kern_sig.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jun 2007 07:22:07 -0000 John Baldwin wrote: > On Monday 06 June 2005 01:13:11 am David Xu wrote: > >>davidxu 2005-06-06 05:13:11 UTC >> >> FreeBSD src repository >> >> Modified files: >> sys/kern kern_sig.c >> Log: >> Fix a bug relavant to debugging, a masked signal unexpectedly interrupts >> a sleeping thread when process is being debugged. >> >> PR: GNU/77818 >> Tested by: Sean C. Farley > > > This actually breaks other debugging as now debuggers or other processes using > procfs/ptrace to catch signals can no longer see ignored signals or > SIGSTOP/SIGCONT. The latter breaks strace when execing a new child process > as it opens a race where the child process hangs because the parent doesn't > ever see that the child process has stopped itself with SIGSTOP (the parent > resumes it with SIGCONT when it sees that). The signal shouldn't make it to > the target thread if it is ignored, but the process should be stopped and the > debugger notified of all signals. > Where can you find the place SIGSTOP can be masked or ignored ? Though SIGCONT can be ignored but it still can resume a suspended process. if ignored signals can be seen by debugger, then a sleep(10) will be interrupted by ignored signals when the process is being debugged, but will work correctly if it is not being debugged, this becauses issignal() must be called by debugged thread to report any signals to debugger, the thread should be woken up. David Xu