Subject: kern/3959: panic "lockmgr: locking against myself" from VM
To: None <gnats-bugs@gnats.netbsd.org>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: netbsd-bugs
Date: 08/08/1997 16:51:46
>Number:         3959
>Category:       kern
>Synopsis:       panic "lockmgr: locking against myself" from VM
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Aug  8 08:05:00 1997
>Last-Modified:
>Originator:     Manuel BOUYER
>Organization:

LIP6, Universite Paris VI.

>Release:        NetBSD 1.2G, as of jul, 22
>Environment:
	
System: NetBSD antioche.lip6.fr 1.2G NetBSD 1.2G (ANTIOCHE) #0: Wed Jul 23 13:16:32 MEST 1997     bouyer@chassiron.ensta.fr:/usr/src/sources/src_current/sys/arch/i386/compile/ANTIOCHE i386

i486dx33 with 8Mb ram, aha1542 and 3 scsi disks - swap configured on the 3
disks.

>Description:
	
	This small machine runs sendmail, sup, wu-ftpd and apache.
	It is not heavily loaded (it handles only my own e-mail, and only a few
	persons per days connects to ftp and httpd services).
	It ocasionally panics with:
	"lockmgr: locking against myself". Here is a backtrace:
	panic
	lockmgr
	vm_map_pageable
	trap
		trap (number 6)
	vm_page_insert
	vm_page_rename
	vm_object_overlay
	vm_object_collapse
	vm_object_deallocate
	vm_map_entry_delete
	vm_map_delete
	vm_map_remove
	exit1
	sys_exit
		syscall (number 1)
>How-To-Repeat:

	It is usually related with mail activity (although it also paniced
	at a "logout"). One easy way for me to reproduce the panic is to
	fill the mailq on my ppro with about 100 e-mails sent to nobody and then
	run 3 or 4 "sendmail -q" in parallel, wich will open 3 or 4 smtp
	connections to the 486. The 486 usually panics after 50-60 mails
	have been sent.

	I was not able to reproduce this with a simple forking program
	like while (1) {if (fork() == 0) exit(0);}, the problem seems to be
	related to simultaneous fork and paging activity.

>Fix:
	Don't know. I can provide more informations if needed (a more complete
	trace, or a core dump) and test some patchs.
>Audit-Trail:
>Unformatted: