Summary: | [mips] init died (signal 0, exit 1) and kernel panic | ||
---|---|---|---|
Product: | Base System | Reporter: | Piotr Kubaj <pkubaj> |
Component: | bin | Assignee: | Bugmeister <bugmeister> |
Status: | Closed Overcome By Events | ||
Severity: | Affects Only Me | CC: | adrian, energyrikard, mail.gery, sbruno |
Priority: | --- | Keywords: | regression |
Version: | CURRENT | ||
Hardware: | mips | ||
OS: | Any |
Description
Piotr Kubaj
![]() ![]() oh interesting, ok. lemme go try. I enabled debugging options (just commented out 6 nooptions entries in kernel config, but there's still no explanation). Wholo boot log is here: ar7100> bootm 0xbf020000 ## Booting image at bf020000 ... Uncompressing Kernel Image ... OK Starting kernel ... CPU platform: Atheros AR9132 rev 2 CPU Frequency=400 MHz CPU DDR Frequency=400 MHz CPU AHB Frequency=200 MHz platform frequency: 400 MHz CPU reference clock: 5 MHz CPU MDIO clock: 5 MHz arguments: a0 = 00000007 a1 = a3f77fb0 a2 = a3f78440 a3 = 00000008 Cmd line:argv is invalid Environment: envp is invalid Cache info: picache_stride = 4096 picache_loopcount = 16 pdcache_stride = 4096 pdcache_loopcount = 8 max line size = 32 cpu0: MIPS Technologies processor v116.147 MMU: Standard TLB, 16 entries (4K 16K 64K 256K 1M 16M 64M 256M pg sizes) L1 i-cache: 4 ways of 512 sets, 32 bytes per line L1 d-cache: 4 ways of 256 sets, 32 bytes per line L2 cache: disabled Config1=0x9ee3519e<PerfCount,WatchRegs,MIPS16,EJTAG> Config2=0x80000000 Config3=0x20 Config7=0x0 Physical memory chunk(s): 0x559000 - 0x3ffffff, 61501440 bytes (15015 pages) Maxmem is 0x4000000 KDB: debugger backends: ddb KDB: current backend: ddb Copyright (c) 1992-2018 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 12.0-CURRENT #1 r335594: Sun Jun 24 05:45:53 CEST 2018 pkubaj@FreeBSD11:/usr/home/pkubaj/obj/mips_ap/usr/home/pkubaj/head/mips.mips/sys/TP-WN1043ND_64_RAM mips gcc version 6.4.0 (FreeBSD Ports Collection for mips) WARNING: WITNESS option enabled, expect reduced performance. Preloaded elf kernel "kernel" at 0x805527ec. real memory = 67108864 (65536K bytes) Physical memory chunk(s): 0x005ed000 - 0x03c99fff, 57331712 bytes (13997 pages) avail memory = 56909824 (54MB) arc4random: no preloaded entropy cache random: entropy device external interface mem: <memory> null: <full device, null device, zero device> nexus0: <MIPS32 root nexus> random: harvesting attach, 8 bytes (4 bits) from nexus0 clock0: <Generic MIPS32 ticker> on nexus0 Timecounter "MIPS32" frequency 200000000 Hz quality 800 Event timer "MIPS32" frequency 200000000 Hz quality 800 random: harvesting attach, 8 bytes (4 bits) from clock0 apb0 at irq 4 on nexus0 uart0: <16550 or compatible> at mem 0x18020003-0x1802001a irq 3 on apb0 uart0: console (115200,n,8,1) uart0: fast interrupt uart0: PPS capture mode: DCD random: harvesting attach, 8 bytes (4 bits) from uart0 gpio0: <Atheros AR71XX GPIO driver> at mem 0x18040000-0x18040fff irq 2 on apb0 gpio0: [GIANT-LOCKED] gpio0: function_set: 0x2000 gpio0: function_clear: 0x0 gpio0: gpio pinmask=0x1c02ae gpiobus0: <GPIO bus> on gpio0 gpiobus0: <unknown device> at pin 2 gpiobus0: <unknown device> at pin 5 gpiobus0: <unknown device> at pin 9 gpioiic0: <GPIO I2C bit-banging driver> at pins 18-19 on gpiobus0 gpioiic0: SCL pin: 19, SDA pin: 18 iicbb0: <I2C bit-banging driver> on gpioiic0 iicbus0: <Philips I2C bus> on iicbb0 master-only rtl8366rb0: <RTL8366RB Ethernet Switch Controller> at addr 0xa8 on iicbus0 rtl8366rb0: rev. 3 miibus0: <MII bus> on rtl8366rb0 ukphy0: <Generic IEEE 802.3u media interface> PHY 0 on miibus0 ukphy0: OUI 0x00e04c, model 0x0016, rev. 1 ukphy0: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, 1000baseT-FDX-master, auto random: harvesting attach, 8 bytes (4 bits) from ukphy0 random: harvesting attach, 8 bytes (4 bits) from miibus0 miibus1: <MII bus> on rtl8366rb0 ukphy1: <Generic IEEE 802.3u media interface> PHY 1 on miibus1 ukphy1: OUI 0x00e04c, model 0x0016, rev. 1 ukphy1: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, 1000baseT-FDX-master, auto random: harvesting attach, 8 bytes (4 bits) from ukphy1 random: harvesting attach, 8 bytes (4 bits) from miibus1 miibus2: <MII bus> on rtl8366rb0 ukphy2: <Generic IEEE 802.3u media interface> PHY 2 on miibus2 ukphy2: OUI 0x00e04c, model 0x0016, rev. 1 ukphy2: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, 1000baseT-FDX-master, auto random: harvesting attach, 8 bytes (4 bits) from ukphy2 random: harvesting attach, 8 bytes (4 bits) from miibus2 miibus3: <MII bus> on rtl8366rb0 ukphy3: <Generic IEEE 802.3u media interface> PHY 3 on miibus3 ukphy3: OUI 0x00e04c, model 0x0016, rev. 1 ukphy3: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, 1000baseT-FDX-master, auto random: harvesting attach, 8 bytes (4 bits) from ukphy3 random: harvesting attach, 8 bytes (4 bits) from miibus3 miibus4: <MII bus> on rtl8366rb0 ukphy4: <Generic IEEE 802.3u media interface> PHY 4 on miibus4 ukphy4: OUI 0x00e04c, model 0x0016, rev. 1 ukphy4: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, 1000baseT-FDX-master, auto random: harvesting attach, 8 bytes (4 bits) from ukphy4 random: harvesting attach, 8 bytes (4 bits) from miibus4 mdio0: <MDIO> on rtl8366rb0 random: harvesting attach, 8 bytes (4 bits) from mdio0 etherswitch0: <Switch controller> on rtl8366rb0 random: harvesting attach, 8 bytes (4 bits) from etherswitch0 random: harvesting attach, 8 bytes (4 bits) from rtl8366rb0 iic0: <I2C generic I/O> on iicbus0 random: harvesting attach, 8 bytes (4 bits) from iic0 random: harvesting attach, 8 bytes (4 bits) from iicbus0 random: harvesting attach, 8 bytes (4 bits) from iicbb0 random: harvesting attach, 8 bytes (4 bits) from gpioiic0 random: harvesting attach, 8 bytes (4 bits) from gpiobus0 gpioc0: <GPIO controller> on gpio0 random: harvesting attach, 8 bytes (4 bits) from gpioc0 random: harvesting attach, 8 bytes (4 bits) from gpio0 random: harvesting attach, 8 bytes (4 bits) from apb0 ehci0: <AR71XX Integrated USB 2.0 controller> at mem 0x1b000100-0x1bffffff irq 1 on nexus0 usbus0: EHCI version 1.0 usbus0 on ehci0 ehci0: usbpf: Attached random: harvesting attach, 8 bytes (4 bits) from usbus0 random: harvesting attach, 8 bytes (4 bits) from ehci0 arge0: <Atheros AR71xx built-in ethernet interface> at mem 0x19000000-0x19000fff irq 2 on nexus0 arge0: Overriding MAC from EEPROM arge0: finishing attachment, phymask 0000, proxy null arge0: bpf attached arge0: Ethernet address: 90:f6:52:f5:94:88 random: harvesting attach, 8 bytes (4 bits) from arge0 arge1: <Atheros AR71xx built-in ethernet interface> at mem 0x1a000000-0x1a000fff irq 3 on nexus0 arge1: Generating random ethernet address. arge1: finishing attachment, phymask 0000, proxy null arge1: Unknown media 0 arge1: bpf attached arge1: Ethernet address: 62:73:64:b9:97:f4 random: harvesting attach, 8 bytes (4 bits) from arge1 spi0: <AR71XX SPI> at mem 0x1f000000-0x1f00000f on nexus0 spibus0: <SPI bus> on spi0 mx25l0: <M25Pxx Flash Family> at cs 0 mode 0 on spibus0 mx25l0: device type s25fl064, size 8192K in 128 sectors of 64K, erase size 64K random: harvesting attach, 8 bytes (4 bits) from mx25l0 random: harvesting attach, 8 bytes (4 bits) from spibus0 random: harvesting attach, 8 bytes (4 bits) from spi0 ar71xx_wdog0: <Atheros AR71XX watchdog timer> on nexus0 ar71xx_wdog0: Previous reset was due to watchdog timeout random: harvesting attach, 8 bytes (4 bits) from ar71xx_wdog0 Device configuration finished. Timecounters tick every 1.000 msec lo0: bpf attached tcp_init: net.inet.tcp.tcbhashsize auto tuned to 1024 rtl8366rb0port0: link state changed to DOWN rtl8366rb0port1: link state changed to DOWN rtl8366rb0port2: link state changed to DOWN rtl8366rb0port3: link state changed to DOWN rtl8366rb0port4: link state changed to DOWN GEOM: new disk flash/spi0 MAP: flash/spi0: 0x20000, data=0x20000 "/dev/map/uboot" MAP: search flash/spi0 for key ".!/bin/sh" from 0x100000, step 0x10000 usbus0: 480Mbps High Speed USB v2.0 ugen0.1: <Atheros EHCI root HUB> at usbus0 uhub0: <Atheros EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus0 MAP: flash/spi0: 20000x220000, data=0x220000 "/dev/map/kernel" MAP: search flash/spi0 for key ".!/bin/sh" from 0x100000, step 0x10000 MAP: flash/spi0: 240000x5a0000, data=0x5a0000 "/dev/map/rootfs" MAP: flash/spi0: 7e0000x10000, data=0x10000 "/dev/map/cfg" MAP: flash/spi0: 7f0000x10000, data=0x10000 "/dev/map/art" MAP: No valid partition found at map/rootfs.uzip WARNING: WITNESS option enabled, expect reduced performance. Trying to mount root from ufs:map/rootfs.uzip []... uhub0: 1 port with 1 removable, self powered random: harvesting attach, 8 bytes (4 bits) from uhub0 Warning: no time-of-day clock registered, system time will not be set accurately start_init: trying /sbin/init rtl8366rb0port0: link state changed to UP init died (signal 0, exit 1) panic: Going nowhere without my init! time = 1529812906 KDB: enter: panic [ thread pid 1 tid 100001 ] Stopped at _DYNAMIC_LINKING+0x3: db> bt Tracing pid 1 tid 100001 td 0x80676000 kdb_enter+0x44 (?,?,?,?) ra 801c7260 sp c1223cb8 sz 24 vpanic+0x17c (?,?,?,?) ra 801c7af4 sp c1223cd0 sz 40 sys_reboot (?,1d,80676000,178) ra 8018b524 sp c1223cf8 sz 32 exit1+0x2c0 (?,?,?,?) ra 8018bfd8 sp c1223d18 sz 96 sys_abort2 (?,?,?,?) ra 803da798 sp c1223d78 sz 24 trap+0xf7c (?,?,?,?) ra 0 sp c1223d90 sz 0 Assuming the build was produced using the freebsd-wifi-build scripts: I was also facing this issue with the same board and managed to resolve it. My idea was to include the "real" /sbin/init binary instead of the symlink pointing to bsdbox. This way I could get the following output: Trying to mount root from ufs:map/rootfs.uzip []... Warning: no time-of-day clock registered, system time will not be set accurately start_init: trying /sbin/init uhub0: 1 port with 1 removable, self powered random: harvesting attach, 8 bytes (4 bits) from uhub0 Jul 1 20:08:55 init: login_getclass: unknown class 'daemon' rtl8366rb0port4: link state changed to UP Shared object "libsbuf.so.6" not found, required by "lib80211.so.1" Enter full pathname of shell or RETURN for /bin/sh: After including the missing libraries in the image, the issue was gone: https://github.com/kissg1988/freebsd-wifi-build/commit/0477cf50fad030e574a5cf901541c55be248e96b (In reply to Gergely Kiss from comment #3) Thanks, it looks like it works. Small offtop - do you know what needs to be included in the kernel config to make wifi work? I can see there are ath modules in the config but wifi card isn't detected. (In reply to Piotr Kubaj from comment #4) Nothing special, I use the build config named "tl-wr1043nd" from freebsd-wifi-build and the kernel config "TP-WN1043ND" included in 11.2-RELEASE. I had stability issues with FreeBSD-HEAD (saw kernel panics sometimes due to TLB cache misses near the end of the boot process) so I decided to use -RELEASE, instead and now have great stability. Here are the dmesg lines relevant to the wireless interface from my installation: ath0: Vendor=0x168c, Device=0x000b ath0: Vendor=0x168c, Device=0x000b ath0: <Atheros 9130> at mem 0x180c0000-0x180effff irq 0 on nexus0 ath0: eeprom @ 0x1fff1000 (4096 bytes) ath0: eeprom data @ 0xbfff1000 ath0: [HT] enabling HT modes ath0: [HT] 2 RX streams; 2 TX streams ath0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps ath0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps ath0: 2T2R ath0: 11ng MCS 20MHz ath0: MCS 0-7: 6.5Mbps - 65Mbps ath0: MCS 8-15: 13Mbps - 130Mbps ath0: 11ng MCS 40MHz: ath0: MCS 0-7: 13.5Mbps - 135Mbps ath0: MCS 8-15: 27Mbps - 270Mbps ath0: 11ng MCS 40MHz SGI: ath0: MCS 0-7: 15Mbps - 150Mbps ath0: MCS 8-15: 30Mbps - 300Mbps ath0: AR9130 mac 20.1 RF2133 phy 10.2 ath0: 2GHz radio: 0x0000; 5GHz radio: 0x00d0 ath0: Use hw queue 1 for WME_AC_BE traffic ath0: Use hw queue 0 for WME_AC_BK traffic ath0: Use hw queue 2 for WME_AC_VI traffic ath0: Use hw queue 3 for WME_AC_VO traffic ath0: Use hw queue 8 for CAB traffic ath0: Use hw queue 9 for beacons ath0: using multicast key search Feel free to pull my fork of freebsd-wifi-build and give it a try if you wish. I have pushed my convenience build script in the branch "buildscript" as it can ease the build process a bit: https://github.com/kissg1988/freebsd-wifi-build/blob/buildscript/scripts/build.sh If you have any further questions, please reach out to my by email to keep this bugreport clean. Thanks, Gergely ^Triage: close as Overcome By Events. I'm sorry this PR never got looked at. In the meantime, FreeBSD has dropped MIPS support, so there is nothing to do here. |