[FS#533] anon_mount 1 in fstab freezes boot in wrt3200acm

LEDE Bugs lede-bugs at lists.infradead.org
Sat Feb 18 14:00:35 PST 2017


A new Flyspray task has been opened.  Details are below. 

User who did this - Hannu Nyman (hnyman) 

Attached to Project - LEDE Project
Summary - anon_mount 1 in fstab freezes boot in wrt3200acm
Task Type - Bug Report
Category - Base system
Status - Unconfirmed
Assigned To - 
Operating System - All
Severity - High
Priority - Very Low
Reported Version - lede-17.01
Due in Version - Undecided
Due Date - Undecided
Details - I have run into strange trouble with my new WRT3200ACM:

anon_mount 1 option in /etc/config/fstab causes the boot process to hang.
Hang can be triggered manually with "/sbin/block mount" when that option is set.
Kernel log fills from entries "pxa3xx-nand f10d0000.flash: Wait time out!!!"

I am filing this bug report for 17.01, but the bug seems to be also in master.

----

For some reason enabling the anon_mount option in /etc/config/fstab prevents the boot process from completing. The boot progresses to some stage and router e.g. answers ping, but power led blinks and it does not allow login and does not provide dhcp etc. services.

I have had that option in all my routers (WNDR3700, WNDR3800, R7800) to make USB memory sticks to automount when inserted into the router's USB port. So it is a quite normal setting.

I first compiled a mvebu wrt3200acm firmware image from master with kernel 4.9, and that failed to boot. I thought that the new kernel 4.9 might be the reason. So I installed 17.01.0-rc2 official image and it booted ok. I installed packages, configured, rebooted and everything was ok as long as I did not change that anon_mount to 1 in fstab. After changing that, the next boot again gets stuck. (Editing the option in failsafe enables the router to boot normally.)

Boot completes ok with the output of "block detect" entered into fstab:

    config 'global'
            option  anon_swap       '0'
            option  anon_mount      '0'
            option  auto_swap       '1'
            option  auto_mount      '1'
            option  delay_root      '5'
            option  check_fs        '0'

Boot does not complete with anon_mount 1 in /etc/config/fstab: 

    config 'global'
            option  anon_swap       '0'
            option  anon_mount      '1'
            option  auto_swap       '1'
            option  auto_mount      '1'
            option  delay_root      '5'
            option  check_fs        '0'

I have no good guess about the reason.  My initial guess was some connection to ubi1:syscfg being mounted as /tmp/syscfg as that is different than in my other devices, but it is hard to see how that could be the reason. (That mounting is done in /lib/preinit/81_linksys_syscfg )


After some investigation it looks like the reason is actually "/sbin/block mount".

At the boot the init script /etc/init.d/fstab actually runs "/sbin/block mount".
Running that command manually from console (with anon_mount 1) makes the console to hang. From another console window I can see that system & kernel log fills from entries like these:

    kern.err kernel: [ 3032.483307] pxa3xx-nand f10d0000.flash: Wait time out!!!
    kern.err kernel: [ 3032.683301] pxa3xx-nand f10d0000.flash: Wait time out!!!
    kern.err kernel: [ 3032.883296] pxa3xx-nand f10d0000.flash: Wait time out!!!
    kern.err kernel: [ 3033.083293] pxa3xx-nand f10d0000.flash: Wait time out!!!
    kern.err kernel: [ 3033.283291] pxa3xx-nand f10d0000.flash: Wait time out!!!
    kern.err kernel: [ 3033.483287] pxa3xx-nand f10d0000.flash: Wait time out!!!
    kern.err kernel: [ 3033.683283] pxa3xx-nand f10d0000.flash: Wait time out!!!

And the "block" process can't even be killed with "kill -9" or "kill -15".
I rebooted the router from power switch to get it killed.

With anon_mount 0 in fstab the same command works ok and produces:

   root at LEDE:~# /sbin/block mount
   block: /dev/ubiblock0_0 is already mounted on /rom
   block: /dev/ubi0_1 is already mounted on /overlay



More information can be found at the following URL:
https://bugs.lede-project.org/index.php?do=details&task_id=533



More information about the lede-bugs mailing list