>Synopsis:      arm64: dwge(4) ifconfig panic
>Category:      kernel panic
>Environment:
        System      : OpenBSD 6.6
        Details     : OpenBSD 6.6-current (GENERIC.MP) #236: Fri Nov  8 
14:46:36 EST 2019
                         
[email protected]:/sys/arch/arm64/compile/GENERIC.MP

        Architecture: OpenBSD.arm64
        Machine     : arm64
>Description:
        kernel panic configuring dwge0 seen occasionally during booting. 
        Can be reproduced via repetitively downing the interface and
        sh /etc/netstart.

rocky# while (ifconfig dwge0 down && sh /etc/netstart) ; do true; done  
dwge0: no link....
dwge0: 172.16.1.125 lease accepted from 172.16.1.1 (18:03:73:ee:47:f1)
dwge0: no link....
dwge0: 172.16.1.125 lease accepted from 172.16.1.1 (18:03:73:ee:47:f1)
dwge0: no link....
dwge0: 172.16.1.125 lease accepted from 172.16.1.1 (18:03:73:ee:47:f1)
dwge0: no link....
dwge0: 172.16.1.125 lease accepted from 172.16.1.1 (18:03:73:ee:47:f1)
dwge0: no link....
dwge0: 172.16.1.125 lease accepted from 172.16.1.1 (18:03:73:ee:47:f1)
dwge0: no link....
dwge0: 172.16.1.125 lease accepted from 172.16.1.1 (18:03:73:ee:47:f1)
panic: uvm_fault failed: ffffff80006e825c
Stopped at      panic+0x150:        TID    PID    UID     PRFLAGS     PFLAGS  C
PU  COMMAND
  21363  39965      0         0x3          0    4  ifconfig
 178271  83357      0     0x14000      0x200    1  softnet
db_enter() at panic+0x14c
panic() at $x.0+0x6c
$x.0() at dwge_tx_proc+0x44
dwge_tx_proc() at dwge_tx_proc+0x44
dwge_tx_proc() at dwge_intr+0x6c
dwge_intr() at agintc_irq_handler+0x224
agintc_irq_handler() at arm_cpu_intr+0x30
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{0}> ps
   PID     TID   PPID    UID  S       FLAGS  WAIT          COMMAND
 39965   21363  77964      0  7         0x3                ifconfig
 77964  471451  51103      0  3    0x10008b  pause         sh
 51103  306722  44182      0  3    0x100089  pause         ksh
 44182  196851      1      0  3    0x10008b  pause         ksh
 77936   78237      1      0  3    0x100098  poll          cron
 18305  408469      1     99  3    0x100090  poll          sndiod
 98304  227983      1    110  3    0x100090  poll          sndiod
 37273  176598  58807     95  3    0x100092  kqread        smtpd
 45139  219423  58807    103  3    0x100092  kqread        smtpd
 32298  406285  58807     95  3    0x100092  kqread        smtpd
 90335  286919  58807     95  3    0x100092  kqread        smtpd
 90365  287524  58807     95  3    0x100092  kqread        smtpd
 19069  203381  58807     95  3    0x100092  kqread        smtpd
 58807  461256      1      0  3    0x100080  kqread        smtpd
 12527  413126      1      0  3        0x80  select        sshd
 40168  297510      1      0  3    0x100080  poll          ntpd
 33505  507395   6511     83  3    0x100092  poll          ntpd
  6511   53445      1     83  3    0x100092  poll          ntpd
 51578  481784  90049     74  3    0x100092  bpf           pflogd
 90049  454441      1      0  3        0x80  netio         pflogd
 88274  178829  91305     73  3    0x100090  kqread        syslogd
 91305  262765      1      0  3    0x100082  netio         syslogd
 17010  457023   7737    115  3    0x100092  kqread        slaacd
 19770  459875   7737    115  3    0x100092  kqread        slaacd
  7737  286827      1      0  3    0x100080  kqread        slaacd
 28810   84478      0      0  3     0x14200  pgzero        zerothread
 36628  206503      0      0  3     0x14200  aiodoned      aiodoned
 32707    1481      0      0  3     0x14200  syncer        update
 91307  236408      0      0  3     0x14200  cleaner       cleaner
 97663   37372      0      0  3     0x14200  reaper        reaper
 83031  166559      0      0  3     0x14200  pgdaemon      pagedaemon
 36179  168021      0      0  3     0x14200  bored         crynlk
 53568  360482      0      0  3     0x14200  bored         crypto
 18772  364519      0      0  3     0x14200  bored         tztq
   372  447906      0      0  7  0x40014200                idle5
 91123  119017      0      0  3  0x40014200                idle4
 99868  163915      0      0  7  0x40014200                idle3
 11382   88112      0      0  7  0x40014200                idle2
 93168  337059      0      0  3  0x40014200                idle1
 99807  342789      0      0  3     0x14200  bored         sensors
  5742  393144      0      0  3     0x14200  usbtsk        usbtask
 51183  445061      0      0  3     0x14200  usbatsk       usbatsk
 23541  240048      0      0  3     0x14200  mmctsk        sdmmc1
 17316  508956      0      0  3     0x14200  mmctsk        sdmmc0
 83357  178271      0      0  7     0x14200                softnet
 90024  510966      0      0  3     0x14200  bored         systqmp
 78342  340610      0      0  3     0x14200  bored         systq
 46887  229329      0      0  3  0x40014200  bored         softclock
* 6453  522171      0      0  7  0x40014200                idle0
 13966  291804      0      0  3     0x14200  bored         smr
 82821  461106      0      0  3     0x14200  kmalloc       kmthread
     1   67151      0      0  3        0x82  wait          init
     0       0     -1      0  3     0x10200  scheduler     swapper
ddb{0}> bt
db_enter() at panic+0x14c
panic() at $x.0+0x6c
$x.0() at dwge_tx_proc+0x44
dwge_tx_proc() at dwge_tx_proc+0x44
dwge_tx_proc() at dwge_intr+0x6c
dwge_intr() at agintc_irq_handler+0x224
agintc_irq_handler() at arm_cpu_intr+0x30
arm_cpu_intr() at handle_el1h_irq+0x6c
handle_el1h_irq() at sched_idle+0x220
sched_idle() at proc_trampoline+0x10
ddb{0}> machine ddbcpu 1
Stopped at      agintc_ipi_ddb+0x1c:    db_enter() at agintc_ipi_ddb+0x18
agintc_ipi_ddb() at arm_cpu_intr+0x30
arm_cpu_intr() at handle_el1h_irq+0x6c
handle_el1h_irq() at timeout_barrier+0x28
timeout_barrier() at timeout_del_barrier+0xb0
timeout_del_barrier() at msleep+0xc8
msleep() at taskq_next_work+0x78
ddb{1}> bt
db_enter() at agintc_ipi_ddb+0x18
agintc_ipi_ddb() at arm_cpu_intr+0x30
arm_cpu_intr() at handle_el1h_irq+0x6c
handle_el1h_irq() at timeout_barrier+0x28
timeout_barrier() at timeout_del_barrier+0xb0
timeout_del_barrier() at msleep+0xc8
msleep() at taskq_next_work+0x78
taskq_next_work() at taskq_thread+0x34
taskq_thread() at proc_trampoline+0x10
ddb{1}> machine ddbcpu 2
Stopped at      agintc_ipi_ddb+0x1c:    db_enter() at agintc_ipi_ddb+0x18
agintc_ipi_ddb() at arm_cpu_intr+0x30
arm_cpu_intr() at handle_el1h_irq+0x6c
handle_el1h_irq() at sched_idle+0x220
sched_idle() at proc_trampoline+0x10
ddb{2}> bt
db_enter() at agintc_ipi_ddb+0x18
agintc_ipi_ddb() at arm_cpu_intr+0x30
arm_cpu_intr() at handle_el1h_irq+0x6c
handle_el1h_irq() at sched_idle+0x220
sched_idle() at proc_trampoline+0x10
ddb{2}> machine ddbcpu 3
Stopped at      agintc_ipi_ddb+0x1c:    db_enter() at agintc_ipi_ddb+0x18
agintc_ipi_ddb() at arm_cpu_intr+0x30
arm_cpu_intr() at handle_el1h_irq+0x6c
handle_el1h_irq() at sched_idle+0x220
sched_idle() at proc_trampoline+0x10
ddb{3}> bt
db_enter() at agintc_ipi_ddb+0x18
agintc_ipi_ddb() at arm_cpu_intr+0x30
arm_cpu_intr() at handle_el1h_irq+0x6c
handle_el1h_irq() at sched_idle+0x220
sched_idle() at proc_trampoline+0x10
ddb{3}> machine ddbcpu 4
Stopped at      agintc_ipi_ddb+0x1c:    db_enter() at agintc_ipi_ddb+0x18
agintc_ipi_ddb() at arm_cpu_intr+0x30
arm_cpu_intr() at handle_el1h_irq+0x6c
handle_el1h_irq() at svc_handler+0x1d8
svc_handler() at do_el0_sync+0x120
do_el0_sync() at handle_el0_sync+0x74
handle_el0_sync() at 0x10b1f055ac
--- trap ---
ddb{4}> bt
db_enter() at agintc_ipi_ddb+0x18
agintc_ipi_ddb() at arm_cpu_intr+0x30
arm_cpu_intr() at handle_el1h_irq+0x6c
handle_el1h_irq() at svc_handler+0x1d8
svc_handler() at do_el0_sync+0x120
do_el0_sync() at handle_el0_sync+0x74
handle_el0_sync() at 0x10b1f055ac
--- trap ---
ddb{4}> machine ddbcpu 5
Stopped at      agintc_ipi_ddb+0x1c:    db_enter() at agintc_ipi_ddb+0x18
agintc_ipi_ddb() at arm_cpu_intr+0x30
arm_cpu_intr() at handle_el1h_irq+0x6c
handle_el1h_irq() at sched_idle+0x220
sched_idle() at proc_trampoline+0x10
ddb{5}> bt
db_enter() at agintc_ipi_ddb+0x18
agintc_ipi_ddb() at arm_cpu_intr+0x30
arm_cpu_intr() at handle_el1h_irq+0x6c
handle_el1h_irq() at sched_idle+0x220
sched_idle() at proc_trampoline+0x10
ddb{5}> 

rocky$ doas llvm-objdump -x /bsd.booted   | grep ffffff80006e82  
ffffff80006e8208 g     F .text  000001c4 _dmamap_sync

ffffff80006e825c−ffffff80006e8208=0x54

ba8+54=0xbfc

0000000000000ba8 _dmamap_sync:
; /sys/arch/arm64/arm64/bus_dma.c:392
     ba8:       0f 00 00 90     adrp    x15, #0
     bac:       ef 01 40 f9     ldr     x15, [x15]
     bb0:       ef 01 1e ca     eor     x15, x15, x30
     bb4:       ff 43 02 d1     sub     sp, sp, #144
     bb8:       ef 3b 00 f9     str     x15, [sp, #112]
     bbc:       fd 7b 08 a9     stp     x29, x30, [sp, #128]
     bc0:       fd 03 02 91     add     x29, sp, #128
     bc4:       a0 83 1e f8     stur    x0, [x29, #-24]
     bc8:       a1 03 1e f8     stur    x1, [x29, #-32]
     bcc:       a2 83 1d f8     stur    x2, [x29, #-40]
     bd0:       a3 03 1d f8     stur    x3, [x29, #-48]
     bd4:       a4 c3 1c b8     stur    w4, [x29, #-52]
; /sys/arch/arm64/arm64/bus_dma.c:401
     bd8:       a0 83 5e f8     ldur    x0, [x29, #-24]
     bdc:       e1 03 00 aa     mov     x1, x0
     be0:       04 08 40 b9     ldr     w4, [x0, #8]
     be4:       e1 17 00 f9     str     x1, [sp, #40]
     be8:       84 00 18 36     tbz     w4, #3, #16 <_dmamap_sync+0x50>
; /sys/arch/arm64/arm64/bus_dma.c:402
     bec:       01 00 00 14     b       #4 <_dmamap_sync+0x48>
     bf0:       bf 3f 03 d5     dmb     sy
; /sys/arch/arm64/arm64/bus_dma.c:403
     bf4:       54 00 00 14     b       #336 <_dmamap_sync+0x19c>
; /sys/arch/arm64/arm64/bus_dma.c:406
     bf8:       a8 03 5e f8     ldur    x8, [x29, #-32]
     bfc:       09 39 40 b9     ldr     w9, [x8, #56] *******
     c00:       a9 83 1c b8     stur    w9, [x29, #-56]
     c04:       e9 03 1f 2a     mov     w9, wzr

/sys/arch/arm64/arm64/bus_dma.c:406
        nsegs = map->dm_nsegs;


>How-To-Repeat:
        In serial console with dhcp config for dwge0:
        while (ifconfig dwge0 down && sh /etc/netstart) ; do true; done
>Fix:


dmesg:
OpenBSD 6.6-current (GENERIC.MP) #236: Fri Nov  8 14:46:36 EST 2019
    [email protected]:/sys/arch/arm64/compile/GENERIC.MP
real mem  = 4094218240 (3904MB)
avail mem = 3895091200 (3714MB)
mainbus0 at root: Pine64 RockPro64
cpu0 at mainbus0 mpidr 0: ARM Cortex-A53 r0p4
cpu0: 32KB 64b/line 2-way L1 VIPT I-cache, 32KB 64b/line 4-way L1 D-cache
cpu0: 512KB 64b/line 16-way L2 cache
efi0 at mainbus0: UEFI 2.8
efi0: Das U-Boot rev 0x20191000
apm0 at mainbus0
psci0 at mainbus0: PSCI 1.1, SMCCC 1.1
agintc0 at mainbus0 sec shift 3:3 nirq 288 nredist 6 ipi: 0, 1: 
"interrupt-controller"
agintcmsi0 at agintc0
syscon0 at mainbus0: "qos"
syscon1 at mainbus0: "qos"
syscon2 at mainbus0: "qos"
syscon3 at mainbus0: "qos"
syscon4 at mainbus0: "qos"
syscon5 at mainbus0: "qos"
syscon6 at mainbus0: "qos"
syscon7 at mainbus0: "qos"
syscon8 at mainbus0: "qos"
syscon9 at mainbus0: "qos"
syscon10 at mainbus0: "qos"
syscon11 at mainbus0: "qos"
syscon12 at mainbus0: "qos"
syscon13 at mainbus0: "qos"
syscon14 at mainbus0: "qos"
syscon15 at mainbus0: "qos"
syscon16 at mainbus0: "qos"
syscon17 at mainbus0: "qos"
syscon18 at mainbus0: "qos"
syscon19 at mainbus0: "qos"
syscon20 at mainbus0: "qos"
syscon21 at mainbus0: "qos"
syscon22 at mainbus0: "qos"
syscon23 at mainbus0: "qos"
syscon24 at mainbus0: "qos"
syscon25 at mainbus0: "power-management"
"power-controller" at syscon25 not configured
syscon26 at mainbus0: "syscon"
"io-domains" at syscon26 not configured
syscon27 at mainbus0: "syscon"
syscon28 at mainbus0: "syscon"
rkclock0 at mainbus0
rkclock1 at mainbus0
syscon29 at mainbus0: "syscon"
"io-domains" at syscon29 not configured
"usb2-phy" at syscon29 not configured
"usb2-phy" at syscon29 not configured
"phy" at syscon29 not configured
"pcie-phy" at syscon29 not configured
rkpinctrl0 at mainbus0: "pinctrl"
rkgpio0 at rkpinctrl0
rkgpio1 at rkpinctrl0
rkgpio2 at rkpinctrl0
rkgpio3 at rkpinctrl0
rkgpio4 at rkpinctrl0
pwmreg0 at mainbus0
"fit-images" at mainbus0 not configured
"pmu_a53" at mainbus0 not configured
"pmu_a72" at mainbus0 not configured
agtimer0 at mainbus0: tick rate 24000 KHz
"xin24m" at mainbus0 not configured
simplebus0 at mainbus0: "amba"
"dma-controller" at simplebus0 not configured
"dma-controller" at simplebus0 not configured
rkpcie0 at mainbus0: LT wait 22ms: LT wait 1ms: gen2 link speed 5.0GT/s link 
width x1
pci0 at rkpcie0
ppb0 at pci0 dev 0 function 0 "Rockchip RK3399 Root Complex" rev 0x00: msi
pci1 at ppb0 bus 1
1:0:0: io address conflict 0x8000/0x8
1:0:0: io address conflict 0x8040/0x4
1:0:0: io address conflict 0x8100/0x8
1:0:0: io address conflict 0x8140/0x4
1:0:0: io address conflict 0x800000/0x20
1:0:0: mem address conflict 0x900000/0x800
1:0:0: rom address conflict 0xd0000000/0x10000
ahci0 at pci1 dev 0 function 0 "Marvell 88SE9128 AHCI" rev 0x20: msi, AHCI 1.2
ahci0: port 0: 6.0Gb/s
ahci0: port 7: 1.5Gb/s
scsibus0 at ahci0: 32 targets
sd0 at scsibus0 targ 0 lun 0: <ATA, Samsung SSD 840, EXT0> naa.50025388a003c28f
sd0: 476940MB, 512 bytes/sector, 976773168 sectors, thin
uk0 at scsibus0 targ 7 lun 0: <Marvell, 91xx Config, 1.01>
dwge0 at mainbus0: address 82:e5:f3:cb:08:95
rgephy0 at dwge0 phy 0: RTL8169S/8110S/8211 PHY, rev. 6
dwmmc0 at mainbus0: 50 MHz base clock
sdmmc0 at dwmmc0: 4-bit, sd high-speed, mmc high-speed, dma
sdhc0 at mainbus0
sdhc0: SDHC 3.0, 200 MHz base clock
sdmmc1 at sdhc0: 8-bit, sd high-speed, mmc high-speed, dma
ehci0 at mainbus0
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 configuration 1 interface 0 "Generic EHCI root hub" rev 2.00/1.00 
addr 1
ohci0 at mainbus0: version 1.0
ehci1 at mainbus0
usb1 at ehci1: USB revision 2.0
uhub1 at usb1 configuration 1 interface 0 "Generic EHCI root hub" rev 2.00/1.00 
addr 1
ohci1 at mainbus0: version 1.0
rkdwusb0 at mainbus0: "usb"
xhci0 at rkdwusb0, xHCI 1.10
usb2 at xhci0: USB revision 3.0
uhub2 at usb2 configuration 1 interface 0 "Generic xHCI root hub" rev 3.00/1.00 
addr 1
rkdwusb1 at mainbus0: "usb"
xhci1 at rkdwusb1, xHCI 1.10
usb3 at xhci1: USB revision 3.0
uhub3 at usb3 configuration 1 interface 0 "Generic xHCI root hub" rev 3.00/1.00 
addr 1
"saradc" at mainbus0 not configured
rkiic0 at mainbus0
iic0 at rkiic0
rkiic1 at mainbus0
iic1 at rkiic1
com0 at mainbus0: ns16550, no working fifo
com1 at mainbus0: ns16550, no working fifo
com1: console
"thermal-zones" at mainbus0 not configured
rktemp0 at mainbus0
rkiic2 at mainbus0
iic2 at rkiic2
rkpmic0 at iic2 addr 0x1b: RK808
fanpwr0 at iic2 addr 0x40: SYR827, 1.20 VDC
fanpwr1 at iic2 addr 0x41: SYR828, 1.00 VDC
rkiic3 at mainbus0
iic3 at rkiic3
fusbtc0 at iic3 addr 0x22
"pwm" at mainbus0 not configured
"pwm" at mainbus0 not configured
"dmc" at mainbus0 not configured
"efuse" at mainbus0 not configured
"phy" at mainbus0 not configured
"phy" at mainbus0 not configured
"watchdog" at mainbus0 not configured
"rktimer" at mainbus0 not configured
"i2s" at mainbus0 not configured
"i2s" at mainbus0 not configured
"i2s" at mainbus0 not configured
"vop" at mainbus0 not configured
"iommu" at mainbus0 not configured
"vop" at mainbus0 not configured
"iommu" at mainbus0 not configured
"hdmi-sound" at mainbus0 not configured
"hdmi" at mainbus0 not configured
"gpu" at mainbus0 not configured
"opp-table0" at mainbus0 not configured
"opp-table1" at mainbus0 not configured
"opp-table2" at mainbus0 not configured
"external-gmac-clock" at mainbus0 not configured
"gpio-keys" at mainbus0 not configured
"leds" at mainbus0 not configured
"sdio-pwrseq" at mainbus0 not configured
"vcc12v-dcin" at mainbus0 not configured
"vcc1v8-s3" at mainbus0 not configured
"vcc3v3-pcie-regulator" at mainbus0 not configured
"vcc3v3-sys" at mainbus0 not configured
"vcc5v0-host-regulator" at mainbus0 not configured
"vcc5v0-typec-regulator" at mainbus0 not configured
"vcc5v0-sys" at mainbus0 not configured
"vcc5v0-usb" at mainbus0 not configured
cpu1 at mainbus0 mpidr 1: ARM Cortex-A53 r0p4
cpu1: 32KB 64b/line 2-way L1 VIPT I-cache, 32KB 64b/line 4-way L1 D-cache
cpu1: 512KB 64b/line 16-way L2 cache
cpu2 at mainbus0 mpidr 2: ARM Cortex-A53 r0p4
cpu2: 32KB 64b/line 2-way L1 VIPT I-cache, 32KB 64b/line 4-way L1 D-cache
cpu2: 512KB 64b/line 16-way L2 cache
cpu3 at mainbus0 mpidr 3: ARM Cortex-A53 r0p4
cpu3: 32KB 64b/line 2-way L1 VIPT I-cache, 32KB 64b/line 4-way L1 D-cache
cpu3: 512KB 64b/line 16-way L2 cache
cpu4 at mainbus0 mpidr 100: ARM Cortex-A72 r0p2
cpu4: 48KB 64b/line 3-way L1 PIPT I-cache, 32KB 64b/line 2-way L1 D-cache
cpu4: 1024KB 64b/line 16-way L2 cache
cpu5 at mainbus0 mpidr 101: ARM Cortex-A72 r0p2
cpu5: 48KB 64b/line 3-way L1 PIPT I-cache, 32KB 64b/line 2-way L1 D-cache
cpu5: 1024KB 64b/line 16-way L2 cache
usb4 at ohci0: USB revision 1.0
uhub4 at usb4 configuration 1 interface 0 "Generic OHCI root hub" rev 1.00/1.00 
addr 1
usb5 at ohci1: USB revision 1.0
uhub5 at usb5 configuration 1 interface 0 "Generic OHCI root hub" rev 1.00/1.00 
addr 1
scsibus1 at sdmmc0: 2 targets, initiator 0
sd1 at scsibus1 targ 1 lun 0: <SD/MMC, SD16G, 0020> removable
sd1: 29862MB, 512 bytes/sector, 61157376 sectors
sdmmc1: can't enable card
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
bootfile: sd0a:/bsd
boot device: sd0
root on sd1a (4cbb6909064a3cdc.a) swap on sd1b dump on sd1b
WARNING: / was not properly unmounted

usbdevs:
Controller /dev/usb0:
addr 01: 0000:0000 Generic, EHCI root hub
         high speed, self powered, config 1, rev 1.00
         driver: uhub0
Controller /dev/usb1:
addr 01: 0000:0000 Generic, EHCI root hub
         high speed, self powered, config 1, rev 1.00
         driver: uhub1
Controller /dev/usb2:
addr 01: 0000:0000 Generic, xHCI root hub
         super speed, self powered, config 1, rev 1.00
         driver: uhub2
Controller /dev/usb3:
addr 01: 0000:0000 Generic, xHCI root hub
         super speed, self powered, config 1, rev 1.00
         driver: uhub3
Controller /dev/usb4:
addr 01: 0000:0000 Generic, OHCI root hub
         full speed, self powered, config 1, rev 1.00
         driver: uhub4
Controller /dev/usb5:
addr 01: 0000:0000 Generic, OHCI root hub
         full speed, self powered, config 1, rev 1.00
         driver: uhub5

Reply via email to