Yup I'll try.  Give me bit of time to find results.

Best Regards,
-peter

On Mon, May 03, 2021 at 08:27:57AM -0600, Theo de Raadt wrote:
> Can you reproduce this, and capture core files?
> 
> Since our tcpdump is a privsep program, getting a core is a bit harder.
> 
> mkdir /var/crash/tcpdump
> echo kern.nosuidcoredump=3 >> /etc/sysctl.conf
> reboot
> 
> You could recompile tcpdump with -g or -ggdb, to gain better symbols.
> 
> If you manage to create a coredump, run gdb against the unstripped
> binary (src/usr.sbin/tcpdump/obj/tcpdump) and let's see what the trace is.
> 
> p...@delphinusdns.org wrote:
> 
> > >Synopsis:  Encountered bus error on tcpdumping a cycled interface
> > >Category:  system
> > >Environment:
> >     System      : OpenBSD 6.9
> >     Details     : OpenBSD 6.9 (GENERIC.MP) #551: Sun Apr 18 03:06:59 MDT 
> > 2021
> >                      
> > dera...@octeon.openbsd.org:/usr/src/sys/arch/octeon/compile/GENERIC.MP
> > 
> >     Architecture: OpenBSD.octeon
> >     Machine     : octeon
> > >Description:
> > I cycled a vlan (vlan6) interface to down and then back to up with ifconfig 
> > to
> > see if there is traffic flowing I tried tcpdumping and encountered a SIGBUS.
> > Here is what I see:
> > 
> > eta# tcpdump -v -n -i vlan6 
> > tcpdump: listening on vlan6, link-type EN10MB
> > Bus error 
> > eta# ifconfig vlan6         
> > vlan6: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
> >         lladdr fc:ec:da:04:8d:69
> >         description: RPI Freifunk Franken VLAN
> >         index 11 priority 0 llprio 3
> >         encap: vnetid 6 parent cnmac1 txprio packet rxprio outer
> >         groups: vlan
> >         media: Ethernet autoselect (1000baseT full-duplex)
> >         status: active
> >         inet 192.168.36.1 netmask 0xffffff00 broadcast 192.168.36.255
> > 
> > A particular ktrace/kdump revealed this:
> > 
> >  47271 tcpdump  RET   fstat 0
> >  47271 tcpdump  CALL  
> > mmap(0,0x10000,0x3<PROT_READ|PROT_WRITE>,0x1002<MAP_PRIVATE|MAP_ANON>,-1,0)
> >  47271 tcpdump  RET   mmap 252174057472/0x3ab6bec000
> >  47271 tcpdump  CALL  fcntl(1,F_ISATTY)
> >  47271 tcpdump  RET   fcntl 1
> >  47271 tcpdump  PSIG  SIGBUS SIG_DFL code BUS_ADRALN<1> addr=0x39f0f3c04c 
> > trapno=0
> > 
> > I assume the fcntl(... could be an isatty(3).
> > >How-To-Repeat:
> >     No idea, I only upgraded this router today and added some networking 
> > including wireguard tunnels.
> > >Fix:
> > Not provided.  There is mention in comments at:
> > 
> > /usr/src/sys/arch/mips64/mips64/trap.c under BUS_ADRALN that this may be an
> > unaligned memory access.
> > 
> > 
> > dmesg:
> > OpenBSD 6.9 (GENERIC.MP) #551: Sun Apr 18 03:06:59 MDT 2021
> >     dera...@octeon.openbsd.org:/usr/src/sys/arch/octeon/compile/GENERIC.MP
> > real mem = 536870912 (512MB)
> > avail mem = 521322496 (497MB)
> > random: good seed from bootblocks
> > mainbus0 at root: board 20004 rev 0.16, model CN3xxx/CN5xxx
> > cpu0 at mainbus0: CN50xx CPU rev 0.1 500 MHz, Software FP emulation
> > cpu0: cache L1-I 32KB 4 way D 16KB 64 way, L2 128KB 8 way
> > cpu1 at mainbus0: CN50xx CPU rev 0.1 500 MHz, Software FP emulation
> > cpu1: cache L1-I 32KB 4 way D 16KB 64 way, L2 128KB 8 way
> > clock0 at mainbus0: int 5
> > octcrypto0 at mainbus0
> > iobus0 at mainbus0
> > simplebus0 at iobus0: "soc"
> > octciu0 at simplebus0
> > octsmi0 at simplebus0
> > octpip0 at simplebus0
> > octgmx0 at octpip0 interface 0
> > cnmac0 at octgmx0: port 0 RGMII, address fc:ec:da:04:8d:68
> > atphy0 at cnmac0 phy 7: AR8035 10/100/1000 PHY, rev. 2
> > cnmac1 at octgmx0: port 1 RGMII, address fc:ec:da:04:8d:69
> > atphy1 at cnmac1 phy 6: AR8035 10/100/1000 PHY, rev. 2
> > cnmac2 at octgmx0: port 2 RGMII, address fc:ec:da:04:8d:6a
> > atphy2 at cnmac2 phy 5: AR8035 10/100/1000 PHY, rev. 2
> > com0 at simplebus0: ns16550a, 64 byte fifo
> > com0: console
> > dwctwo0 at iobus0 base 0x1180068000000 irq 56
> > usb0 at dwctwo0: USB revision 2.0
> > uhub0 at usb0 configuration 1 interface 0 "Octeon DWC2 root hub" rev 
> > 2.00/1.00 addr 1
> > octrng0 at iobus0 base 0x1400000000000 irq 0
> > umass0 at uhub0 port 1 configuration 1 interface 0 " UDinfo UF2 4GB" rev 
> > 2.00/1.00 addr 2
> > umass0: using SCSI over Bulk-Only
> > scsibus0 at umass0: 2 targets, initiator 0
> > sd0 at scsibus0 targ 1 lun 0: <, UDinfo UF2 4GB, PMAP> removable 
> > serial.13fe420077C9177D2781
> > sd0: 3824MB, 512 bytes/sector, 7831552 sectors
> > vscsi0 at root
> > scsibus1 at vscsi0: 256 targets
> > softraid0 at root
> > scsibus2 at softraid0: 256 targets
> > root on sd0a (d5ffec0c72cad730.a) swap on sd0b dump on sd0b
> > WARNING: CHECK AND RESET THE DATE!
> > 
> > usbdevs:
> > Controller /dev/usb0:
> > addr 01: 0000:0000 Octeon, DWC2 root hub
> >      high speed, self powered, config 1, rev 1.00
> >      driver: uhub0
> > addr 02: 13fe:4200 , UDinfo UF2 4GB
> >      high speed, power 200 mA, config 1, rev 1.00, iSerial 070877C9177D2781
> >      driver: umass0
> > 
> > pcidump:
> > 
> > acpidump:
> > 

Reply via email to