From owner-freebsd-threads@FreeBSD.ORG Sat Oct 8 15:58:07 2005 Return-Path: X-Original-To: threads@freebsd.org Delivered-To: freebsd-threads@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 86DB216A41F; Sat, 8 Oct 2005 15:58:07 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2D58243D48; Sat, 8 Oct 2005 15:58:07 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (unknown [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 59DC646B40; Sat, 8 Oct 2005 11:58:06 -0400 (EDT) Date: Sat, 8 Oct 2005 16:58:06 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Daniel Eischen In-Reply-To: Message-ID: <20051008165620.T17032@fledge.watson.org> References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: threads@freebsd.org Subject: Re: SIGINFO interrupts connect() with libpthread X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Oct 2005 15:58:07 -0000 On Sat, 8 Oct 2005, Daniel Eischen wrote: > It only works with libc_r because libc_r wraps all these calls > (including connect()) with poll(). Obviously we're not going to do that > with libpthread. You're only seeing it with SIGINFO because we use > SIGINFO as a debugging signal for libpthread (to dump thread state). > libpthread doesn't install any other signal handlers unless the > application does. We could use a different signal or not use SIGINFO at > all. Ah, so this is why my /tmp is full of garbage :-): -rw-r--r-- 1 robert wheel 1823 Oct 5 20:32 /tmp/pthread.dump.49376.0 -rw-r--r-- 1 robert wheel 1822 Oct 5 20:32 /tmp/pthread.dump.49376.1 -rw-r--r-- 1 robert wheel 1861 Oct 5 20:32 /tmp/pthread.dump.49385.0 -rw-r--r-- 1 robert wheel 1860 Oct 5 20:32 /tmp/pthread.dump.49385.1 -rw-r--r-- 1 robert wheel 1861 Oct 5 20:32 /tmp/pthread.dump.49385.10 -rw-r--r-- 1 robert wheel 1860 Oct 5 20:32 /tmp/pthread.dump.49385.11 -rw-r--r-- 1 robert wheel 1860 Oct 5 20:32 /tmp/pthread.dump.49385.12 -rw-r--r-- 1 robert wheel 1860 Oct 5 20:32 /tmp/pthread.dump.49385.13 -rw-r--r-- 1 robert wheel 1861 Oct 5 20:32 /tmp/pthread.dump.49385.14 -rw-r--r-- 1 robert wheel 1860 Oct 5 20:32 /tmp/pthread.dump.49385.15 -rw-r--r-- 1 robert wheel 1861 Oct 5 20:32 /tmp/pthread.dump.49385.16 -rw-r--r-- 1 robert wheel 1860 Oct 5 20:32 /tmp/pthread.dump.49385.17 -rw-r--r-- 1 robert wheel 1861 Oct 5 20:32 /tmp/pthread.dump.49385.2 -rw-r--r-- 1 robert wheel 1860 Oct 5 20:32 /tmp/pthread.dump.49385.3 -rw-r--r-- 1 robert wheel 1861 Oct 5 20:32 /tmp/pthread.dump.49385.4 -rw-r--r-- 1 robert wheel 1860 Oct 5 20:32 /tmp/pthread.dump.49385.5 -rw-r--r-- 1 robert wheel 1861 Oct 5 20:32 /tmp/pthread.dump.49385.6 -rw-r--r-- 1 robert wheel 1860 Oct 5 20:32 /tmp/pthread.dump.49385.7 -rw-r--r-- 1 robert wheel 1861 Oct 5 20:32 /tmp/pthread.dump.49385.8 -rw-r--r-- 1 robert wheel 1860 Oct 5 20:32 /tmp/pthread.dump.49385.9 -rw-r--r-- 1 robert wheel 1856 Oct 5 21:16 /tmp/pthread.dump.49954.0 -rw-r--r-- 1 robert wheel 1856 Oct 5 21:16 /tmp/pthread.dump.49954.1 -rw-r--r-- 1 robert wheel 1856 Oct 5 21:16 /tmp/pthread.dump.49954.10 -rw-r--r-- 1 robert wheel 1856 Oct 5 21:16 /tmp/pthread.dump.49954.11 -rw-r--r-- 1 robert wheel 1856 Oct 5 21:16 /tmp/pthread.dump.49954.12 -rw-r--r-- 1 robert wheel 1856 Oct 5 21:16 /tmp/pthread.dump.49954.13 -rw-r--r-- 1 robert wheel 1856 Oct 5 21:16 /tmp/pthread.dump.49954.2 -rw-r--r-- 1 robert wheel 1857 Oct 5 21:16 /tmp/pthread.dump.49954.3 -rw-r--r-- 1 robert wheel 1856 Oct 5 21:16 /tmp/pthread.dump.49954.4 -rw-r--r-- 1 robert wheel 1857 Oct 5 21:16 /tmp/pthread.dump.49954.5 -rw-r--r-- 1 robert wheel 1856 Oct 5 21:16 /tmp/pthread.dump.49954.6 -rw-r--r-- 1 robert wheel 1856 Oct 5 21:16 /tmp/pthread.dump.49954.7 -rw-r--r-- 1 robert wheel 1856 Oct 5 21:16 /tmp/pthread.dump.49954.8 -rw-r--r-- 1 robert wheel 1856 Oct 5 21:16 /tmp/pthread.dump.49954.9 -rw-r--r-- 1 robert wheel 338 Oct 5 21:16 /tmp/pthread.dump.49956.0 -rw-r--r-- 1 robert wheel 338 Oct 6 12:12 /tmp/pthread.dump.54401.0 -rw-r--r-- 1 robert wheel 338 Oct 6 12:18 /tmp/pthread.dump.54419.0 -rw-r--r-- 1 robert wheel 1016 Oct 6 12:11 /tmp/uthread.dump.54363.0 -rw-r--r-- 1 robert wheel 1016 Oct 6 12:12 /tmp/uthread.dump.54400.0 -rw-r--r-- 1 robert wheel 1016 Oct 6 12:12 /tmp/uthread.dump.54402.0 As you might guess, I like to hit ^T to find out what an application is doing. Regardless of whether the application has its own SIGINFO handler or not. libpthread should not implement SIGINFO unless some or another special circumstances apply -- environmental variable, or compile option, or such. Robert N M Watson