On 15.11.2021. 17:23, Alexander Bluhm wrote:
> Hi,
>
> To debug IPsec and tdb refcounting it may be useful to have "show
> tdb" and "show all tdbs" in ddb.
Here's panic with this and mvs@ version of "IPsec tdb ref counting" diff
r620-1# --------> tdb_free() killing ourself
panic: kernel diagnostic assertion "refcnt != ~0" failed: file
"/sys/kern/kern_synch.c", line 824
Stopped at db_enter+0x10: popq %rbp
TID PID UID PRFLAGS PFLAGS CPU COMMAND
142769 73130 68 0x10 0 1 sasyncd
*407867 7095 0 0x14000 0x40000200 0K softclock
db_enter() at db_enter+0x10
panic(ffffffff81e456ab) at panic+0xbf
__assert(ffffffff81eb4ec9,ffffffff81e1c0b3,338,ffffffff81e4cbf5) at
__assert+0x25
refcnt_rele(ffff8000013f3478) at refcnt_rele+0x6f
tdb_free(ffff8000013f3450) at tdb_free+0x14f
tdb_timeout(ffff8000013f3450) at tdb_timeout+0x39
softclock_thread(ffff8000ffffefc0) at softclock_thread+0x16e
end trace frame: 0x0, count: 8
https://www.openbsd.org/ddb.html describes the minimum info required in
bug reports. Insufficient info makes it difficult to find and fix bugs.
ddb{0}>
ddb{0}> show tdb
0xffffffff81333460: b774bf02 (unknown address family)->(unknown address
family)
ddb{0}> show all tdb
0xffff8000013f3450: 1712f629 192.168.42.112->192.168.42.100:50 00001002
0xffff8000013f5210: 5f9890f7 192.168.42.100->192.168.42.112:50 00001082
0xffff8000013f5a90: 6eebe767 192.168.42.100->192.168.42.112:50 00001000
0xffff8000013f5ed0: d7874fc6 192.168.42.112->192.168.42.100:50 00001082