From owner-freebsd-stable@FreeBSD.ORG Fri Jan 15 01:31:25 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F189B106568D for ; Fri, 15 Jan 2010 01:31:25 +0000 (UTC) (envelope-from davidxu@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id AE1018FC0C; Fri, 15 Jan 2010 01:31:25 +0000 (UTC) Received: from apple.my.domain (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id o0F1VMXg058234; Fri, 15 Jan 2010 01:31:24 GMT (envelope-from davidxu@freebsd.org) Message-ID: <4B4FC56A.4020007@freebsd.org> Date: Fri, 15 Jan 2010 09:31:22 +0800 From: David Xu User-Agent: Thunderbird 2.0.0.9 (X11/20080612) MIME-Version: 1.0 To: Tijl Coosemans References: <4B4D0293.3040704@rogers.com> <4B4DC490.5070001@rogers.com> <20100113143649.GS62907@deviant.kiev.zoral.com.ua> <201001140941.46748.tijl@coosemans.org> In-Reply-To: <201001140941.46748.tijl@coosemans.org> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Cc: Kostik Belousov , Gardner Bell , freebsd-stable@freebsd.org Subject: Re: process in STOP state X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 01:31:26 -0000 Tijl Coosemans wrote: ursig ast doreti_ast >> Besides weird formatting of procstat -k output, I do not see anything >> wrong in the state of the process. It got SIGSTOP, I am sure. >> Attaching gdb helps because debugger gets signal reports instead of >> target process getting the signal actions on signal delivery. >> >> The only question is why the process gets SIGSTOP at all. > > Wine uses ptrace(2) sometimes. The SIGSTOP could have come from that. > I recently submitted http://www.freebsd.org/cgi/query-pr.cgi?pr=142757 > describing a problem with ptrace and signals, so you might want to give > the kernel patch a try. The problem in your patch is that ksi pointer can not be hold across thread sleeping, because once the process is resumed, there is no guarantee that the thread will run first, once the signal came from process's signal queue, other threads can remove the signal, and here your sigqueue_take(ksi) is dangerous code. David Xu