On 20.1.2017. 3:04, Martin Pieuchot wrote: > Diff below enables the NET_LOCK(), again. > > What's new? > > - The lock ordering problem with fdplock() should now be fixed. It is > also documented, fdplock() should be taken first if both locks are > needed. > > - Page faults involving NFS, or any other code path already holding the > NET_LOCK(), have been fixed. The recursion is similar to the existing > vnode problem, so I simply added a hack there. > > - I added some NET_ASSERT_UNLOCKED() to help finding other possible > deadlocks.
I sent this panic to mpi@ and sending here just for reference I have box with: carp pf pfsync isakmpd -K4 sasyncd dhcpd dhcpd sync tcpdump -lnqttti pflog0 pflow ipfix OpenBSD/amd64 (trlababalan) (tty00) login: panic: rw_enter: netlock locking against myself Stopped at Debugger+0x9: leave TID PID UID PRFLAGS PFLAGS CPU COMMAND *269805 88868 0 0x14000 0x200 2 softnet Debugger() at Debugger+0x9 panic() at panic+0xfe rw_enter() at rw_enter+0x228 sosend() at sosend+0x114 copy_flow_ipfix_4_to_m() at copy_flow_ipfix_4_to_m+0xbd pflow_pack_flow_ipfix() at pflow_pack_flow_ipfix+0x185 export_pflow_if() at export_pflow_if+0x1de export_pflow() at export_pflow+0x63 pf_remove_state() at pf_remove_state+0x55 pfsync_in_del_c() at pfsync_in_del_c+0x49 pfsync_input() at pfsync_input+0x23d ipv4_input() at ipv4_input+0x51d ipintr() at ipintr+0x1e if_netisr() at if_netisr+0x175 end trace frame: 0xffff80002a157f10, count: 0 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{2}> trace Debugger() at Debugger+0x9 panic() at panic+0xfe rw_enter() at rw_enter+0x228 sosend() at sosend+0x114 copy_flow_ipfix_4_to_m() at copy_flow_ipfix_4_to_m+0xbd pflow_pack_flow_ipfix() at pflow_pack_flow_ipfix+0x185 export_pflow_if() at export_pflow_if+0x1de export_pflow() at export_pflow+0x63 pf_remove_state() at pf_remove_state+0x55 pfsync_in_del_c() at pfsync_in_del_c+0x49 pfsync_input() at pfsync_input+0x23d ipv4_input() at ipv4_input+0x51d ipintr() at ipintr+0x1e if_netisr() at if_netisr+0x175 taskq_thread() at taskq_thread+0x6c end trace frame: 0x0, count: -15 ddb{2}> show panic rw_enter: netlock locking against myself ddb{2}> ps PID PPID PGRP UID S FLAGS WAIT COMMAND 253 71076 253 0 3 0x100083 ttyin ksh 71076 35135 71076 1000 3 0x10008b pause ksh 35135 12657 12657 1000 3 0x90 select sshd 12657 66645 12657 0 3 0x82 poll sshd 87891 89813 12290 0 3 0x100080 netio tcpdump 3270 1 3270 0 3 0x100083 ttyin getty 66576 1 66576 0 3 0x100083 ttyin getty 30959 1 30959 0 3 0x100083 ttyin getty 62307 1 62307 0 3 0x100083 ttyin getty 8961 1 8961 0 3 0x100083 ttyin getty 93977 1 93977 0 3 0x100083 ttyin getty 68538 12290 12290 0 3 0x100082 piperd logger 89813 12290 12290 76 3 0x100092 bpf tcpdump 12290 90126 12290 0 3 0x10008a pause sh 90126 80805 80805 0 3 0x100090 piperd cron 80805 1 80805 0 3 0x100098 poll cron 45711 48097 16691 623 3 0x90 nanosleep zabbix_agentd 58316 48097 16691 623 3 0x90 select zabbix_agentd 65495 48097 16691 623 3 0x90 nanosleep zabbix_agentd 48097 1 16691 623 3 0x90 wait zabbix_agentd 84343 48458 48458 606 3 0x90 kqread ladvd 48458 1 48458 0 3 0x80 kqread ladvd 33980 26552 26552 95 3 0x100092 kqread smtpd 43918 26552 26552 103 3 0x100092 kqread smtpd 18812 26552 26552 95 3 0x100092 kqread smtpd 30037 26552 26552 95 3 0x100092 kqread smtpd 25308 26552 26552 95 3 0x100092 kqread smtpd 30148 26552 26552 95 3 0x100092 kqread smtpd 26552 1 26552 0 3 0x100080 kqread smtpd 22016 1 22016 77 3 0x100090 poll dhcpd 96497 1 96497 0 3 0x80 kqread snmpd 52396 1 52396 91 3 0x92 kqread snmpd 62956 1 62956 91 3 0x92 kqread snmpd 66645 1 66645 0 3 0x80 select sshd 45044 35532 34313 83 3 0x100092 poll ntpd 35532 34313 34313 83 3 0x100092 poll ntpd 34313 1 34313 0 3 0x100080 poll ntpd 24235 7637 7637 74 3 0x100090 bpf pflogd 7637 1 7637 0 3 0x80 netio pflogd 72492 82652 82652 73 3 0x100090 kqread syslogd 82652 1 82652 0 3 0x100082 netio syslogd 25193 0 0 0 3 0x14200 pgzero zerothread 78245 0 0 0 3 0x14200 aiodoned aiodoned 2126 0 0 0 3 0x14200 syncer update 79022 0 0 0 3 0x14200 cleaner cleaner 36131 0 0 0 3 0x14200 reaper reaper 31126 0 0 0 3 0x14200 pgdaemon pagedaemon 79375 0 0 0 3 0x14200 bored crynlk 41055 0 0 0 3 0x14200 bored crypto 37391 0 0 0 3 0x14200 pftm pfpurge 76930 0 0 0 3 0x14200 usbtsk usbtask 20188 0 0 0 3 0x14200 usbatsk usbatsk 3947 0 0 0 3 0x40014200 acpi0 acpi0 62007 0 0 0 7 0x40014200 idle7 36213 0 0 0 7 0x40014200 idle6 47692 0 0 0 7 0x40014200 idle5 12180 0 0 0 7 0x40014200 idle4 14566 0 0 0 7 0x40014200 idle3 89410 0 0 0 3 0x40014200 idle2 43527 0 0 0 7 0x40014200 idle1 22515 0 0 0 3 0x14200 bored sensors *88868 0 0 0 7 0x14200 softnet 74315 0 0 0 3 0x14200 bored systqmp 4634 0 0 0 3 0x14200 bored systq 42448 0 0 0 3 0x40014200 bored softclock 1112 0 0 0 7 0x40014200 idle0 52929 0 0 0 3 0x14200 bored sbar 1 0 1 0 3 0x82 wait init 0 -1 0 0 3 0x10200 scheduler swapper
