Hi, Regress found an data_access_fault on sparc64 pfctl
START sys/net/pf_table 2021-11-20T19:26:58Z rm -f a.out [Ee]rrs mklog *.core y.tab.h stamp-* ==== hit ==== pfctl -qt __regress_tbl -T add -f /usr/src/regress/sys/net/pf_table/table.in Timeout, server ot21 not responding. panic: kernel data fault: pc=121e9fc addr=fffffffffffc2000 Stopped at db_enter+0x8: nop TID PID UID PRFLAGS PFLAGS CPU COMMAND *357996 32001 0 0x2 0 1K pfctl data_access_fault(400266eb460, 30, 121e9fc, fffffffffffc2000, fffffffffffc2b18, 800809) at data_access_fault+0x2f0 Ldatafault_internal(0, 0, 10000000, 40, caecb9beb0, caecba3fb8) at Ldatafault_internal+0xcc pfr_add_addrs(4000541a800, cd395f2000, 26, 4000541ac3c, 10000000, 0) at pfr_add_addrs+0x48 pfioctl(4900, c4504443, 4000541a800, 3, 40002905b90, 0) at pfioctl+0x904 spec_ioctl(400266eb9f8, 4002a7f8000, 1953188, 0, 0, 0) at spec_ioctl+0xb8 VOP_IOCTL(14dca00, c4504443, 4000541a800, 1981e10, 4000431c9c0, 40002905b90) at VOP_IOCTL+0x5c vn_ioctl(40003ebdf10, c4504443, 4000541a800, 40002905b90, 1012f50, 800) at vn_ioctl+0x64 sys_ioctl(0, 400266ebdb0, 400266ebdf0, 1878f30, 11110e0, 4d) at sys_ioctl+0x234 syscall(400266ebed0, 436, caec82dc68, caec82dc6c, 0, 85) at syscall+0x418 syscall_setup(3, c4504443, fffffffffffc26f8, 40, caecb9beb0, caecba3fb8) at syscall_setup+0x134 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{1}> show panic *cpu1: kernel data fault: pc=121e9fc addr=fffffffffffc2000 OpenBSD 7.0-current (GENERIC.MP) #1060: Fri Nov 19 14:39:41 MST 2021 dera...@sparc64.openbsd.org:/usr/src/sys/arch/sparc64/compile/GENERIC.MP ddb{1}> trace data_access_fault(400266eb460, 30, 121e9fc, fffffffffffc2000, fffffffffffc2b18, 800809) at data_access_fault+0x2f0 Ldatafault_internal(0, 0, 10000000, 40, caecb9beb0, caecba3fb8) at Ldatafault_internal+0xcc pfr_add_addrs(4000541a800, cd395f2000, 26, 4000541ac3c, 10000000, 0) at pfr_add_addrs+0x48 pfioctl(4900, c4504443, 4000541a800, 3, 40002905b90, 0) at pfioctl+0x904 spec_ioctl(400266eb9f8, 4002a7f8000, 1953188, 0, 0, 0) at spec_ioctl+0xb8 VOP_IOCTL(14dca00, c4504443, 4000541a800, 1981e10, 4000431c9c0, 40002905b90) at VOP_IOCTL+0x5c vn_ioctl(40003ebdf10, c4504443, 4000541a800, 40002905b90, 1012f50, 800) at vn_ioctl+0x64 sys_ioctl(0, 400266ebdb0, 400266ebdf0, 1878f30, 11110e0, 4d) at sys_ioctl+0x234 syscall(400266ebed0, 436, caec82dc68, caec82dc6c, 0, 85) at syscall+0x418 syscall_setup(3, c4504443, fffffffffffc26f8, 40, caecb9beb0, caecba3fb8) at syscall_setup+0x134 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND *32001 357996 78543 0 7 0x2 pfctl 78543 205553 36239 0 3 0x10008a sigsusp make 36239 119328 87511 0 3 0x10008a sigsusp sh 87511 162950 77857 0 3 0x10008a sigsusp make 48116 276236 0 0 3 0x14200 bored sosplice 5397 509795 0 0 3 0x14200 bored sensors 36503 235268 74172 0 3 0x100082 piperd gzip 74172 14599 77857 0 3 0x100082 piperd pax 77857 494115 67569 0 3 0x82 piperd perl 67569 358287 43870 0 3 0x10008a sigsusp ksh 43870 111015 61303 0 3 0x9a kqread sshd 82582 428531 1 0 3 0x100083 ttyin getty 98167 267822 1 0 3 0x100098 kqread cron 9021 360408 0 0 3 0x14280 nfsidl nfsio 50116 292519 0 0 3 0x14280 nfsidl nfsio 74067 491290 0 0 3 0x14280 nfsidl nfsio 23370 42309 0 0 3 0x14280 nfsidl nfsio 83681 520369 1 99 3 0x100090 kqread sndiod 64225 415938 1 110 3 0x100090 kqread sndiod 80580 497443 3261 95 3 0x100092 kqread smtpd 78262 381576 3261 103 3 0x100092 kqread smtpd 47573 70104 3261 95 3 0x100092 kqread smtpd 97714 501391 3261 95 3 0x100092 kqread smtpd 81008 139287 3261 95 3 0x100092 kqread smtpd 887 55917 3261 95 3 0x100092 kqread smtpd 3261 388421 1 0 3 0x100080 kqread smtpd 61303 5012 1 0 3 0x88 kqread sshd 43848 49295 0 0 3 0x14200 acct acct 8150 176276 1 0 3 0x100080 kqread ntpd 78896 39445 74621 83 3 0x100092 kqread ntpd 74621 6746 1 83 3 0x100092 kqread ntpd 97682 494213 61007 74 3 0x100092 bpf pflogd 61007 468432 1 0 3 0x80 netio pflogd 34918 136484 89470 73 3 0x100090 kqread syslogd 89470 308552 1 0 3 0x100082 netio syslogd 54092 319789 1 0 3 0x100080 kqread resolvd 85801 253881 94117 77 3 0x100092 kqread dhcpleased 92273 98689 94117 77 3 0x100092 kqread dhcpleased 94117 175861 1 0 3 0x80 kqread dhcpleased 31373 280796 49165 115 3 0x100092 kqread slaacd 72966 232384 49165 115 3 0x100092 kqread slaacd 49165 216743 1 0 3 0x100080 kqread slaacd 62832 471012 0 0 3 0x14200 bored smr 22657 309869 0 0 3 0x14200 pgzero zerothread 28066 488381 0 0 3 0x14200 aiodoned aiodoned 17640 305742 0 0 3 0x14200 syncer update 86511 196284 0 0 3 0x14200 cleaner cleaner 23534 221576 0 0 3 0x14200 reaper reaper 18915 201221 0 0 3 0x14200 pgdaemon pagedaemon 57976 219273 0 0 3 0x40014200 idle1 60701 458024 0 0 3 0x14200 bored softnet 34275 489143 0 0 3 0x14200 bored systqmp 30178 494915 0 0 3 0x14200 bored systq 42176 411931 0 0 3 0x40014200 bored softclock 40939 283149 0 0 7 0x40014200 idle0 66755 138272 0 0 3 0x14200 kmalloc kmthread 1 434460 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show register tstate 0x80000600 pc 0x11f33c8 db_enter+0x8 npc 0x11f33cc db_enter+0xc ipl 0xf y 0 g0 0 g1 0x1c07000 db_machine_command_table+0x198 g2 0x1 g3 0 g4 0 g5 0x400266eb127 g6 0 g7 0xe0018000 o0 0x3b o1 0x4002a7f8964 o2 0x1879078 T+0x3e8 o3 0x400266eb368 o4 0x1012f50 Lcopyfault o5 0 o6 0x400266ea941 o7 0x124376c panic+0xcc l0 0x400266eb298 l1 0x400266eb160 l2 0x400266eb2c0 l3 0x400266eb1e0 l4 0x1981e10 __guard_local l5 0x4000541a800 l6 0x1981e10 __guard_local l7 0x4000541a800 i0 0 i1 0 i2 0 i3 0 i4 0 i5 0 i6 0 i7 0 f0 0 f2 0 f4 0 f6 0 f8 0 f10 0 f12 0 f14 0 f16 0 f18 0 f20 0 f22 0 f24 0 f26 0 f28 0 f30 0 f32 0 f34 0 f36 0 f38 0 f40 0 f42 0 f44 0 f46 0 f48 0 f50 0 f52 0 f54 0 f56 0 f58 0 f60 0 f62 0 fsr 0 gsr 0 ddb{1}> print 0x121e9fc-pfr_add_addrs 5c 0000000000006b40 <pfr_add_addrs>: /usr/src/sys/net/pf_table.c:324 * 6b9c: c2 04 24 20 ld [ %l0 + 0x420 ], %g1 6ba0: 80 88 60 02 btst 2, %g1 6ba4: 12 60 00 4d bne,pn %xcc, 6cd8 <pfr_add_addrs+0x198> 6ba8: b0 10 20 01 mov 1, %i0 /usr/src/sys/net/pf_table.c:326 311 pfr_add_addrs(struct pfr_table *tbl, struct pfr_addr *addr, int size, 312 int *nadd, int flags) 313 { 314 struct pfr_ktable *kt, *tmpkt; 315 struct pfr_kentryworkq workq, ioq; 316 struct pfr_kentry *p, *q, *ke; 317 struct pfr_addr ad; 318 int i, rv, xadd = 0; 319 time_t tzero = gettime(); 320 321 ACCEPT_FLAGS(flags, PFR_FLAG_DUMMY | PFR_FLAG_FEEDBACK); 322 if (pfr_validate_table(tbl, 0, flags & PFR_FLAG_USERIOCTL)) 323 return (EINVAL); * 324 if (kt->pfrkt_flags & PFR_TFLAG_CONST) 325 return (EPERM); 326 tmpkt = pfr_create_ktable(&pfr_nulltable, 0, 0, kt looks quite uninitialized here OpenBSD 7.0-current (GENERIC.MP) #1060: Fri Nov 19 14:39:41 MST 2021 dera...@sparc64.openbsd.org:/usr/src/sys/arch/sparc64/compile/GENERIC.MP real mem = 2147483648 (2048MB) avail mem = 2092793856 (1995MB) random: good seed from bootblocks mpath0 at root scsibus0 at mpath0: 256 targets mainbus0 at root: Sun Enterprise 220R (2 X UltraSPARC-II 450MHz) cpu0 at mainbus0: SUNW,UltraSPARC-II (rev 10.0) @ 450.033 MHz cpu0: physical 16K instruction (32 b/l), 16K data (32 b/l), 4096K external (64 b/l) cpu1 at mainbus0: SUNW,UltraSPARC-II (rev 10.0) @ 450.033 MHz cpu1: physical 16K instruction (32 b/l), 16K data (32 b/l), 4096K external (64 b/l) psycho0 at mainbus0 addr 0xfffb4000: SUNW,psycho, impl 0, version 4, ign 7c0 psycho0: bus range 0-0, PCI bus 0 psycho0: dvma map fe000000-ffffffff, STC0 enabled pci0 at psycho0 ebus0 at pci0 dev 1 function 0 "Sun PCIO EBus2" rev 0x01 auxio0 at ebus0 addr 726000-726003, 728000-728003, 72a000-72a003, 72c000-72c003, 72f000-72f003 power0 at ebus0 addr 724000-724003 "SUNW,pll" at ebus0 addr 504000-504002 not configured uperf0 at ebus0 addr 500000-500007: model SUNW,sc-qp (0/1) ports 9 sab0 at ebus0 addr 400000-40007f ivec 0x2b: rev 3.2 sabtty0 at sab0 port 0: console sabtty1 at sab0 port 1 comkbd0 at ebus0 addr 3083f8-3083ff ivec 0x29: no keyboard comms0 at ebus0 addr 3062f8-3062ff ivec 0x2a wsmouse0 at comms0 mux 0 lpt0 at ebus0 addr 3043bc-3043cb, 300398-300399, 700000-70000f ivec 0x22: polled clock1 at ebus0 addr 0-1fff: mk48t59 "flashprom" at ebus0 addr 0-fffff not configured hme0 at pci0 dev 1 function 1 "Sun HME" rev 0x01: ivec 0x7e1, address 08:00:20:c8:d9:25 luphy0 at hme0 phy 1: LU6612 10/100 PHY, rev. 1 siop0 at pci0 dev 3 function 0 "Symbios Logic 53c875" rev 0x14: ivec 0x7e0, using 4K of on-board RAM scsibus1 at siop0: 16 targets, initiator 7 sd0 at scsibus1 targ 0 lun 0: <IBM, DDYST3695SUN36G, S96H> naa.5005076507ca32bc sd0: 34732MB, 512 bytes/sector, 71132959 sectors sym0 at scsibus1 targ 1 lun 0: <FUJITSU, MAB3091S SUN9.0G, 2107> serial.FUJITSU_MAB3091S_SUN9.0G00D86741_ sd1 at scsibus0 targ 0 lun 0: <FUJITSU, MAB3091S SUN9.0G, 2107> serial.FUJITSU_MAB3091S_SUN9.0G00D86741_ sd1: 8637MB, 512 bytes/sector, 17689267 sectors cd0 at scsibus1 targ 6 lun 0: <TOSHIBA, DVD-ROM SD-M1401, 1007> removable siop1 at pci0 dev 3 function 1 "Symbios Logic 53c875" rev 0x14: ivec 0x7e6, using 4K of on-board RAM scsibus2 at siop1: 16 targets, initiator 7 psycho1 at mainbus0 addr 0xfffc6000: SUNW,psycho, impl 0, version 4, ign 7c0 psycho1: bus range 128-128, PCI bus 128 psycho1: dvma map fe000000-ffffffff, STC0 enabled, STC1 enabled pci1 at psycho1 em0 at pci1 dev 1 function 0 "Intel 82546GB" rev 0x03: ivec 0x7c0, address 00:1b:21:55:ee:f2 em1 at pci1 dev 1 function 1 "Intel 82546GB" rev 0x03: ivec 0x7c1, address 00:1b:21:55:ee:f3 "counter-timer" at mainbus0 addr 0xfff9fc00 not configured dt: 445 probes vscsi0 at root scsibus3 at vscsi0: 256 targets softraid0 at root scsibus4 at softraid0: 256 targets siop0: target 0 now using tagged 16 bit 20.0 MHz 16 REQ/ACK offset xfers siop0: target 1 now using tagged 16 bit 20.0 MHz 16 REQ/ACK offset xfers bootpath: /pci@1f,4000/scsi@3,0/disk@0,0 root on sd0a (b202431ffde80dd8.a) swap on sd0b dump on sd0b