From owner-freebsd-threads@FreeBSD.ORG Fri Jul 2 22:41:50 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 6A81416A4CE for ; Fri, 2 Jul 2004 22:41:50 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5FB1043D45; Fri, 2 Jul 2004 22:41:50 +0000 (GMT) (envelope-from davidxu@freebsd.org) Received: from freebsd.org (davidxu@localhost [127.0.0.1]) i62MfjWv040939; Fri, 2 Jul 2004 22:41:46 GMT (envelope-from davidxu@freebsd.org) Message-ID: <40E5E432.2020803@freebsd.org> Date: Sat, 03 Jul 2004 06:39:46 +0800 From: David Xu User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040624 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Andrew Gallatin References: <16613.45444.528419.643022@grasshopper.cs.duke.edu> In-Reply-To: <16613.45444.528419.643022@grasshopper.cs.duke.edu> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-threads@freebsd.org Subject: Re: odd KSE panic 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: Fri, 02 Jul 2004 22:41:50 -0000 What scheduler are you using ? can you switch to another scheduler to see if the problem is still there ? David Xu Andrew Gallatin wrote: >I've got a character device which is used for OS-bypass NIC, and I've >got a problem.. > >We just started using a second thread in our userland library. The >idea is this worker thread ioctls into the driver, where he sleeps >waiting for an interrupt from the NIC. When he gets the interrupt, >he wakes up and returns from the ioctl, where he will process some >recently completed events. > >The problem happens when exiting. When main application thread >decides to exit, it does an ioctl into the driver to wakeup the >sleeping worker thread. The worker thread thread wakes up, and then >exits, then the main thread closes his file descriptor and exits. > >