Router in the state not responding to the ethernet and even console. After looking into logs, I see that before router deadlocked it executed two scripts almost simultaneously:
script 1: “reboot” (the first in the order)
script 2: “ifdown internet; sleep 1; ifup internet” (second, in 2 ms after script 1)
The command list above is simplified; the actual scripts have more commands and diag output into the file (and btw hangup may happen in those logging I/O operations too). The “reboot”” script finished “before” “if” script logged finish. What I can certainly say that ifdown has completed, but no info if ifup has started (no respective log entries - but this may happen because of volumes were unmounted).
Last syslog records on the mounted volume (not root fs) are:
Sat Apr 11 01:18:40 2026 authpriv.info dropbear[3008]: Early exit: Terminated by signal
Sat Apr 11 01:18:40 2026 daemon.notice netifd: internet (20766): Command failed: ubus call network.interface notify_proto { "action": 0, "link-up": false, "keep": false, "interface": "internet" } (Permission denied)
Sat Apr 11 01:18:40 2026 daemon.notice netifd: Interface 'internet' is now down
I have tried to run
reboot & { ifdown internet; sleep 1; ifup internet; } &
several times but did not achieve to reproduce the case.
I also tried running those full scripts with logging several times in same manner, unable to reproduce. System reboots and gets up.
This programmatic design is relatively old, and must have happened before, and this is first time I have got deadlock (bad coincidence of something?).
I have no idea what exactly have caused the issue (not enough info logged) but decided to ask here.
- Do you have any idea what may have happened? Or: may what I explain be the cause of deadlock, or I am certainly looking into the wrong place?
- Any advice how to prevent this deadlock - because resolving it requires physical access to router to power cycle it. The first thing comes to my mind is in any of these scripts create lock file, with reboot script not removing the lock file at all (because ifdown/ifup won’t matter anymore). Better ideas?
Edit: another, better questions I (almost) never thought about.
- What is the right way to perform
reboot? I recall some time ago playing with it if you do not let script withrebootcommand to finish, reboot does not happen: e.g. something like “reboot; while true; do sleep 1; done” just hangs the script without reboot happening and thus system deadlocks if in single-user mode (e.g. in system initialization scripts). - How asynchronous is it?
- Is there any way to prepare system for issuing reboot to ensure new (user) processes are not allowed to be spawned and resource grabbing prevented at the time I issue
rebootcommand?