Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 7 Sep 2002 17:09:24 -0700
From:      Jonathan Mini <mini@FreeBSD.org>
To:        Julian Elischer <julian@elischer.org>
Cc:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   Re: PERFORCE change 17212 for review
Message-ID:  <20020908000924.GV7265@elvis.mu.org>
In-Reply-To: <Pine.BSF.4.21.0209071626450.47897-100000@InterJet.elischer.org>
References:  <200209072319.g87NJum2099365@freefall.freebsd.org> <Pine.BSF.4.21.0209071626450.47897-100000@InterJet.elischer.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <mini@freebsd.org>
http://www.freebsd.org/

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe p4-projects" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020908000924.GV7265>