From owner-freebsd-threads@FreeBSD.ORG Mon Sep 27 22:59:22 2004 Return-Path: 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 A721316A4CE for ; Mon, 27 Sep 2004 22:59:22 +0000 (GMT) Received: from mail.vicor-nb.com (bigwoop.vicor-nb.com [208.206.78.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8E7F343D4C for ; Mon, 27 Sep 2004 22:59:22 +0000 (GMT) (envelope-from julian@elischer.org) Received: from elischer.org (julian.vicor-nb.com [208.206.78.97]) by mail.vicor-nb.com (Postfix) with ESMTP id 731787A425; Mon, 27 Sep 2004 15:59:22 -0700 (PDT) Message-ID: <41589B4A.9080508@elischer.org> Date: Mon, 27 Sep 2004 15:59:22 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.3.1) Gecko/20030516 X-Accept-Language: en, hu MIME-Version: 1.0 To: Andrew Gallatin References: <16728.37731.540143.307772@grasshopper.cs.duke.edu> In-Reply-To: <16728.37731.540143.307772@grasshopper.cs.duke.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-threads@freebsd.org Subject: Re: easy to reproduce unkillable threads X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Sep 2004 22:59:22 -0000 Andrew Gallatin wrote: >I've put together a quick and dirty example of the thread >deadlock-on-exit (sometimes lingering thread) problem I've been >seeing with my driver and FreeBSD threads. See the long "Re: >Unkillable KSE threaded proc" thread from earlier this month for >details. > >The tarball linked below is based on /usr/share/examples/kld/cdev >To reproduce the problem, build the module and load it. >Then build testcdev, and run it. > >Install the skill-4.1.1 port. Then ssh in from another host, and do 'skill >-9 -u $USER'. > >This should leave you with a stuck thread.. > hmm looks like the problem is that the condition variable respods to a masked signal the signals are all masked from the perspective of the thread..the signal is delivered to the signal catcher thread so the UTS can handle it but in the meanwhile the thread has done a RESTART.. David: check out what happens when a signal is delivered to a worker thread that is in a cv_wait_signal() > >> . >> > > I haven't checked it as yet but I am starting to see some hint of some > problem.. > The fact that cv_wait_signal() reacts to a blocked signal surproses me.. > (according to teh man page) > >http://people.freebsd.org/~gallatin/threadlock.tgz > > >I would really love for somebody to look at it before 5.3-R... > >Thank you, > > >Drew > >