From owner-p4-projects Sat Sep 7 17:10:42 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B549E37B401; Sat, 7 Sep 2002 17:10:33 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 40FCF37B400 for ; Sat, 7 Sep 2002 17:10:33 -0700 (PDT) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id F136543E4A for ; Sat, 7 Sep 2002 17:10:24 -0700 (PDT) (envelope-from baka@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1921) id 326BCAE027; Sat, 7 Sep 2002 17:09:24 -0700 (PDT) Date: Sat, 7 Sep 2002 17:09:24 -0700 From: Jonathan Mini To: Julian Elischer Cc: Perforce Change Reviews Subject: Re: PERFORCE change 17212 for review Message-ID: <20020908000924.GV7265@elvis.mu.org> References: <200209072319.g87NJum2099365@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4i Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Julian Elischer [julian@elischer.org] wrote : > what's the backtrace? I haven't got a serial console (grrr), so I had to copy this down on paper. The panic is 'Giant not owned at ../../vm/vm_map.c:364' : Debugger() panic() _mtx_assert() _vm_map_lock() _vm_map_find() _kmem_alloc_nofault() pmap_new_thread() thread_init() slab_zalloc() uma_internal() uma_zalloc_arg() thread_alloc() thread_userret() userret() --- fork_return() fork_exit() fork_trampoline() The fork_trampoline stuff is totally bogus. We see this because the values were inited like fork does (in cpu_set_upcall()), but haven't been overriden yet for the upcall. Hmm. It looks like maybe we should be holding Giant inside pmap_new_thread(). Today does not seem to by my day; I am jumping way to quickly. I think it's time for a break. I'll see you tomorrow, or maybe later this evening. > On Sat, 7 Sep 2002, Jonathan Mini wrote: > > > http://people.freebsd.org/~peter/p4db/chv.cgi?CH=17212 > > > > Change 17212 by mini@mini_stylus on 2002/09/07 16:19:49 > > > > Hold Giant while we allocate a thread. Jeffr says we needn't > > hold Gian over any UMA operation, but I'm still getting > > 'Giant not held' panics when we need to allocate a thread > > here. > > > > Affected files ... > > > > .. //depot/projects/kse/sys/kern/kern_thread.c#106 edit > > > > Differences ... > > > > ==== //depot/projects/kse/sys/kern/kern_thread.c#106 (text+ko) ==== > > > > @@ -621,8 +621,11 @@ > > /* > > * Ensure that we have a spare thread available. > > */ > > - if (ke->ke_tdspare == NULL) > > + if (ke->ke_tdspare == NULL) { > > + mtx_lock(&Giant); > > ke->ke_tdspare = thread_alloc(); > > + mtx_unlock(&Giant); > > + } > > > > /* > > * Bound threads need no additional work. > > > -- Jonathan Mini http://www.freebsd.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message