Modify

Opened 2 years ago

Last modified 21 months ago

#21786 new defect

failsafe: mount_root can silently fail / r48389

Reported by: bittorf@… Owned by: developers
Priority: normal Milestone:
Component: packages Version: Trunk
Keywords: Cc:

Description

on a 'TP-LINK TL-WDR4300' i have the problem in failsafe,
that i cannot execute 'mount_root'. there are no obvious errors:

root@(none):~ cat /tmp/sysinfo/model 
TP-Link TL-WDR4300 v1

root@(none):~ cat /etc/openwrt_release 
DISTRIB_ID='OpenWrt'
DISTRIB_RELEASE='Bleeding Edge'
DISTRIB_REVISION='r48389'
DISTRIB_CODENAME='designated_driver'
DISTRIB_TARGET='ar71xx/generic'
DISTRIB_DESCRIPTION='OpenWrt Designated Driver r48389'
DISTRIB_TAINTS='no-all busybox'

root@(none):~ command -v mount_root
/sbin/mount_root

root@(none):~ /sbin/mount_root

root@(none):~ echo $?
255

root@(none):~ df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 3.3M      3.3M         0 100% /
tmpfs                   512.0K    184.0K    328.0K  36% /dev
tmpfs                    61.4M      4.5M     56.9M   7% /tmp

root@(none):~ cat /proc/partitions 
major minor  #blocks  name

  31        0        128 mtdblock0
  31        1       1231 mtdblock1
  31        2       6768 mtdblock2
  31        3       3392 mtdblock3
  31        4         64 mtdblock4
  31        5       8000 mtdblock5

root@(none):~ dmesg
[    0.000000] Linux version 4.1.15 (bastian@gcc20) (gcc version 5.2.0 (OpenWrt GCC 5.2.0 r48235) ) #5 Wed Jan 20 10:16:12 CET 2016
[    0.000000] MyLoader: sysp=f6be3244, boardp=d2934ba2, parts=ace82dc4
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0001974c (MIPS 74Kc)
[    0.000000] SoC: Atheros AR9344 rev 2
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 08000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] On node 0 totalpages: 32768
[    0.000000] free_area_init_node: node 0, pgdat 803b3de0, node_mem_map 81000000
[    0.000000]   Normal zone: 256 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 32768 pages, LIFO batch:7
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line:  board=TL-WDR4300   oops=panic panic=10  console=ttyS0,115200 rootfstype=squashfs,jffs2 noinitrd
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 125532K/131072K available (2796K kernel code, 140K rwdata, 576K rodata, 252K init, 195K bss, 5540K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:83
[    0.000000] Clocks: CPU:560.000MHz, DDR:450.000MHz, AHB:225.000MHz, Ref:40.000MHz
[    0.000000] clocksource MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6825930166 ns
[    0.000008] sched_clock: 32 bits at 280MHz, resolution 3ns, wraps every 7669584382ns
[    0.007501] Calibrating delay loop... 278.93 BogoMIPS (lpj=1394688)
[    0.080012] pid_max: default: 32768 minimum: 301
[    0.084577] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.090905] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.100267] clocksource jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.110304] NET: Registered protocol family 16
[    0.115788] MIPS: machine is TP-LINK TL-WDR3600/4300/4310
[    0.124276] registering PCI controller with io_map_base unset
[    0.350945] PCI host bridge to bus 0000:00
[    0.354885] pci_bus 0000:00: root bus resource [mem 0x10000000-0x13ffffff]
[    0.361470] pci_bus 0000:00: root bus resource [io  0x0000]
[    0.366857] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    0.373399] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.381095] pci 0000:00:00.0: [168c:0033] type 00 class 0x028000
[    0.381112] pci 0000:00:00.0: invalid calibration data
[    0.386032] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x0001ffff 64bit]
[    0.386091] pci 0000:00:00.0: reg 0x30: [mem 0x00000000-0x0000ffff pref]
[    0.386151] pci 0000:00:00.0: supports D1
[    0.386167] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[    0.386405] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 00
[    0.386441] pci 0000:00:00.0: BAR 0: assigned [mem 0x10000000-0x1001ffff 64bit]
[    0.393477] pci 0000:00:00.0: BAR 6: assigned [mem 0x10020000-0x1002ffff pref]
[    0.400412] pci 0000:00:00.0: using irq 40 for pin 1
[    0.405980] Switched to clocksource MIPS
[    0.410995] NET: Registered protocol family 2
[    0.416103] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.422779] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.428939] TCP: Hash tables configured (established 1024 bind 1024)
[    0.435116] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.440728] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.447025] NET: Registered protocol family 1
[    0.451241] PCI: CLS 0 bytes, default 32
[    0.452264] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.477336] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.482917] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.495182] io scheduler noop registered
[    0.498965] io scheduler deadline registered (default)
[    0.504094] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    0.510636] console [ttyS0] disabled
[    0.534088] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11, base_baud = 2500000) is a 16550A
[    0.542368] console [ttyS0] enabled
[    0.549395] bootconsole [early0] disabled
[    0.560026] m25p80 spi0.0: found en25q64, expected m25p80
[    0.565521] m25p80 spi0.0: en25q64 (8192 Kbytes)
[    0.571212] 5 tp-link partitions found on MTD device spi0.0
[    0.576916] Creating 5 MTD partitions on "spi0.0":
[    0.581792] 0x000000000000-0x000000020000 : "u-boot"
[    0.587724] 0x000000020000-0x000000153c20 : "kernel"
[    0.593554] 0x000000153c20-0x0000007f0000 : "rootfs"
[    0.599440] mtd: device 2 (rootfs) set to be root filesystem
[    0.605221] 1 squashfs-split partitions found on MTD device rootfs
[    0.611535] 0x0000004a0000-0x0000007f0000 : "rootfs_data"
[    0.617823] 0x0000007f0000-0x000000800000 : "art"
[    0.623385] 0x000000020000-0x0000007f0000 : "firmware"
[    0.641623] switch0: Atheros AR8327 rev. 2 switch registered on ag71xx-mdio.0
[    0.703252] libphy: ag71xx_mdio: probed
[    1.297378] ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.0:00 [uid=004dd033, driver=Atheros AR8216/AR8236/AR8316]
[    1.308835] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:RGMII
[    1.317370] NET: Registered protocol family 10
[    1.325409] NET: Registered protocol family 17
[    1.330059] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
[    1.343019] 8021q: 802.1Q VLAN Support v1.8
[    1.353117] VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
[    1.361451] Freeing unused kernel memory: 252K (803d1000 - 80410000)
[    2.114643] init: Console is alive
[    2.118382] init: - watchdog -
[    3.472797] usbcore: registered new interface driver usbfs
[    3.478520] usbcore: registered new interface driver hub
[    3.484010] usbcore: registered new device driver usb
[    3.569047] SCSI subsystem initialized
[    3.578673] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    3.586735] ehci-platform: EHCI generic platform driver
[    3.592132] ehci-platform ehci-platform: EHCI Host Controller
[    3.598035] ehci-platform ehci-platform: new USB bus registered, assigned bus number 1
[    3.608169] ehci-platform ehci-platform: irq 3, io mem 0x1b000000
[    3.626054] ehci-platform ehci-platform: USB 2.0 started, EHCI 1.00
[    3.633261] hub 1-0:1.0: USB hub found
[    3.637412] hub 1-0:1.0: 1 port detected
[    3.645653] usbcore: registered new interface driver usb-storage
[    3.956003] usb 1-1: new high-speed USB device number 2 using ehci-platform
[    4.108271] hub 1-1:1.0: USB hub found
[    4.112449] hub 1-1:1.0: 4 ports detected
[    4.122559] init: - preinit -
[    4.552428] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[    4.578822] random: procd urandom read with 7 bits of entropy available
[    6.317239] eth0: link up (1000Mbps/Full duplex)
[    6.322010] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   24.316772] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: Port 4 is up
[   68.506011] random: nonblocking pool is initialized
[ 1578.317053] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: Port 4 is down
[ 1590.316752] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: Port 4 is up
[ 1624.317048] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: Port 4 is down
[ 1628.316752] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: Port 4 is up
[ 1690.317052] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: Port 4 is down
[ 1696.316753] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: Port 4 is up

whats going on? mount_root should at least write out an error-message.

Attachments (0)

Change History (7)

comment:1 Changed 2 years ago by Stefan Hellermann <stefan@…>

same here, on a TP-LINK TL-WDR3600, openwrt trunk r48695
any fix?

comment:2 Changed 2 years ago by bittorf@…

same here on 'TP-LINK TL-WR841N/ND v7' with r48715 and
on 'TP-LINK TL-WDR4300' with r48234. it looks to me, that it can be caused by filling up flash)

comment:3 Changed 2 years ago by bittorf@…

here with manual mounting jffs2:

root@(none):~ cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00020000 00010000 "u-boot"
mtd1: 0010c33c 00010000 "kernel"
mtd2: 002c3cc4 00010000 "rootfs"
mtd3: 000b0000 00010000 "rootfs_data"
mtd4: 00010000 00010000 "art"
mtd5: 003d0000 00010000 "firmware"

root@(none):~ mkdir /tmp/jffs

root@(none):~ mount -t jffs2 /dev/mtdblock3  /tmp/jffs

root@(none):~ df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 2.3M      2.3M         0 100% /
tmpfs                   512.0K         0    512.0K   0% /dev
tmpfs                    14.1M     28.0K     14.1M   0% /tmp
/dev/mtdblock3          704.0K    672.0K     32.0K  95% /tmp/jffs

so i see 2 problems:

  • mount_root does NOT work
  • the device does NOT boot (it seems to hang early and no IPv6/fe80 address is up)

after manually removing files from $JFFS_MOUNT/upper/... the device is still NOT fine again. the only thing how i could "fix" it was to delete '/tmp/jffs/.fs_state'
which was pointing to a nonexisting dir/file:

root@(none):~ ls -l /tmp/jffs/.fs_state
lrwxrwxrwx    1 root     root             1 Feb 13  2016 /tmp/jffs/.fs_state -> 2

root@(none):~ rm /tmp/jffs/.fs_state

root@(none):~ reboot && exit

but i lost my work (seems firstboot is invoked then...)

comment:5 Changed 2 years ago by bittorf@…

another device (which was nearly full, ~160k free space on jffs2) showed similar symptoms and it looks like even when space is freed in jffs2 (~1,5mb) there are not uci-values, so the device keeps dumb. but i can *read* all the files in /tmp/jffs/upper/etc/config ...

comment:6 Changed 22 months ago by bittorf@…

this is still the case with trunk r49112 on ar71xx with kernel 4.1.20 and i'am about to solder again a serial console...(on 3 different ar71xx models)

comment:7 Changed 21 months ago by bittorf@…

the 3 routers had not related / other problems and i have not seen this issue anymore with kernel 4.1.20 - so this can be closed as *fixed* with r49035 (the kernel-bump)

Add Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.