bridge - kernel: protection fault trap

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

bridge - kernel: protection fault trap

Hrvoje Popovski
Hi all,

if i have bridge with rstp on interfaces and rstp on switch and i want
to disable rstp on openbsd interfaces i'm getting fault trap. I can
reproduce it on 6.4 and on -current.
i can't reproduce it if i don't have rstp on switch.

without stp:
ifconfig bridge0
bridge0: flags=41<UP,RUNNING>
        index 16 llprio 3
        groups: bridge
        priority 32768 hellotime 2 fwddelay 15 maxage 20 holdcnt 6 proto
rstp
        designated: id 00:00:00:00:00:00 priority 0
        ix1 flags=3<LEARNING,DISCOVER>
                port 6 ifpriority 0 ifcost 0
        ix0 flags=3<LEARNING,DISCOVER>
                port 5 ifpriority 0 ifcost 0
        Addresses (max cache: 100, timeout: 240):
                00:01:e8:8a:ea:53 ix1 1 flags=0<>


adding stp:
ifconfig bridge0 stp ix0
ifconfig bridge0 stp ix1


with stp:
ifconfig bridge0
bridge0: flags=41<UP,RUNNING>
        index 16 llprio 3
        groups: bridge
        priority 32768 hellotime 2 fwddelay 15 maxage 20 holdcnt 6 proto
rstp
        designated: id 00:01:e8:8a:ea:51 priority 4096
        ix1 flags=eb<LEARNING,DISCOVER,STP,AUTOEDGE,PTP,AUTOPTP>
                port 6 ifpriority 128 ifcost 2000 forwarding role root
        ix0 flags=eb<LEARNING,DISCOVER,STP,AUTOEDGE,PTP,AUTOPTP>
                port 5 ifpriority 128 ifcost 2000 discarding role designated
        Addresses (max cache: 100, timeout: 240):
                00:01:e8:8a:ea:53 ix1 1 flags=0<>

removing stp:
ifconfig bridge0 -stp ix1
ifconfig bridge0 -stp ix0
ifconfig bridge0

bridge0: flags=4kernel: protection fault trap, code=0
Stopped at      bridge_ioctl+0x261:     movzwl  0xb8(%rax),%eax
ddb{3}>

ddb{3}> trace
bridge_ioctl(ffff800000aa1000,c0406958,ffff800025bd6bd0) at
bridge_ioctl+0x261
ifioctl(fffffd8784022aa8,c0406958,ffff800025bd6bd0,ffff8000fffee4d0) at
ifioctl+0x2e1
sys_ioctl(ffff8000fffee4d0,ffff800025bd6cf0,ffff800025bd6d60) at
sys_ioctl+0x3c4
syscall(ffff800025bd6dd0) at syscall+0x2d5
Xsyscall(6,36,7f7ffffde790,36,7f7ffffde210,18225470c53f) at Xsyscall+0x128
end of kernel
end trace frame: 0x7f7ffffde270, count: -5
ddb{3}>

ddb{3}>
   PID     TID   PPID    UID  S       FLAGS  WAIT          COMMAND
*55886  308234  66713      0  7         0x3                ifconfig
 66713  345755      1      0  3    0x10008b  pause         ksh
  7461   31997      1      0  3    0x100083  ttyin         getty
 22177   87510      1      0  3    0x100083  ttyin         getty
 20685  125033      1      0  3    0x100083  ttyin         getty
 79645   24027      1      0  3    0x100083  ttyin         getty
 72767  435743      1      0  3    0x100083  ttyin         getty
 56047  223999      1      0  3    0x100098  poll          cron
 86802  202685  90457     95  3    0x100092  kqread        smtpd
 39463   23401  90457    103  3    0x100092  kqread        smtpd
 21936  146002  90457     95  3    0x100092  kqread        smtpd
 48669  160377  90457     95  3    0x100092  kqread        smtpd
  8199  501136  90457     95  3    0x100092  kqread        smtpd
 66911  252509  90457     95  3    0x100092  kqread        smtpd
 90457  165146      1      0  3    0x100080  kqread        smtpd
 80838  244446      1      0  3        0x80  select        sshd
  7314  147029  42319     83  3    0x100092  poll          ntpd
 42319  305633  90866     83  3    0x100092  poll          ntpd
 90866  362050      1      0  3    0x100080  poll          ntpd
 40754  271731  94578     73  3    0x100090  kqread        syslogd
 94578  399581      1      0  3    0x100082  netio         syslogd
  6776  453015      0      0  3     0x14200  pgzero        zerothread
 40229  440582      0      0  3     0x14200  aiodoned      aiodoned
 89774  492529      0      0  3     0x14200  syncer        update
  5289  281014      0      0  3     0x14200  cleaner       cleaner
  9808  159401      0      0  3     0x14200  reaper        reaper
 99897  416122      0      0  3     0x14200  pgdaemon      pagedaemon
 43925  417725      0      0  3     0x14200  bored         crynlk
 60223   56597      0      0  3     0x14200  bored         crypto
 22610  160071      0      0  3     0x14200  usbtsk        usbtask
 82062  178764      0      0  3     0x14200  usbatsk       usbatsk
 96949  136805      0      0  3  0x40014200  acpi0         acpi0
 65299  409852      0      0  7  0x40014200                idle7
   168  421352      0      0  7  0x40014200                idle6
  6356  152661      0      0  7  0x40014200                idle5
 17445  298110      0      0  7  0x40014200                idle4
 15944  462888      0      0  3  0x40014200                idle3
 41395  208079      0      0  7  0x40014200                idle2
  9701   97013      0      0  7  0x40014200                idle1
 82809  149208      0      0  3     0x14200  bored         sensors
  4024   97178      0      0  3     0x14200  bored         softnet
 38198  316937      0      0  3     0x14200  bored         systqmp
 68173  287378      0      0  3     0x14200  bored         systq
 98244  216089      0      0  3  0x40014200  bored         softclock
 83946  336743      0      0  7  0x40014200                idle0
 46799   53752      0      0  3     0x14200  bored         smr
     1  179943      0      0  3        0x82  wait          init
     0       0     -1      0  3     0x10200  scheduler     swapper

ddb{3}> tr /t 0x308234
uvm_fault(0xfffffd887f16b420, 0x30823c, 0, 1) -> e
kernel: page fault trap, code=0
Faulted in DDB; continuing...
ddb{3}>



OpenBSD 6.5-current (GENERIC.MP) #41: Sun Apr 28 18:08:23 MDT 2019
    [hidden email]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 34314461184 (32724MB)
avail mem = 33264451584 (31723MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0x7e67b000 (84 entries)
bios0: vendor IBM version "-[D7E168BUS-2.90]-" date 01/15/2019
bios0: IBM IBM System x3550 M4 -[791425Z]-
acpi0 at bios0: rev 2
acpi0: sleep states S0 S5
acpi0: tables DSDT FACP TCPA ERST HEST HPET APIC MCFG OEM1 SLIT SLIC
SSDT SSDT SSDT SSDT DMAR
acpi0: wakeup devices MRP1(S4) DCC0(S4) MRP3(S4) MRP5(S4) EHC2(S5)
PEX0(S5) PEX7(S5) EHC1(S5) IP2P(S3) MRPB(S4) MRPC(S4) MRPD(S4) MRPF(S4)
MRPG(S4) MRPH(S4) MRPI(S4) [...]
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 14318179 Hz
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Xeon(R) CPU E5-2620 v2 @ 2.10GHz, 2400.32 MHz, 06-3e-04
cpu0:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,DCA,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 100MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.1, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Xeon(R) CPU E5-2620 v2 @ 2.10GHz, 2400.01 MHz, 06-3e-04
cpu1:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,DCA,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 0, core 1, package 0
cpu2 at mainbus0: apid 8 (application processor)
cpu2: Intel(R) Xeon(R) CPU E5-2620 v2 @ 2.10GHz, 2400.01 MHz, 06-3e-04
cpu2:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,DCA,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 0, core 4, package 0
cpu3 at mainbus0: apid 10 (application processor)
cpu3: Intel(R) Xeon(R) CPU E5-2620 v2 @ 2.10GHz, 2400.01 MHz, 06-3e-04
cpu3:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,DCA,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 0, core 5, package 0
cpu4 at mainbus0: apid 32 (application processor)
cpu4: Intel(R) Xeon(R) CPU E5-2620 v2 @ 2.10GHz, 2400.01 MHz, 06-3e-04
cpu4:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,DCA,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu4: 256KB 64b/line 8-way L2 cache
cpu4: smt 0, core 0, package 1
cpu5 at mainbus0: apid 34 (application processor)
cpu5: Intel(R) Xeon(R) CPU E5-2620 v2 @ 2.10GHz, 2400.01 MHz, 06-3e-04
cpu5:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,DCA,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu5: 256KB 64b/line 8-way L2 cache
cpu5: smt 0, core 1, package 1
cpu6 at mainbus0: apid 40 (application processor)
cpu6: Intel(R) Xeon(R) CPU E5-2620 v2 @ 2.10GHz, 2400.01 MHz, 06-3e-04
cpu6:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,DCA,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu6: 256KB 64b/line 8-way L2 cache
cpu6: smt 0, core 4, package 1
cpu7 at mainbus0: apid 42 (application processor)
cpu7: Intel(R) Xeon(R) CPU E5-2620 v2 @ 2.10GHz, 2400.01 MHz, 06-3e-04
cpu7:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,DCA,SSE4.1,SSE4.2,x2APIC,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,PERF,ITSC,FSGSBASE,SMEP,ERMS,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu7: 256KB 64b/line 8-way L2 cache
cpu7: smt 0, core 5, package 1
ioapic0 at mainbus0: apid 8 pa 0xfec00000, version 20, 24 pins
ioapic1 at mainbus0: apid 9 pa 0xfec01000, version 20, 24 pins
ioapic2 at mainbus0: apid 10 pa 0xfec40000, version 20, 24 pins
acpimcfg0 at acpi0
acpimcfg0: addr 0x80000000, bus 0-255
acpiprt0 at acpi0: bus 0 (IOH0)
acpiprt1 at acpi0: bus 12 (MRP1)
acpiprt2 at acpi0: bus 17 (DCC0)
acpiprt3 at acpi0: bus 22 (MRP3)
acpiprt4 at acpi0: bus 27 (MRP5)
acpiprt5 at acpi0: bus 6 (PEX0)
acpiprt6 at acpi0: bus 128 (IOH1)
acpiprt7 at acpi0: bus 134 (MRPD)
acpicpu0 at acpi0: C2(500@59 mwait.3@0x10), C1(1000@3 mwait.1)
acpicpu1 at acpi0: C2(500@59 mwait.3@0x10), C1(1000@3 mwait.1)
acpicpu2 at acpi0: C2(500@59 mwait.3@0x10), C1(1000@3 mwait.1)
acpicpu3 at acpi0: C2(500@59 mwait.3@0x10), C1(1000@3 mwait.1)
acpicpu4 at acpi0: C2(500@59 mwait.3@0x10), C1(1000@3 mwait.1)
acpicpu5 at acpi0: C2(500@59 mwait.3@0x10), C1(1000@3 mwait.1)
acpicpu6 at acpi0: C2(500@59 mwait.3@0x10), C1(1000@3 mwait.1)
acpicpu7 at acpi0: C2(500@59 mwait.3@0x10), C1(1000@3 mwait.1)
acpipci0 at acpi0 IOH0: 0x00000010 0x00000011 0x00000000
"PNP0003" at acpi0 not configured
acpicmos0 at acpi0
tpm0 at acpi0: TPM_ addr 0xfed40000/0x5000: WEC WPCT200 rev 0x47
acpipci1 at acpi0 IOH1: 0x00000010 0x00000011 0x00000000
ipmi at mainbus0 not configured
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel E5 v2 Host" rev 0x04
ppb0 at pci0 dev 1 function 0 "Intel E5 v2 PCIE" rev 0x04: msi
pci1 at ppb0 bus 12
12:0:0: mem address conflict 0xfff80000/0x80000
12:0:1: mem address conflict 0xfff80000/0x80000
12:0:2: mem address conflict 0xfff80000/0x80000
12:0:3: mem address conflict 0xfff80000/0x80000
ixl0 at pci1 dev 0 function 0 "Intel X710 SFP+" rev 0x01: port 3, FW
6.1.49420 API 1.7, msi, address 3c:fd:fe:b3:26:c0
ixl1 at pci1 dev 0 function 1 "Intel X710 SFP+" rev 0x01: port 2, FW
6.1.49420 API 1.7, msi, address 3c:fd:fe:b3:26:c1
ixl2 at pci1 dev 0 function 2 "Intel X710 SFP+" rev 0x01: port 0, FW
6.1.49420 API 1.7, msi, address 3c:fd:fe:b3:26:c2
ixl3 at pci1 dev 0 function 3 "Intel X710 SFP+" rev 0x01: port 1, FW
6.1.49420 API 1.7, msi, address 3c:fd:fe:b3:26:c3
ppb1 at pci0 dev 2 function 0 "Intel E5 v2 PCIE" rev 0x04: msi
pci2 at ppb1 bus 17
ppb2 at pci2 dev 0 function 0 "IDT 89HPES24T3G2" rev 0x02
pci3 at ppb2 bus 18
ppb3 at pci3 dev 2 function 0 "IDT 89HPES24T3G2" rev 0x02
pci4 at ppb3 bus 19
19:0:0: mem address conflict 0xfff80000/0x80000
myx0 at pci4 dev 0 function 0 "Myricom Z8E" rev 0x01: msi, model
10G-PCIE2-8BL2-2S, address 00:60:dd:45:ba:f8
ppb4 at pci3 dev 4 function 0 "IDT 89HPES24T3G2" rev 0x02
pci5 at ppb4 bus 20
20:0:0: mem address conflict 0xfff80000/0x80000
myx1 at pci5 dev 0 function 0 "Myricom Z8E" rev 0x01: msi, model
10G-PCIE2-8BL2-2S, address 00:60:dd:45:ba:f9
ppb5 at pci0 dev 3 function 0 "Intel E5 v2 PCIE" rev 0x04: msi
pci6 at ppb5 bus 22
22:0:0: mem address conflict 0xfff80000/0x80000
22:0:1: mem address conflict 0xfff80000/0x80000
ix0 at pci6 dev 0 function 0 "Intel 82599" rev 0x01: msi, address
a0:36:9f:2e:96:a0
ix1 at pci6 dev 0 function 1 "Intel 82599" rev 0x01: msi, address
a0:36:9f:2e:96:a1
ppb6 at pci0 dev 3 function 2 "Intel E5 v2 PCIE" rev 0x04: msi
pci7 at ppb6 bus 27
mfii0 at pci7 dev 0 function 0 "Symbios Logic MegaRAID SAS2208" rev
0x05: msi
mfii0: "ServeRAID M5110", firmware 23.34.0-0023, 512MB cache
scsibus1 at mfii0: 64 targets
sd0 at scsibus1 targ 0 lun 0: <IBM, ServeRAID M5110, 3.46> SCSI3
0/direct fixed naa.600605b006c3a0b01a582bd010e4c053
sd0: 952720MB, 512 bytes/sector, 1951170560 sectors
scsibus2 at mfii0: 256 targets
"Intel E5 v2 I/OAT" rev 0x04 at pci0 dev 4 function 0 not configured
"Intel E5 v2 I/OAT" rev 0x04 at pci0 dev 4 function 1 not configured
"Intel E5 v2 I/OAT" rev 0x04 at pci0 dev 4 function 2 not configured
"Intel E5 v2 I/OAT" rev 0x04 at pci0 dev 4 function 3 not configured
"Intel E5 v2 I/OAT" rev 0x04 at pci0 dev 4 function 4 not configured
"Intel E5 v2 I/OAT" rev 0x04 at pci0 dev 4 function 5 not configured
"Intel E5 v2 I/OAT" rev 0x04 at pci0 dev 4 function 6 not configured
"Intel E5 v2 I/OAT" rev 0x04 at pci0 dev 4 function 7 not configured
"Intel E5 v2 Address Map" rev 0x04 at pci0 dev 5 function 0 not configured
"Intel E5 v2 IIO RAS" rev 0x04 at pci0 dev 5 function 2 not configured
ppb7 at pci0 dev 17 function 0 "Intel C600 Virtual PCIE" rev 0x06
pci8 at ppb7 bus 32
ehci0 at pci0 dev 26 function 0 "Intel C600 USB" rev 0x06: apic 8 int 19
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 configuration 1 interface 0 "Intel EHCI root hub" rev
2.00/1.00 addr 1
ppb8 at pci0 dev 28 function 0 "Intel C600 PCIE" rev 0xb6: msi
pci9 at ppb8 bus 6
em0 at pci9 dev 0 function 0 "Intel I350" rev 0x01: msi, address
40:f2:e9:ec:b4:12
em1 at pci9 dev 0 function 1 "Intel I350" rev 0x01: msi, address
40:f2:e9:ec:b4:13
em2 at pci9 dev 0 function 2 "Intel I350" rev 0x01: msi, address
40:f2:e9:ec:b4:14
em3 at pci9 dev 0 function 3 "Intel I350" rev 0x01: msi, address
40:f2:e9:ec:b4:15
ppb9 at pci0 dev 28 function 7 "Intel C600 PCIE" rev 0xb6: msi
pci10 at ppb9 bus 1
ppb10 at pci10 dev 0 function 0 "Renesas SH7757 PCIE Switch" rev 0x00
pci11 at ppb10 bus 2
ppb11 at pci11 dev 0 function 0 "Renesas SH7757 PCIE Switch" rev 0x00
pci12 at ppb11 bus 3
ppb12 at pci12 dev 0 function 0 "Renesas SH7757 PCIE-PCI" rev 0x00
pci13 at ppb12 bus 4
vga1 at pci13 dev 0 function 0 "Matrox MGA G200eR" rev 0x00
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
ppb13 at pci11 dev 1 function 0 "Renesas SH7757 PCIE Switch" rev 0x00
pci14 at ppb13 bus 5
ehci1 at pci0 dev 29 function 0 "Intel C600 USB" rev 0x06: apic 8 int 23
usb1 at ehci1: USB revision 2.0
uhub1 at usb1 configuration 1 interface 0 "Intel EHCI root hub" rev
2.00/1.00 addr 1
ppb14 at pci0 dev 30 function 0 "Intel 82801BA Hub-to-PCI" rev 0xa6
pci15 at ppb14 bus 33
pcib0 at pci0 dev 31 function 0 "Intel C600 LPC" rev 0x06
ichiic0 at pci0 dev 31 function 3 "Intel C600 SMBus" rev 0x06: apic 8 int 11
iic0 at ichiic0
isa0 at pcib0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
com0: console
com1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
pckbc0 at isa0 port 0x60/5 irq 1 irq 12
pckbd0 at pckbc0 (kbd slot)
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
pci16 at mainbus0 bus 128
128:4:0: mem address conflict 0x90000000/0x4000
128:4:1: mem address conflict 0x90004000/0x4000
128:4:2: mem address conflict 0x90008000/0x4000
128:4:3: mem address conflict 0x9000c000/0x4000
128:4:4: mem address conflict 0x90010000/0x4000
128:4:5: mem address conflict 0x90014000/0x4000
128:4:6: mem address conflict 0x90018000/0x4000
128:4:7: mem address conflict 0x9001c000/0x4000
ppb15 at pci16 dev 0 function 0 "Intel E5 v2 PCIE" rev 0x04
pci17 at ppb15 bus 129
ppb16 at pci16 dev 2 function 0 "Intel E5 v2 PCIE" rev 0x04: msi
pci18 at ppb16 bus 134
"Intel E5 v2 I/OAT" rev 0x04 at pci16 dev 4 function 0 not configured
"Intel E5 v2 I/OAT" rev 0x04 at pci16 dev 4 function 1 not configured
"Intel E5 v2 I/OAT" rev 0x04 at pci16 dev 4 function 2 not configured
"Intel E5 v2 I/OAT" rev 0x04 at pci16 dev 4 function 3 not configured
"Intel E5 v2 I/OAT" rev 0x04 at pci16 dev 4 function 4 not configured
"Intel E5 v2 I/OAT" rev 0x04 at pci16 dev 4 function 5 not configured
"Intel E5 v2 I/OAT" rev 0x04 at pci16 dev 4 function 6 not configured
"Intel E5 v2 I/OAT" rev 0x04 at pci16 dev 4 function 7 not configured
"Intel E5 v2 Address Map" rev 0x04 at pci16 dev 5 function 0 not configured
"Intel E5 v2 IIO RAS" rev 0x04 at pci16 dev 5 function 2 not configured
vmm0 at mainbus0: VMX/EPT
uhub2 at uhub0 port 1 configuration 1 interface 0 "Intel Rate Matching
Hub" rev 2.00/0.00 addr 2
uhub3 at uhub1 port 1 configuration 1 interface 0 "Intel Rate Matching
Hub" rev 2.00/0.00 addr 2
uhub4 at uhub3 port 1 configuration 1 interface 0 "no manufacturer
Gadget USB HUB" rev 2.00/0.00 addr 3
uhub4: device problem, disabling port 1
umass0 at uhub4 port 3 configuration 1 interface 0 "Avocent Mass Storage
Function" rev 2.00/0.00 addr 4
umass0: using SCSI over Bulk-Only
scsibus3 at umass0: 2 targets, initiator 0
cd0 at scsibus3 targ 1 lun 0: <IMM, Virtual Media, 0325> SCSI0 5/cdrom
removable
urndis0 at uhub4 port 5 configuration 2 interface 0 "IBM RNDIS/Ethernet
Gadget" rev 2.00/3.25 addr 5
urndis0: using Vendor, address 42:f2:e9:ec:b4:11
vscsi0 at root
scsibus4 at vscsi0: 256 targets
softraid0 at root
scsibus5 at softraid0: 256 targets
root on sd0a (f3d5a8c6eefbbedf.a) swap on sd0b dump on sd0b
uhidev0 at uhub4 port 1 configuration 1 interface 0 "Avocent
Keyboard/Mouse Function" rev 2.00/0.00 addr 6
uhidev0: iclass 3/1
ukbd0 at uhidev0: 8 variable keys, 6 key codes
wskbd1 at ukbd0 mux 1
wskbd1: connecting to wsdisplay0
uhidev1 at uhub4 port 1 configuration 1 interface 1 "Avocent
Keyboard/Mouse Function" rev 2.00/0.00 addr 6
uhidev1: iclass 3/1
ums0 at uhidev1: 3 buttons, Z dir
wsmouse0 at ums0 mux 0
uhidev2 at uhub4 port 1 configuration 1 interface 2 "Avocent
Keyboard/Mouse Function" rev 2.00/0.00 addr 6
uhidev2: iclass 3/1
ums1 at uhidev2: 3 buttons, Z dir
wsmouse1 at ums1 mux 0

Reply | Threaded
Open this post in threaded view
|

Re: bridge - kernel: protection fault trap

Hrvoje Popovski
On 30.4.2019. 14:45, Hrvoje Popovski wrote:
> Hi all,
>
> if i have bridge with rstp on interfaces and rstp on switch and i want
> to disable rstp on openbsd interfaces i'm getting fault trap.

i suck so much at describing the problem ....
problem is executing "ifconfig bridge0" after removing stp from
interfaces in bridge ...

Reply | Threaded
Open this post in threaded view
|

Re: bridge - kernel: protection fault trap

Martin Pieuchot
In reply to this post by Hrvoje Popovski
On 30/04/19(Tue) 14:45, Hrvoje Popovski wrote:
> Hi all,
>
> if i have bridge with rstp on interfaces and rstp on switch and i want
> to disable rstp on openbsd interfaces i'm getting fault trap. I can
> reproduce it on 6.4 and on -current.
> i can't reproduce it if i don't have rstp on switch.

Seems that `bs_root_port' isn't reset.  Does the diff below help?

Index: net/bridgestp.c
===================================================================
RCS file: /cvs/src/sys/net/bridgestp.c,v
retrieving revision 1.69
diff -u -p -r1.69 bridgestp.c
--- net/bridgestp.c 28 Apr 2019 22:15:57 -0000 1.69
+++ net/bridgestp.c 30 Apr 2019 21:39:25 -0000
@@ -252,6 +252,7 @@ void bstp_set_port_proto(struct bstp_por
 void bstp_set_port_tc(struct bstp_port *, int);
 void bstp_set_timer_tc(struct bstp_port *);
 void bstp_set_timer_msgage(struct bstp_port *);
+void bstp_reset(struct bstp_state *);
 int bstp_rerooted(struct bstp_state *, struct bstp_port *);
 u_int32_t bstp_calc_path_cost(struct bstp_port *);
 void bstp_notify_rtage(struct bstp_port *, int);
@@ -874,11 +875,8 @@ bstp_info_superior(struct bstp_pri_vecto
 }
 
 void
-bstp_assign_roles(struct bstp_state *bs)
+bstp_reset(struct bstp_state *bs)
 {
- struct bstp_port *bp, *rbp = NULL;
- struct bstp_pri_vector pv;
-
  /* default to our priority vector */
  bs->bs_root_pv = bs->bs_bridge_pv;
  bs->bs_root_msg_age = 0;
@@ -886,6 +884,15 @@ bstp_assign_roles(struct bstp_state *bs)
  bs->bs_root_fdelay = bs->bs_bridge_fdelay;
  bs->bs_root_htime = bs->bs_bridge_htime;
  bs->bs_root_port = NULL;
+}
+
+void
+bstp_assign_roles(struct bstp_state *bs)
+{
+ struct bstp_port *bp, *rbp = NULL;
+ struct bstp_pri_vector pv;
+
+ bstp_reset(bs);
 
  /* check if any received info supersedes us */
  LIST_FOREACH(bp, &bs->bs_bplist, bp_next) {
@@ -1838,6 +1845,7 @@ bstp_initialization(struct bstp_state *b
 
  if (LIST_EMPTY(&bs->bs_bplist)) {
  bstp_stop(bs);
+ bstp_reset(bs);
  return;
  }
 

Reply | Threaded
Open this post in threaded view
|

Re: bridge - kernel: protection fault trap

Hrvoje Popovski
On 30.4.2019. 23:40, Martin Pieuchot wrote:

> On 30/04/19(Tue) 14:45, Hrvoje Popovski wrote:
>> Hi all,
>>
>> if i have bridge with rstp on interfaces and rstp on switch and i want
>> to disable rstp on openbsd interfaces i'm getting fault trap. I can
>> reproduce it on 6.4 and on -current.
>> i can't reproduce it if i don't have rstp on switch.
>
> Seems that `bs_root_port' isn't reset.  Does the diff below help?
>

Hi,

yes, it helps. i can't reproduce trap with ifconfig bridge0 after
removing stp from interfaces in bridge. But now if i destroy bridge0
after removing stp from interfaces box freeze and if in second terminal
i execute reboot i'm getting same or similar trap. i didn't try ifconfig
bridge0 destroy without this diff ..



bridge0: flags=41<UP,RUNNING>
        index 18 llprio 3
        groups: bridge
        priority 32768 hellotime 2 fwddelay 15 maxage 20 holdcnt 6 proto
rstp
        ix1 flags=eb<LEARNING,DISCOVER,STP,AUTOEDGE,PTP,AUTOPTP>
                port 6 ifpriority 128 ifcost 2000 learning role root
        ix0 flags=eb<LEARNING,DISCOVER,STP,AUTOEDGE,PTP,AUTOPTP>
                port 5 ifpriority 128 ifcost 2000 discarding role alternate
x3550m4# ifconfig bridge0 -stp ix0
x3550m4# ifconfig bridge0 -stp ix1
x3550m4# ifconfig bridge0
bridge0: flags=41<UP,RUNNING>
        index 18 llprio 3
        groups: bridge
        priority 32768 hellotime 2 fwddelay 15 maxage 20 holdcnt 6 proto
rstp
        designated: id a0:36:9f:2e:96:a1 priority 32768
        ix1 flags=e3<LEARNING,DISCOVER,AUTOEDGE,PTP,AUTOPTP>
                port 6 ifpriority 0 ifcost 0
        ix0 flags=e3<LEARNING,DISCOVER,AUTOEDGE,PTP,AUTOPTP>
                port 5 ifpriority 0 ifcost 0
        Addresses (max cache: 100, timeout: 240):
                00:01:e8:8a:ea:53 ix1 1 flags=0<>
x3550m4# ifconfig bridge0 destroy

after this box freeze and when trying to reboot in other terminal i'm
getting this:

uvm_fault(0xfffffd87845eae78, 0x50, 0, 1) -> e
kernel: page fault trap, code=0
Stopped at      bridge_ioctl+0x25d:     movq    0x10(%rax),%rax

ddb{5}> trace
bridge_ioctl(ffff800000aa1000,c0406958,ffff800025c803c0) at
bridge_ioctl+0x25d
ifioctl(fffffd8784f154a8,c0406958,ffff800025c803c0,ffff8000fffef790) at
ifioctl+0x2e1
sys_ioctl(ffff8000fffef790,ffff800025c804e0,ffff800025c80550) at
sys_ioctl+0x3c4
syscall(ffff800025c805c0) at syscall+0x2d5
Xsyscall(6,36,7f7ffffbdd60,36,7f7ffffbd7e0,1120dda0c53f) at Xsyscall+0x128
end of kernel
end trace frame: 0x7f7ffffbd840, count: -5
ddb{5}>

ddb{5}> ps
   PID     TID   PPID    UID  S       FLAGS  WAIT          COMMAND
  8881  355476  58607      0  3    0x100080  piperd        sh
*61948  478931  58607      0  7         0x2                ifconfig
 58607  500143  60114      0  3    0x10008a  pause         sh
 60114  118807   9999      0  3        0x83  wait          reboot
  9999  475759  36533      0  3    0x10008b  pause         ksh
 36533  245986  54582   1000  3    0x10008b  pause         ksh
 54582   88066  51228   1000  3        0x90  select        sshd
 51228  249575  10714      0  3        0x82  poll          sshd
 89349   12679  78679      0  3         0x3  ifidxrm       ifconfig
 78679  494362      1      0  3    0x10008b  pause         ksh
 23063  361819      1      0  3    0x100083  ttyin         getty
  5688  521523      1      0  3    0x100083  ttyin         getty
 10811  485927      1      0  3    0x100083  ttyin         getty
 53603  187259      1      0  3    0x100083  ttyin         getty
 76136  329246      1      0  3    0x100083  ttyin         getty
 37428   18304      1      0  3    0x100098  poll          cron
 35480   87192  93615     95  3    0x100092  kqread        smtpd
 36138    5975  93615    103  3    0x100092  kqread        smtpd
 30067   12755  93615     95  3    0x100092  kqread        smtpd
 93539  274871  93615     95  3    0x100092  kqread        smtpd
 22439  508287  93615     95  3    0x100092  kqread        smtpd
 72080  200916  93615     95  3    0x100092  kqread        smtpd
 93615  356738      1      0  3    0x100080  kqread        smtpd
 10714  370355      1      0  3        0x80  select        sshd
 28735  407225  44481     83  3    0x100092  poll          ntpd
 44481  159120  76739     83  3    0x100092  poll          ntpd
 76739  329789      1      0  3    0x100080  poll          ntpd
 65485  248241  32912     73  7    0x100090                syslogd
 32912  421250      1      0  3    0x100082  netio         syslogd
 96126  242404      0      0  3     0x14200  pgzero        zerothread
 73505  492214      0      0  3     0x14200  aiodoned      aiodoned
 89628  391838      0      0  3     0x14200  syncer        update
 33653  327764      0      0  3     0x14200  cleaner       cleaner
  7953  391928      0      0  3     0x14200  reaper        reaper
 16628    5698      0      0  3     0x14200  pgdaemon      pagedaemon
 29741  351482      0      0  3     0x14200  bored         crynlk
 44734  415647      0      0  3     0x14200  bored         crypto
 36512  227354      0      0  3     0x14200  usbtsk        usbtask
 38180   58616      0      0  3     0x14200  usbatsk       usbatsk
 68175  261381      0      0  3  0x40014200  acpi0         acpi0
 86409  319099      0      0  7  0x40014200                idle7
 72915  237117      0      0  7  0x40014200                idle6
 44894  189254      0      0  3  0x40014200                idle5
 85283  213897      0      0  7  0x40014200                idle4
 82517  192655      0      0  7  0x40014200                idle3
 74089  489161      0      0  7  0x40014200                idle2
 77693  293039      0      0  3  0x40014200                idle1
 36269   92829      0      0  3     0x14200  bored         sensors
 88608  353656      0      0  3     0x14200  bored         softnet
 47764  444115      0      0  3     0x14200  bored         systqmp
 43276  167504      0      0  3     0x14200  bored         systq
 21301  325307      0      0  3  0x40014200  bored         softclock
 42291  286967      0      0  7  0x40014200                idle0
 20269  193379      0      0  3     0x14200  bored         smr
     1   56210      0      0  3        0x82  wait          init
     0       0     -1      0  3     0x10200  scheduler     swapper

ddb{5}> tr /t 0x478931
uvm_fault(0xfffffd87845eae78, 0x478939, 0, 1) -> e
kernel: page fault trap, code=0
Faulted in DDB; continuing...
ddb{5}>

Reply | Threaded
Open this post in threaded view
|

Re: bridge - kernel: protection fault trap

Martin Pieuchot
On 01/05/19(Wed) 09:34, Hrvoje Popovski wrote:

> On 30.4.2019. 23:40, Martin Pieuchot wrote:
> > On 30/04/19(Tue) 14:45, Hrvoje Popovski wrote:
> >> Hi all,
> >>
> >> if i have bridge with rstp on interfaces and rstp on switch and i want
> >> to disable rstp on openbsd interfaces i'm getting fault trap. I can
> >> reproduce it on 6.4 and on -current.
> >> i can't reproduce it if i don't have rstp on switch.
> >
> > Seems that `bs_root_port' isn't reset.  Does the diff below help?
> >
>
> Hi,
>
> yes, it helps. i can't reproduce trap with ifconfig bridge0 after
> removing stp from interfaces in bridge. But now if i destroy bridge0
> after removing stp from interfaces box freeze and if in second terminal
> i execute reboot i'm getting same or similar trap. i didn't try ifconfig
> bridge0 destroy without this diff ..

When it "freezes" on which channel is ifconfig(8) waiting?

Reply | Threaded
Open this post in threaded view
|

Re: bridge - kernel: protection fault trap

Alexander Bluhm
In reply to this post by Hrvoje Popovski
On Wed, May 01, 2019 at 09:34:59AM +0200, Hrvoje Popovski wrote:
> uvm_fault(0xfffffd87845eae78, 0x50, 0, 1) -> e
> kernel: page fault trap, code=0
> Stopped at      bridge_ioctl+0x25d:     movq    0x10(%rax),%rax

I get the same panic during regress.

src/regress/sys/net/etherip hangs during /sbin/ifconfig bridge12 destroy

    0  3082 39335  10  10   0   304   232 ifidxrm D+    p0    0:00.00 /sbin/ifconfig bridge12 destroy

After a timeout this test is aborted and the next test calls ifconfig.
The machine crashes after printing

bridge12: flags=0<> rdomain 12
        index 13 llprio 3

struct bstp_state at sc->sc_stp has been freed.

bluhm

Reply | Threaded
Open this post in threaded view
|

Re: bridge - kernel: protection fault trap

Alexander Bluhm
On Fri, May 03, 2019 at 12:15:44PM +0200, Alexander Bluhm wrote:
>     0  3082 39335  10  10   0   304   232 ifidxrm D+    p0    0:00.00 /sbin/ifconfig bridge12 destroy

Looks like a missing if_put().

ok?

bluhm

Index: net/if_bridge.c
===================================================================
RCS file: /data/mirror/openbsd/cvs/src/sys/net/if_bridge.c,v
retrieving revision 1.328
diff -u -p -r1.328 if_bridge.c
--- net/if_bridge.c 28 Apr 2019 22:15:57 -0000 1.328
+++ net/if_bridge.c 3 May 2019 11:27:44 -0000
@@ -1162,6 +1162,7 @@ bridge_process(struct ifnet *ifp, struct
  bridge_ifinput(ifp, mc);

  bridgeintr_frame(brifp, ifp, m);
+ if_put(brifp);
  return;
  }

Reply | Threaded
Open this post in threaded view
|

Re: bridge - kernel: protection fault trap

Hrvoje Popovski
On 3.5.2019. 13:32, Alexander Bluhm wrote:
> On Fri, May 03, 2019 at 12:15:44PM +0200, Alexander Bluhm wrote:
>>     0  3082 39335  10  10   0   304   232 ifidxrm D+    p0    0:00.00 /sbin/ifconfig bridge12 destroy
> Looks like a missing if_put().

Hi,

with this diff i can't reproduce panic with ifconfig bridge0 destroy
after removing stp from interfaces in bridge ..

Thank you guys ...