Date: Sat, 8 Oct 2005 16:58:06 +0100 (BST) From: Robert Watson <rwatson@FreeBSD.org> To: Daniel Eischen <deischen@freebsd.org> Cc: threads@freebsd.org Subject: Re: SIGINFO interrupts connect() with libpthread Message-ID: <20051008165620.T17032@fledge.watson.org> In-Reply-To: <Pine.GSO.4.43.0510081118100.20795-100000@sea.ntplx.net> References: <Pine.GSO.4.43.0510081118100.20795-100000@sea.ntplx.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051008165620.T17032>