Subject: Consistent "panic: lockmgr: no context" on macppc
To: None <netbsd-help@netbsd.org>
From: Monroe Williams <monroe@criticalpath.com>
List: netbsd-help
Date: 10/04/2001 16:57:03
I'm setting up a new machine that's supposed to replace an old server
(PowerMac 9600 running NetBSD-1.5), and I can't seem to get it to run
reliably.

The new machine is a G4/466 with 3 IBM DDYS-series (U160-capable) drives:
two 18G drives as a mirrored RAID set for most of the filesystem and a 9G
used for /tmp, swap, and an HFS partition.  I've already determined that an
Adaptec 29160 SCSI card will not work reliably with NetBSD (see my posts to
the port-macppc list last month for details), and I'm auditioning a
53c895-based card made by ATTO.

I'm consistently seeing the following panic right after the boot sequence
finishes and the login: prompt is displayed:

panic: lockmgr: no context
Stopped at      cpu_Debugger+0x10:   blah blah blah
db> trace
at panic+e8
at lockmgr+a4
at uvm_map+c4
at uvm_km_valloc+5c
at _bus_dmamem_map+68
at siop_morecbd+138
at siop_scsicmd+9c
at scsipi_execute_xs+58
at scsi_scsipi_cmd+190
at scsipi_command+bc
at sdstart+270
at scsipi_free_xs+d0
at scsipi_done+1b8
at siop_scsicmd_end+3bc
at siop_intr+13d4
at do_pending_int+120
at lcsplx+34
at cpu_switch+30
at mi_switch+1a4
at ltsleep+294
at rf_DispatchDAG+3d4
at fork_trampoline+10
db>

I find that it happens quickest when the machine is quiescent.  If the RAID
set is running a parity rebuild or I hit return repeatedly just after the
login: prompt comes up, I can sometimes avoid the panic.

This happens with custom kernels built from the 1.5.1 and 1.5.2 source
snapshots.  (These are mostly GENERIC, with the siop driver instead of ncr
and kernelized raidframe added.)  I haven't tried -current yet, and would
prefer to avoid it if possible, since this will be a pretty critical
production machine.

Help.  Please.

-- monroe
------------------------------------------------------------------------
Monroe Williams                                  monroe@criticalpath.com