From owner-freebsd-bugs Sun Oct 17 15:30:14 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 715F51501D for ; Sun, 17 Oct 1999 15:30:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id PAA44639; Sun, 17 Oct 1999 15:30:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from ag-gw.muc.de (ag-gw.muc.de [193.149.48.126]) by hub.freebsd.org (Postfix) with ESMTP id 4ACF514DFD for ; Sun, 17 Oct 1999 15:23:07 -0700 (PDT) (envelope-from ag@ag-gw.muc.de) Received: (from ag@localhost) by ag-gw.muc.de (8.9.3/8.9.2) id AAA66637; Mon, 18 Oct 1999 00:23:06 +0200 (CEST) (envelope-from ag) Message-Id: <199910172223.AAA66637@ag-gw.muc.de> Date: Mon, 18 Oct 1999 00:23:06 +0200 (CEST) From: ag@muc.de Reply-To: ag@muc.de To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: i386/14383: Probable bug in phtread_kill() (both RELENG_3 and CURRENT) ? Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 14383 >Category: i386 >Synopsis: pthread_kill() does not call sighandler of specific thread >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Oct 17 15:30:01 PDT 1999 >Closed-Date: >Last-Modified: >Originator: Armin Gruner >Release: FreeBSD 3.2-RELEASE i386 >Organization: muc.de >Environment: Standard 3.2 RELEASE installation (sources upgraded to RELENG_3 AND CURRENT, source of pthreads did not change there) >Description: If using pthread_kill(), the signal handler is not called, if the specific thread is e.g. sleep()ing. Only EINTR is returned. >How-To-Repeat: Run /usr/src/lib/libc_r/test/sigsuspend. The test will fail because the signal handler does not get called that many times than expected. >Fix: (applies both to RELENG_3 and CURRENT) If the thread which should be signalled is in SLEEP_WAIT, SELECT_WAIT and similar states, *RECORD* the signal in the sigpending mask, as done in other states too: Index: uthread_kill.c =================================================================== RCS file: /usr/FreeBSD-CVS/src/lib/libc_r/uthread/uthread_kill.c,v retrieving revision 1.5.2.3 diff -u -w -r1.5.2.3 uthread_kill.c --- uthread_kill.c 1999/08/29 14:55:57 1.5.2.3 +++ uthread_kill.c 1999/10/17 21:19:08 @@ -109,11 +109,8 @@ /* Return the signal number: */ pthread->signo = sig; - } else { - /* Increment the pending signal count: */ - sigaddset(&pthread->sigpend,sig); } - break; + /* fallthrough */ default: /* Increment the pending signal count: */ >Release-Note: >Audit-Trail: >Unformatted: if this thread is sleeping (thread is only getting EINTR) Class: sw-bug To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message