From owner-freebsd-threads@FreeBSD.ORG Wed Sep 29 20:45:11 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 8098A16A4CE; Wed, 29 Sep 2004 20:45:11 +0000 (GMT) Received: from mail.vicor-nb.com (bigwoop.vicor-nb.com [208.206.78.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 67B5B43D3F; Wed, 29 Sep 2004 20:45:11 +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 477AF7A446; Wed, 29 Sep 2004 13:45:11 -0700 (PDT) Message-ID: <415B1ED6.8010809@elischer.org> Date: Wed, 29 Sep 2004 13:45:10 -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> <41589B4A.9080508@elischer.org> <415AB791.10809@freebsd.org> <16730.48642.4481.841374@grasshopper.cs.duke.edu> <415B13E8.2090205@elischer.org> <16731.6010.446877.347190@grasshopper.cs.duke.edu> In-Reply-To: <16731.6010.446877.347190@grasshopper.cs.duke.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: David Xu 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: Wed, 29 Sep 2004 20:45:11 -0000 Andrew Gallatin wrote: >Julian Elischer writes: > > > > > > Andrew Gallatin wrote: > > > > >David Xu writes: > > > > > > > Please tell me easiest way to reproduce it, I tried best to reproduce > > > > it, but still got nothing. > > > > > > > > >> http://people.freebsd.org/~gallatin/threadlock.tgz > > > > >> > > > > I use this test case. > > > > > >Are you on an SMP? Do you use an 'ssh $HOST skill -u $USER -9' to > > >send the signal? > > > > > >Julian, you can reproduce it, right? > > > > > > > not yet.. > > > > am setting up a SMP test machine to try again.. > >So far I've only had a chance to test under RELENG_5. >Maybe some change you made recently fixed it.. > >Drew > while you are about it.. try this: diff -u -r1.199 kern_thread.c --- kern/kern_thread.c 25 Sep 2004 00:53:46 -0000 1.199 +++ kern/kern_thread.c 29 Sep 2004 19:45:56 -0000 @@ -282,13 +282,13 @@ * Initialize type-stable parts of a ksegrp (when newly created). */ static int -ksegrp_init(void *mem, int size, int flags) +ksegrp_ctor(void *mem, int size, int flags) { struct ksegrp *kg; kg = (struct ksegrp *)mem; + bzero(mem, size); kg->kg_sched = (struct kg_sched *)&kg[1]; - /* sched_newksegrp(kg); */ return (0); } @@ -369,7 +369,7 @@ tid_zone = uma_zcreate("TID", sizeof(struct tid_bitmap_part), NULL, NULL, NULL, NULL, UMA_ALIGN_CACHE, 0); ksegrp_zone = uma_zcreate("KSEGRP", sched_sizeof_ksegrp(), - NULL, NULL, ksegrp_init, NULL, + ksegrp_ctor, NULL, NULL, NULL, UMA_ALIGN_CACHE, 0); kseinit(); /* set up kse specific stuff e.g. upcall zone*/ }