Kernel problem and reboot on a Mi Router 3G when my wireless printer is connected

Hello everyone,

I recently installed OpenWrt on a Xiaomi Mi Router 3G but sometimes it crashes then reboot. Especially when I connect a wireless printer on it (HP Envy 5000). I don't know what to do, maybe my configuration is messed up.
I'm using the router for wireless AP, a separated guest wireless AP behind a VPN and adblock.
With the command "logread -f" when I'm connecting the printer, I get:

root@OpenWrt:~# logread -f
Sat Apr 20 12:43:40 2019 daemon.info hostapd: wlan0: STA ac:e2:d3:40:72:0c IEEE 802.11: authenticated
Sat Apr 20 12:43:40 2019 daemon.info hostapd: wlan0: STA ac:e2:d3:40:72:0c IEEE 802.11: associated (aid 3)
Sat Apr 20 12:43:40 2019 daemon.notice hostapd: wlan0: AP-STA-CONNECTED ac:e2:d3:40:72:0c
Sat Apr 20 12:43:40 2019 daemon.info hostapd: wlan0: STA ac:e2:d3:40:72:0c WPA: pairwise key handshake completed (RSN)
Sat Apr 20 12:43:41 2019 daemon.warn dnsmasq-dhcp[3703]: no address range available for DHCP request via br-lan
Sat Apr 20 12:43:47 2019 kern.alert kernel: [   62.558559] CPU 0 Unable to handle kernel paging request at virtual address 00000004, epc == 8033dd14, ra == 8033de48
Sat Apr 20 12:43:47 2019 kern.warn kernel: [   62.569143] Oops[#1]:
Sat Apr 20 12:43:47 2019 kern.warn kernel: [   62.571408] CPU: 0 PID: 2606 Comm: hostapd Not tainted 4.14.95 #0
Sat Apr 20 12:43:47 2019 kern.warn kernel: [   62.577472] task: 8fe15140 task.stack: 8ea7a000
Sat Apr 20 12:43:47 2019 kern.warn kernel: [   62.581977] $ 0   : 00000000 00000001 8e81449c 00000000
Sat Apr 20 12:43:47 2019 kern.warn kernel: [   62.587188] $ 4   : 8e814400 8e81449c 00000000 00000000
Sat Apr 20 12:43:47 2019 kern.warn kernel: [   62.592398] $ 8   : 00000000 7ffff000 00000000 80000000
Sat Apr 20 12:43:47 2019 kern.warn kernel: [   62.597608] $12   : 8ea7a000 00000000 00000000 77fea2c0
Sat Apr 20 12:43:47 2019 kern.warn kernel: [   62.602817] $16   : 8d80e840 00000000 8ea7bd54 8e81449c
Sat Apr 20 12:43:47 2019 kern.warn kernel: [   62.608026] $20   : 00000001 8ea7bd50 00000040 00000000
Sat Apr 20 12:43:47 2019 kern.warn kernel: [   62.613236] $24   : 00000000 80384cb8
Sat Apr 20 12:43:47 2019 kern.warn kernel: [   62.618446] $28   : 8ea7a000 8ea7bc68 8ea7bd08 8033de48
Sat Apr 20 12:43:47 2019 kern.warn kernel: [   62.623655] Hi    : 00000235
Sat Apr 20 12:43:47 2019 kern.warn kernel: [   62.626517] Lo    : 000759c1
Sat Apr 20 12:43:47 2019 kern.warn kernel: [   62.629382] epc   : 8033dd14 0x8033dd14
Sat Apr 20 12:43:47 2019 kern.warn kernel: [   62.633197] ra    : 8033de48 0x8033de48
Sat Apr 20 12:43:47 2019 kern.warn kernel: [   62.637009] Status: 11008402      KERNEL EXL
Sat Apr 20 12:43:47 2019 kern.warn kernel: [   62.640918] Cause : 4080000c (ExcCode 03)
Sat Apr 20 12:43:47 2019 kern.warn kernel: [   62.644902] BadVA : 00000004
Sat Apr 20 12:43:47 2019 kern.warn kernel: [   62.647765] PrId  : 0001992f (MIPS 1004Kc)
Sat Apr 20 12:43:47 2019 kern.warn kernel: [   62.651836] Modules linked in: pppoe ppp_async pppox ppp_generic nf_conntrack_ipv6 mt76x2e mt76x2_common mt76x02_lib mt7603e mt76 mac80211 iptable_nat ipt_REJECT ipt_MASQUERADE cfg80211 xt_time xt_tcpudp xt_tcpmss xt_statistic xt_state xt_recent xt_nat xt_multiport xt_mark xt_mac xt_limit xt_length xt_hl xt_helper xt_ecn xt_dscp xt_conntrack xt_connmark xt_connlimit xt_connbytes xt_comment xt_TCPMSS xt_REDIRECT xt_LOG xt_HL xt_FLOWOFFLOAD xt_DSCP xt_CT xt_CLASSIFY slhc nf_reject_ipv4 nf_nat_redirect nf_nat_masquerade_ipv4 nf_conntrack_ipv4 nf_nat_ipv4 nf_nat nf_log_ipv4 nf_flow_table_hw nf_flow_table nf_defrag_ipv6 nf_defrag_ipv4 nf_conntrack_rtcache iptable_mangle iptable_filter ipt_ECN ip_tables crc_ccitt compat sch_cake nf_conntrack act_skbedit act_mirred em_u32 cls_u32 cls_tcindex cls_flow cls_route
Sat Apr 20 12:43:47 2019 kern.warn kernel: [   62.722855]  cls_fw sch_tbf sch_htb sch_hfsc sch_ingress ledtrig_usbport ip6t_REJECT nf_reject_ipv6 nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_tables x_tables ifb tun leds_gpio xhci_mtk xhci_plat_hcd xhci_pci xhci_hcd gpio_button_hotplug usbcore nls_base usb_common
Sat Apr 20 12:43:47 2019 kern.warn kernel: [   62.747924] Process hostapd (pid: 2606, threadinfo=8ea7a000, task=8fe15140, tls=77febdc0)
Sat Apr 20 12:43:47 2019 kern.warn kernel: [   62.756057] Stack : 8f18b0c0 000000db 00000000 8ea7bb0c 801281ec 8e814400 8e814400 8e8144a8
Sat Apr 20 12:43:47 2019 kern.warn kernel: [   62.764389]         8e81449c 8033de48 00000000 00000000 00000008 80387888 8ea7bd50 8ea7bd54
Sat Apr 20 12:43:47 2019 kern.warn kernel: [   62.772721]         8ea7bcb8 8ea7bd08 8054cde4 00000000 00000000 8d80eb40 8ea7bd7c 8e814400
Sat Apr 20 12:43:47 2019 kern.warn kernel: [   62.781054]         00004000 00000040 00000000 8ea7bd50 8ea7bd54 fffffff5 00000000 8033df94
Sat Apr 20 12:43:47 2019 kern.warn kernel: [   62.789387]         00000000 80065ea4 8ea7bd8c 00000040 8ea7bd54 8ea7bd7c 8ea7bd08 8ea7bd0c
Sat Apr 20 12:43:47 2019 kern.warn kernel: [   62.797719]         ...
Sat Apr 20 12:43:47 2019 kern.warn kernel: [   62.800154] Call Trace:
Sat Apr 20 12:43:47 2019 kern.warn kernel: [   62.800201] [<801281ec>] 0x801281ec
Sat Apr 20 12:43:47 2019 kern.warn kernel: [   62.806108] [<8033de48>] 0x8033de48
Sat Apr 20 12:43:47 2019 kern.warn kernel: [   62.809577] [<80387888>] 0x80387888
Sat Apr 20 12:43:47 2019 kern.warn kernel: [   62.813080] [<8033df94>] 0x8033df94
Sat Apr 20 12:43:47 2019 kern.warn kernel: [   62.816548] [<80065ea4>] 0x80065ea4
Sat Apr 20 12:43:47 2019 kern.warn kernel: [   62.820048] [<8033e028>] 0x8033e028
Sat Apr 20 12:43:47 2019 kern.warn kernel: [   62.823516] [<802318b4>] 0x802318b4
Sat Apr 20 12:43:47 2019 kern.warn kernel: [   62.826989] [<8033cdac>] 0x8033cdac
Sat Apr 20 12:43:47 2019 kern.warn kernel: [   62.830470] [<80384d10>] 0x80384d10
Sat Apr 20 12:43:47 2019 kern.warn kernel: [   62.833950] [<8032bbf0>] 0x8032bbf0
Sat Apr 20 12:43:47 2019 kern.warn kernel: [   62.837442] [<8032bfa8>] 0x8032bfa8
Sat Apr 20 12:43:47 2019 kern.warn kernel: [   62.840925] [<8032ca2c>] 0x8032ca2c

What should I do? Have a nice day!

I don’t know the answer, but if it happens right when you connect the printer, it isn’t “random”! If that’s the case, changing the title to something more descriptive might get you some answers sooner.

I think you should check the dnsmasq/dhcp settings in your enviroment. Do you use more than one DHCP server ?

Regards,
Wolfgang

I'm much less concerned about DHCP than the paging failure six seconds later!

Sat Apr 20 12:43:41 2019 daemon.warn dnsmasq-dhcp[3703]: no address range available for DHCP request via br-lan
Sat Apr 20 12:43:47 2019 kern.alert kernel: [   62.558559] CPU 0 Unable to handle kernel paging request at virtual address 00000004, epc == 8033dd14, ra == 8033de48

Even if DHCP wasn't configured properly, it shouldn't cause a low-level kernel problem.

This virtual address 0x4 looking strange, maybe it is a function call triggered by the DHCP server.
DHCP _-> call kernel with a total wrong address pointer