From owner-freebsd-bugs Fri Aug 6 22:20:32 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 A481A14E9F for ; Fri, 6 Aug 1999 22:20:30 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id WAA58666; Fri, 6 Aug 1999 22:20:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from moose.tgsoft.com (cx20270-a.pwy1.sdca.home.com [24.0.169.3]) by hub.freebsd.org (Postfix) with SMTP id 3029814CE5 for ; Fri, 6 Aug 1999 22:11:51 -0700 (PDT) (envelope-from mark@tgsoft.com) Received: (qmail 91864 invoked by uid 128); 7 Aug 1999 05:10:42 -0000 Message-Id: <19990807051041.91863.qmail@moose.tgsoft.com> Date: 7 Aug 1999 05:10:41 -0000 From: mark@tgsoft.com Reply-To: mark@tgsoft.com To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: bin/13008: kill fails in libc_r Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 13008 >Category: bin >Synopsis: pthread_kill does not always work >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Aug 6 22:20:01 PDT 1999 >Closed-Date: >Last-Modified: >Originator: mark thompson >Release: FreeBSD 3.2-STABLE i386 >Organization: tgsoft >Environment: 3.2 stable pthread library >Description: I wrote an application that worked basically like this: main: create a socket create 10 threads run for a while, then: send each thread a signal with pthread_kill and wait for it in pthread_join. when one thread has been waited for, go back and kill the next one exit Each thread (in a loop): does an accept on the socket copies some data closes the data socket repeats The problem: Waiting in pthread_join was not fruitful. Examination shows that *most* of the threads that are in 'accept' were waiting for the a lock on the socket (state: PS_FDLR_WAIT) and pthread_kill does not do anything to them. One lucky thread would be in PS_FDR_WAIT, and it could be killed... but it is hard for my application to know which thread that is. >How-To-Repeat: Sorry, no sample code. I have hacked up the application to the point that it is no longer recognizeable. >Fix: pthread_kill probably needs to know how to kill processes that are waiting for file locks. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message