[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openbsd-bugs
Subject:    Re: switchd segfaults
From:       Leon Lagodny <leonlagodny () protonmail ! com>
Date:       2019-03-22 9:47:51
Message-ID: 01EuBASWmau51ZCnojqJpzud13MFVH0Guphdahmbo8y889JdMljdmA5Qn0tWFYGYEXhlxsyK7hFTi0SQsuwr3cg0wPcx0sAIRjApN8sMqgE= () protonmail ! com
[Download RAW message or body]

Ok, it took a while for switchd to crash again. Here the output of gdb with debugging \
symbols enabled.

(gdb) bt full
#0  0x00000b62ca3e7a50 in _libc_yp_first (indomain=0xb62cf99f440 "", \
inmap=0xb62eaf445e8 '' <repeats 200 times>..., outkey=0xb62ca3796ff, outkeylen=0x0, \
outval=0xd, outvallen=0x5c0) from /usr/lib/libc.so.92.5  ysd = (struct dom_binding *) \
0xb5f00000001  r = Variable "r" is not available.
(gdb) where
#0  0x00000b62ca3e7a50 in _libc_yp_first (indomain=0xb62cf99f440 "", \
inmap=0xb62eaf445e8 '' <repeats 200 times>..., outkey=0xb62ca3796ff, outkeylen=0x0, \
outval=0xd, outvallen=0x5c0) from /usr/lib/libc.so.92.5 #1  0x00000b62d5e28350 in \
ibuf_add (buf=0xb62cf99f440, data=0x0, len=1494) at \
/usr/src/lib/libutil/imsg-buffer.c:97 #2  0x00000b62d5e26a2e in imsg_add \
(msg=0xb62cf99f440, data=Variable "data" is not available. ) at \
/usr/src/lib/libutil/imsg.c:240 #3  0x00000b5ffe80ab56 in ofp13_packet_in \
(sc=0xb62cf99a4d0, con=0xb6263883c00, ih=Variable "ih" is not available. ) at \
/usr/src/usr.sbin/switchd/ofp13.c:1150 #4  0x00000b5ffe80cb32 in ofp13_input \
(sc=0xb62cf99a4d0, con=0xb6263883c00, oh=0xb624549e000, ibuf=0xb626387da80) at \
/usr/src/usr.sbin/switchd/ofp13.c:621 #5  0x00000b5ffe809672 in ofp_input \
(con=0xb6263883c00, ibuf=0xb626387da80) at /usr/src/usr.sbin/switchd/ofp.c:159 #6  \
0x00000b5ffe811625 in ofrelay_input_done (con=0xb6263883c00, buf=0xb626387da80) at \
/usr/src/usr.sbin/switchd/ofrelay.c:282 #7  0x00000b5ffe811157 in ofrelay_event \
(fd=8, event=2, arg=0xb6263883c00) at /usr/src/usr.sbin/switchd/ofrelay.c:138 #8  \
0x00000b62394a7bbd in event_base_loop (base=0xb6263883400, flags=0) at \
/usr/src/lib/libevent/event.c:350 #9  0x00000b5ffe803a98 in proc_run \
(ps=0xb62cf99a4d0, p=0xb5ffea22000, procs=0xb5ffea22180, nproc=2, run=0xb5ffe809360 \
<ofp_run>, arg=0x0) at /usr/src/usr.sbin/switchd/proc.c:602 #10 0x00000b5ffe802a8b in \
proc_init (ps=Variable "ps" is not available. ) at \
/usr/src/usr.sbin/switchd/proc.c:260 #11 0x00000b5ffe807660 in main (argc=5, \
argv=0x7f7ffffdd658) at /usr/src/usr.sbin/switchd/switchd.c:187

------- Original Message -------
On Friday, March 8, 2019 2:53 AM, Leon Lagodny <leonlagodny@protonmail.com> wrote:

> > Synopsis:     switchd segfaults at random intervals
> > Category:    system
> > Environment:
> System      : OpenBSD 6.4
> Details     : OpenBSD 6.4-stable (CUSTOM) #1: Sun Mar  3 07:52:19 CET 2019
> leon@apu.lan:/usr/src/sys/arch/amd64/compile/CUSTOM
> 
> Architecture: OpenBSD.amd64
> Machine     : amd64
> > Description:
> I've been running an APU2 as my home router.
> Unfortunately switchd crashes at seemingly random intervals causing the interface \
> to stop forwarding packets. Switchd does not log anything related to the crash to \
> /var/log/daemon so I recorded a coredump according to the bgp example in sysctl(8).
> The only thing custom about the kernel I'm running is 'option \
> PPPOE_TERM_UNKNOWN_SESSIONS' and I can confirm that this also happens with the \
> default kernel. 
> gdb:
> (gdb) bt full
> #0  0x000000334fc35af0 in _libc_SHA1Pad (context=0x34336bb5e8) at \
> /usr/src/lib/libc/hash/sha1.c:132 finalcount = 0x7f7ffffc78b8 \
> "\222?8s7\031P\0257\r" i = Cannot access memory at address 0x7
> (gdb) where
> #0  0x000000334fc35af0 in _libc_SHA1Pad (context=0x34336bb5e8) at \
> /usr/src/lib/libc/hash/sha1.c:132 #1  0x0000003422e1c350 in ibuf_add \
> (buf=0x338ead7680, data=0x0, len=1494) at /usr/src/lib/libutil/imsg-buffer.c:97 #2  \
> 0x0000003422e1aa2e in imsg_add (msg=0x338ead7680, data=Variable "data" is not \
> available. ) at /usr/src/lib/libutil/imsg.c:240
> #3  0x000000313390ab56 in ?? () from /usr/sbin/switchd
> #4  0x000000313390cb32 in ?? () from /usr/sbin/switchd
> #5  0x0000003133909672 in ?? () from /usr/sbin/switchd
> #6  0x0000003133911625 in ?? () from /usr/sbin/switchd
> #7  0x0000003133911157 in ?? () from /usr/sbin/switchd
> #8  0x00000034308dbbbd in event_base_loop (base=0x33c2016000, flags=0) at \
> /usr/src/lib/libevent/event.c:350 #9  0x0000003133903a98 in ?? () from \
> /usr/sbin/switchd #10 0x0000003133902a8b in ?? () from /usr/sbin/switchd
> #11 0x0000003133907660 in ?? () from /usr/sbin/switchd
> #12 0x0000003133900b46 in ?? () from /usr/sbin/switchd
> #13 0x0000000000000000 in ?? ()
> 
> /etc/switchd.conf:
> listen on 127.0.0.1 tls port 6633
> device "/dev/switch0"
> 
> /etc/hostname.switch0:
> addlocal vether0
> add em0
> add em1
> up
> 
> /etc/hostname.vether0:
> inet 10.0.1.1 255.255.240.0
> inet alias 10.0.1.2 255.255.240.0
> up
> 
> dmesg:
> OpenBSD 6.4-stable (CUSTOM) #1: Sun Mar  3 07:52:19 CET 2019
> leon@apu.lan:/usr/src/sys/arch/amd64/compile/CUSTOM
> real mem = 4261076992 (4063MB)
> avail mem = 4122771456 (3931MB)
> mpath0 at root
> scsibus0 at mpath0: 256 targets
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xdffb7020 (7 entries)
> bios0: vendor coreboot version "88a4f96" date 03/11/2016
> bios0: PC Engines apu2
> acpi0 at bios0: rev 2
> acpi0: sleep states S0 S1 S2 S3 S4 S5
> acpi0: tables DSDT FACP SSDT APIC HEST SSDT SSDT HPET
> acpi0: wakeup devices PWRB(S4) PBR4(S4) PBR5(S4) PBR6(S4) PBR7(S4) PBR8(S4) \
> UOH1(S3) UOH3(S3) UOH5(S3) XHC0(S4) acpitimer0 at acpi0: 3579545 Hz, 32 bits
> acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
> cpu0 at mainbus0: apid 0 (boot processor)
> cpu0: AMD GX-412TC SOC, 998.26 MHz, 16-30-01
> cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH \
> ,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,X \
> SAVE,AVX,F16C,NXE,MMXX,FFXSR,PAGE1GB,RDTSCP,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,TOPEXT,DBKP,PERFTSC,PCTRL3,ITSC,BMI1,XSAVEOPT
>                 
> cpu0: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 2MB 64b/line 16-way \
>                 L2 cache
> cpu0: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative
> cpu0: DTLB 40 4KB entries fully associative, 8 4MB entries fully associative
> cpu0: smt 0, core 0, package 0
> mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
> cpu0: apic clock running at 99MHz
> cpu0: mwait min=64, max=64, IBE
> cpu at mainbus0: not configured
> cpu at mainbus0: not configured
> cpu at mainbus0: not configured
> ioapic0 at mainbus0: apid 4 pa 0xfec00000, version 21, 24 pins
> ioapic1 at mainbus0: apid 5 pa 0xfec20000, version 21, 32 pins, remapped
> acpihpet0 at acpi0: 14318180 Hz
> acpiprt0 at acpi0: bus 0 (PCI0)
> acpiprt1 at acpi0: bus -1 (PBR4)
> acpiprt2 at acpi0: bus 1 (PBR5)
> acpiprt3 at acpi0: bus 2 (PBR6)
> acpiprt4 at acpi0: bus 3 (PBR7)
> acpiprt5 at acpi0: bus -1 (PBR8)
> acpicpu0 at acpi0: C2(0@400 io@0x1771), C1(@1 halt!), PSS
> acpibtn0 at acpi0: PWRB
> acpicmos0 at acpi0
> cpu0: 998 MHz: speeds: 1000 800 600 MHz
> pci0 at mainbus0 bus 0
> pchb0 at pci0 dev 0 function 0 "AMD AMD64 16h Root Complex" rev 0x00
> pchb1 at pci0 dev 2 function 0 "AMD AMD64 16h Host" rev 0x00
> ppb0 at pci0 dev 2 function 2 "AMD AMD64 16h PCIE" rev 0x00: msi
> pci1 at ppb0 bus 1
> em0 at pci1 dev 0 function 0 "Intel I210" rev 0x03: msi, address 00:0d:b9:46:2b:38
> ppb1 at pci0 dev 2 function 3 "AMD AMD64 16h PCIE" rev 0x00: msi
> pci2 at ppb1 bus 2
> em1 at pci2 dev 0 function 0 "Intel I210" rev 0x03: msi, address 00:0d:b9:46:2b:39
> ppb2 at pci0 dev 2 function 4 "AMD AMD64 16h PCIE" rev 0x00: msi
> pci3 at ppb2 bus 3
> em2 at pci3 dev 0 function 0 "Intel I210" rev 0x03: msi, address 00:0d:b9:46:2b:3a
> ccp0 at pci0 dev 8 function 0 "AMD Cryptographic Co-processor v3" rev 0x00
> xhci0 at pci0 dev 16 function 0 "AMD Bolton xHCI" rev 0x11: msi, xHCI 1.0
> usb0 at xhci0: USB revision 3.0
> uhub0 at usb0 configuration 1 interface 0 "AMD xHCI root hub" rev 3.00/1.00 addr 1
> ahci0 at pci0 dev 17 function 0 "AMD Hudson-2 SATA" rev 0x40: apic 4 int 19, AHCI \
>                 1.3
> ahci0: port 0: 6.0Gb/s
> scsibus1 at ahci0: 32 targets
> sd0 at scsibus1 targ 0 lun 0: <ATA, SATA SSD, SBFM> SCSI3 0/direct fixed \
>                 naa.5000000000000000
> sd0: 15272MB, 512 bytes/sector, 31277232 sectors, thin
> ehci0 at pci0 dev 19 function 0 "AMD Hudson-2 USB2" rev 0x39: apic 4 int 18
> usb1 at ehci0: USB revision 2.0
> uhub1 at usb1 configuration 1 interface 0 "AMD EHCI root hub" rev 2.00/1.00 addr 1
> piixpm0 at pci0 dev 20 function 0 "AMD Hudson-2 SMBus" rev 0x42: SMBus disabled
> pcib0 at pci0 dev 20 function 3 "AMD Hudson-2 LPC" rev 0x11
> sdhc0 at pci0 dev 20 function 7 "AMD Bolton SD/MMC" rev 0x01: apic 4 int 16
> sdhc0: SDHC 2.0, 63 MHz base clock
> sdmmc0 at sdhc0: 4-bit, sd high-speed, mmc high-speed, dma
> pchb2 at pci0 dev 24 function 0 "AMD AMD64 16h Link Cfg" rev 0x00
> pchb3 at pci0 dev 24 function 1 "AMD AMD64 16h Address Map" rev 0x00
> pchb4 at pci0 dev 24 function 2 "AMD AMD64 16h DRAM Cfg" rev 0x00
> km0 at pci0 dev 24 function 3 "AMD AMD64 16h Misc Cfg" rev 0x00
> pchb5 at pci0 dev 24 function 4 "AMD AMD64 16h CPU Power" rev 0x00
> pchb6 at pci0 dev 24 function 5 "AMD AMD64 16h Misc Cfg" rev 0x00
> 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
> pcppi0 at isa0 port 0x61
> spkr0 at pcppi0
> lpt0 at isa0 port 0x378/4 irq 7
> wbsio0 at isa0 port 0x2e/2: NCT5104D rev 0x52
> vmm0 at mainbus0: SVM/RVI
> uhub2 at uhub1 port 1 configuration 1 interface 0 "Advanced Micro Devices product \
> 0x7900" rev 2.00/0.18 addr 2 vscsi0 at root
> scsibus2 at vscsi0: 256 targets
> softraid0 at root
> scsibus3 at softraid0: 256 targets
> root on sd0a (c13267e44c837452.a) swap on sd0b dump on sd0b
> WARNING: / was not properly unmounted
> Process (pid 1) got signal 31
> 
> usbdevs:
> Controller /dev/usb0:
> addr 01: 1022:0000 AMD, xHCI root hub
> super speed, self powered, config 1, rev 1.00
> driver: uhub0
> Controller /dev/usb1:
> addr 01: 1022:0000 AMD, EHCI root hub
> high speed, self powered, config 1, rev 1.00
> driver: uhub1
> addr 02: 0438:7900 Advanced Micro Devices, product 0x7900
> high speed, self powered, config 1, rev 0.18
> driver: uhub2


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic