Subject: Re: Lockup with GENERIC-MP kernel (05-19-03)
To: Frank van der Linden <fvdl@netbsd.org>
From: Stephan Uphoff <ups@stups.com>
List: tech-kern
Date: 05/20/2003 20:36:49
vfs_cache.c:326 contains a return without the release of the lock.

	if (bufp) {
				bp = *bpp;
				bp -= ncp->nc_nlen;
				if (bp <= bufp) {
					*dvpp = NULL;
					return (ERANGE);
----------------------------------------^^^^^^^^^^^^^^^^

I guess mi_switch was just not called for a while.
( And as such the backtrace not related to the problem)

	Stephan


 Frank van der Linden <fvdl@netbsd.org> wrote:
> On Tue, May 20, 2003 at 06:20:01PM -0400, Matt Rickard wrote:
> > 	checking if getcwd() calls popen() ...
> > 
> > On the console that I am doing the build on, I am able to type (or at
> > least echo characters to the screen), but the input is ignored.  I can't
> > ctrl-c to kill the task.  I can switch to other virtual consoles, but
> > cannot input anything at all.
> 
> That spells 'locking problem', and indeed, a LOCKDEBUG kernel spews:
> 
> switching with held simple_lock 0xc03d1f30 CPU 1 ../../../../kern/vfs_cache.c:301
> simple_lock_switchcheck(e4dc0400,0,0,c0228144,e4dc0400) at netbsd:simple_lock_sw
> itchcheck+0x18
> mi_switch(e4dc0400,0,1cd,c023245f,0) at netbsd:mi_switch+0x48
> ltsleep(c03d1180,204,c03717e8,0,c0406d1c) at netbsd:ltsleep+0x2ef
> reaper(e4dc0400,0,0,0,c010030c) at netbsd:reaper+0x6c
> 
> ..however, this doesn't make sense, since the lock taken at that
> line is not held ever by the reaper, or can it ever be held 
> in any way when a process sleeps. So at first glance I can't
> figure out what's going on there.
> 
> - Frank
> 
> 
> -- 
> Frank van der Linden                                            fvdl@netbsd.org
> ===============================================================================
> NetBSD. Free, Unix-like OS. > 45 different platforms.    http://www.netbsd.org/ 
>