Subject: kern/16065: [dM] vnlock deadlock
To: None <gnats-bugs@gnats.netbsd.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: netbsd-bugs
Date: 03/26/2002 11:01:12
>Number:         16065
>Category:       kern
>Synopsis:       [dM] vnlock deadlock
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Mar 26 08:03:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     der Mouse
>Release:        Proprietary PPC port derived from 1.5W
>Organization:
	Dis-
>Environment:
	Proprietary PPC port derived from 1.5W
>Description:
	I've been asked to post this by a company that's been working
	with NetBSD.  I don't know much about the problem, as I did not
	see this myself, but I can get mail back to the actual
	originators.  (I realize there is comparatively little
	information here, especially in view of their peculiar decision
	to crunch most executables.  I'm trying to help them some in
	tracking it down myself; if anyone has any ideas, I/we would
	most appreciate hearing them.)

console locked, can only go to db>
The only place a process can wait on a "vnlock" channel is in the ACQUIRE macro
"vnlock" is set as wait channel in 2 places in vfs_subr.c by calling lockinit
The only place where lk_wmesg is used in a ltsleep is in the ACQUIRE macro defined
in kern_lock.c.

Proprietary NetBSD PPC port derived from the 1.5W

LOCKDEBUG not defined, not a SMP config.
/*	$NetBSD: param.h,v 1.128 2001/06/03 02:48:45 thorpej Exp $	*/
    #define	__NetBSD_Version__	105230000	/* NetBSD 1.5W */
/*	$NetBSD: sys_process.c,v 1.67 2001/03/17 09:38:36 pooka Exp $	*/
/*	$NetBSD: kern_synch.c,v 1.104 2001/05/28 22:20:03 chs Exp $	*/
/*	$NetBSD: kern_lock.c,v 1.55 2001/06/05 04:38:09 thorpej Exp $	*/
/*	$NetBSD: uvm_fault_i.h,v 1.13 2001/06/02 18:09:26 chs Exp $	*/
/*	$NetBSD: uvm_map.h,v 1.28 2001/06/02 18:09:27 chs Exp $	*/
/*	$NetBSD: uvm_fault.c,v 1.64 2001/06/02 18:09:26 chs Exp $	*/
/*	$NetBSD: uvm_map.c,v 1.99 2001/06/02 18:09:26 chs Exp $	*/
/*	$NetBSD: uvm_io.c,v 1.15 2001/06/02 18:09:26 chs Exp $	*/
/*	$NetBSD: uvm_vnode.c,v 1.50 2001/05/26 21:27:21 chs Exp $	*/
/*	$NetBSD: procfs_mem.c,v 1.27 2000/11/24 18:58:37 chs Exp $	*/
/*	$NetBSD: layer_vnops.c,v 1.6 2001/06/07 13:32:47 wiz Exp $	*/

In platform-dependent part: arch/my_ppc
/*	$NetBSD: cpu.c,v 1.1 2000/02/29 15:21:46 nonaka Exp $	*/
/*	$NetBSD: locore.s,v 1.8 2000/11/16 05:38:33 thorpej Exp $	*/
/*	$NetBSD: machdep.c,v 1.11 2000/09/13 15:00:22 thorpej Exp $	*/
in arch/powerpc
/*	$NetBSD: Locore.c,v 1.4 2000/06/08 06:48:45 kleink Exp $	*/
/*	$NetBSD: locore_subr.S,v 1.2 2001/02/28 20:44:41 tsubai Exp $	*/
/*	$NetBSD: mem.c,v 1.9 2001/02/04 17:38:11 briggs Exp $ */
/*	$NetBSD: pmap.c,v 1.44 2001/06/10 11:01:27 tsubai Exp $	*/
/*	$NetBSD: powerpc_machdep.c,v 1.4 2001/04/05 09:58:05 tsubai Exp $	*/
/*	$NetBSD: process_machdep.c,v 1.5 2001/02/04 17:38:11 briggs Exp $	*/
/*	$NetBSD: sys_machdep.c,v 1.3 2000/06/09 14:08:45 kleink Exp $	*/
/*	$NetBSD: trap.c,v 1.46 2001/06/10 16:31:59 tsubai Exp $	*/
/*	$NetBSD: trap_subr.S,v 1.6 2001/06/08 00:16:25 matt Exp $	*/
/*	$NetBSD: trap_subr_mp.S,v 1.2 2001/06/10 11:09:28 tsubai Exp $	*/
/*	$NetBSD: vm_machdep.c,v 1.28 2001/06/10 11:01:28 tsubai Exp $	*/

db> ps
 PID             PPID       PGRP        UID S   FLAGS          COMMAND    WAIT
 111              110        111          0 3  0x4086           crunch    wait
 110               45         45          0 3    0x84           crunch  select
 107              106        107          0 3  0x4086           crunch    wait
 106               45         45          0 3    0x84           crunch  select
 90                 1         69          0 3  0x4086        my_snmpsub select
 89                 1         69          0 3  0x4006        my_snmptst vnlock
 86                 1         86          0 3    0x84          syslogd  select
 67                64         67          0 3  0x4086           crunch   ttyin
 66                 1         66          0 3  0x4006           crunch   netio
 64                45         45          0 3    0x84           crunch  select
 52                 1         52          0 3    0x84           crunch  select
 45                 1         45          0 3    0x84           crunch  select
 33                 1         33          0 3    0x84           crunch  mfsidl
 11                 0          0          0 3 0x20204         aiodoned aiodone
 10                 0          0          0 3 0x20204          ioflush  syncer
 9                  0          0          0 3 0x20204           reaper  reaper
 8                  0          0          0 3 0x20204       pagedaemon pgdaemo
 7                  0          0          0 3 0x20284            nfsio  nfsidl
 6                  0          0          0 3 0x20284            nfsio  nfsidl
 5                  0          0          0 3 0x20284            nfsio  nfsidl
 4                  0          0          0 3 0x20284            nfsio  nfsidl
 1                  0          1          0 3  0x4084           crunch    wait
 0                 -1          0          0 3 0x20204          swapper schedul

>How-To-Repeat:
	Be unlucky. :-(  Unfortunately that's about all we/they know,
	at least so far.
>Fix:
	We're plugging away at it; no fix yet.
>Release-Note:
>Audit-Trail:
>Unformatted: