Subject: Re: kern/28886: 2.0 panic: assertion "vp->savp_lwp==l2" failed (kern_sa.c)
To: None <hubert.feyrer@informatik.fh-regensburg.de>
From: Chuck Silvers <chuq@chuq.com>
List: netbsd-bugs
Date: 11/04/2005 06:41:56
I've seen this too, more than once, with -current from a few weeks ago.
I was looking into a different problem that involved an SA process
being swapped out and then killed (similar to what would happen when
a machine is shutdown cleanly).

here's some info I collected from one of these occurrances
(so that it's included in the PR):

panic: kernel debugging assertion "vp->savp_lwp == l2" failed: file "../../../../kern/kern_sa.c", line 1021
Stopped in pid 337.5 (named) at netbsd:cpu_Debugger+0x4:        leave
db> ps/l
 PID     LID S     FLAGS       STRUCT LWP *            UAREA * WAIT
>337   >   5 7  0x900004         0xcb374e74         0xcb058000
           3 3 0x4900004         0xca74b5ac         0xcb040000 biowait
           2 2 0x4d00004         0xca74b7bc         0xcb04c000
           4 3  0xd00084         0xca74b6b4         0xcb054000 select
           1 3  0x500084         0xca74b630         0xcb050000 sigwait


db> !debug_print_proc(0t337)
Process 337 (named), state 2, address 0xcb31a564, flags 400
LWPs: 5 (2 running, 0 zombies)
LWP 5 address 0xcb374e74 state 7 flags 900004 
LWP 3 address 0xca74b5ac state 3 flags 4900004 wait 0xc0e658c4 biowait
LWP 2 address 0xca74b7bc state 2 flags 4d00004 
LWP 4 address 0xca74b6b4 state 3 flags d00084 wait 0xc091d068 select
LWP 1 address 0xca74b630 state 3 flags 500084 wait 0xcb31a664 sigwait
SA VP: 3 
SAs: 0 cached LWPs


db> t
cpu_Debugger(0,0,0,cb374e74,0) at netbsd:cpu_Debugger+0x4
panic(c087f5e0,c07cb911,c07db055,c07daf38,3fd) at netbsd:panic+0x11d
__main(c07cb911,c07daf38,3fd,c07db055,cb374e74) at netbsd:__main
sa_switchcall(0,815001f,1f,bfbf001f,bbbc001f) at netbsd:sa_switchcall+0x19d


db> x/x 0xcb040000+3c
0xcb04003c:     cb043c7c
db> t cb043c7c
sa_switch(ca74b5ac,cb26c000,2,1,c0e658c4) at netbsd:sa_switch+0x2fa
ltsleep(c0e658c4,11,c07dcdae,0,c0e658cc) at netbsd:ltsleep+0x47d
biowait(c0e658c4,c0e658c4,6a4,286,a49) at netbsd:biowait+0xe3
uvm_swap_io(cb043d94,45c2,1,100000,0) at netbsd:uvm_swap_io+0x5e1
uvm_swap_get(c0bd5060,45c2,2,cb3033f8,ca74976c) at netbsd:uvm_swap_get+0x33
uvmfault_anonget(cb043ee4,cb361204,cb3cbf38,1140,cb26cfdc) at netbsd:uvmfault_anonget+0xe61
uvm_fault(cb3033f4,ba6ff000,0,1,cb269f70) at netbsd:uvm_fault+0xa56
trap() at netbsd:trap+0x34e
--- trap (number 6) ---
0xbbbe0556:


db> x/x 0xcb04c000+3c
0xcb04c03c:     cb04fc7c
db> t cb04fc7c
sa_switch(ca74b7bc,cb26c000,2,1,c0e659ec) at netbsd:sa_switch+0x188
ltsleep(c0e659ec,11,c07dcdae,0,c0e659f4) at netbsd:ltsleep+0x47d
biowait(c0e659ec,c0e659ec,6a4,286,a48) at netbsd:biowait+0xe3
uvm_swap_io(cb04fd94,45aa,1,100000,0) at netbsd:uvm_swap_io+0x5e1
uvm_swap_get(c0b5f400,45aa,2,cb3033f8,ca74976c) at netbsd:uvm_swap_get+0x33
uvmfault_anonget(cb04fee4,cb267ea4,cb41d938,bd0,cb26cfdc) at netbsd:uvmfault_anonget+0xe61
uvm_fault(cb3033f4,8204000,0,1,cb269f70) at netbsd:uvm_fault+0xa56
trap() at netbsd:trap+0x34e
--- trap (number 6) ---
0x8146763:


db> x/x 0xcb0540000+3c      
0xb054003c:uvm_fault(0xcb3033f4, 0xb0540000, 0, 1) -> 0xe
     kernel: supervisor trap page fault, code=0
Faulted in DDB; continuing...


db> x/x 0xcb050000+3c
0xcb05003c:     cb053dec
db> t cb053dec
sa_switch(ca74b630,cb26c64c,2,1,c091c4b0) at netbsd:sa_switch+0x188
ltsleep(cb31a664,128,c07db1c0,0,0) at netbsd:ltsleep+0x47d
__sigtimedwait1(ca74b630,cb053f64,cb053f5c,c0100430,c010053c) at netbsd:__sigtimedwait1+0x226
sys___sigtimedwait(ca74b630,cb053f64,cb053f5c,0,c04aa57b) at netbsd:sys___sigtimedwait+0x23
syscall_plain() at netbsd:syscall_plain+0x187
--- syscall (number 244) ---
0xbbb64c3b:


-Chuck