You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sysupgrade -n completes and announces its reboot, but the camera sometimes never comes back — only a physical power cycle recovers it. Seen repeatedly; opening this to pin the mechanism down rather than to report a single event.
Distinct from the page-cache hazard fixed by the ramfs pivot in #2251: that one is about rewriting the rootfs the camera runs from, and it is excluded here — the run below pivoted into RAM successfully (Flashing from RAM (pid 1041)) and never touched mtd3. The only partition written was rootfs_data.
mtd4 "rootfs_data", 008b0000, erasesize 00010000, jffs2 on /dev/mtdblock4 mounted at /overlay
Steps to reproduce
/usr/sbin/sysupgrade -n --web
The WebUI's Reset firmware button runs the same thing, so it reproduces from the browser too. --web is incidental — it only skips the killall -3 majestic in free_resources().
What happens
The run completes normally end to end, erase reaches 100%, and sysupgrade prints its reboot line:
OpenIPC System Updater v1.0.60
Vendor hisilicon
SoC hi3516ev300
Model hi3516ev300
Kernel 22:58:06 2026-08-21
RootFS master+2f558d4, 2026-08-21
Synchronizing time
Sun Aug 23 06:16:23 UTC 2026
Stop services, sync files, free up memory
Stopping crond: OK
Stopping ntpd: OK
Stopping klogd: OK
Stopping syslogd: OK
Uptime:
06:16:24 up 22:40, load average: 0.22, 0.17, 0.10
Memory:
total used free shared buff/cache available
Mem: 120.7M 53.7M 61.8M 20.0K 5.1M 64.5M
Swap: 0 0 0
Processes:
PID USER TIME COMMAND
1 root 0:01 init
694 root 0:00 udhcpc -x hostname:hi3516ev300-imx335 -A 0 -T 1 -t 5 -R -b -O search -p /var/run/udhcpc.eth0.pid -i eth0
705 root 0:00 dropbear -R -B -k -p 22 -K 300
847 root 1h19 majestic -s
854 root 0:00 /sbin/getty -L console 0 vt100
1039 root 0:00 dropbear -R -B -k -p 22 -K 300
1040 root 0:00 sh -c /usr/sbin/sysupgrade -n --web 2>&1 | cat
1041 root 0:00 {sysupgrade} /bin/sh /usr/sbin/sysupgrade -n --web
1042 root 0:00 cat
1093 root 0:00 ps
Unmounting SD card
Protected: flashing continues even if this terminal disconnects.
Moving the flash phase into RAM
Flashing from RAM (pid 1041)
OverlayFS
Erase overlay partition
Erasing 64 Kibyte @ 8b0000 - 100% complete.Cleanmarker written at 8a0000.
Unconditional reboot
Then nothing. No ICMP, no :80, no :22 for ~45 minutes. A manual power cycle brought it straight back, healthy, with a correctly wiped overlay — so the flash contents were fine and the reset itself did what it was asked. It is the reboot that did not take.
Timing, from the timestamped capture: the whole run is 34 s. The erase is 139 blocks at ~215 ms each (~30 s of the 34), and the last byte received is Unconditional reboot.
Not a bad erase or a corrupt overlay. After the power cycle the camera booted clean on a freshly populated overlay.
Not board-specific to goke. Reported against gk7205v300 in majestic-webui#154 and reproduced here on hi3516ev300 — though on gk7205v300 the same command did reboot normally, so it is intermittent rather than universal.
Leading hypothesis: the overlay is erased while it is still mounted
do_wipe_overlay() erases rootfs_data and nothing unmounts or remounts it first:
At that point /dev/mtdblock4 is still a live, read-write jffs2, and pivot_root moved it to /mnt rather than releasing it — so after the erase the in-kernel jffs2 state describes a medium that no longer exists. busybox reboot -f calls reboot(RB_AUTOBOOT) straight into kernel_restart(), which runs device_shutdown() before machine_restart(). A jffs2 GC thread or a pending writeback stuck on erased blocks would block exactly there, which fits the symptom: the announcement is printed, nothing further happens, and only cutting power gets the SoC to reset.
That would also explain the intermittency — whether jffs2 has dirty state or GC in flight at erase time depends on what was written to the overlay just before.
Worth considering alongside it:
free_resources() stops the watchdog service on boards that have one, so nothing is left armed to rescue a hung reset. If the reboot path can hang at all, disarming the watchdog first removes the one thing that would have papered over it.
With --web, majestic is deliberately left running across the erase. Anything of its still open on the overlay disappears mid-erase.
What would settle it
A serial console capture across the next reproduction — that is the only place a hang between Unconditional reboot and machine_restart() is visible. Failing that, echo b > /proc/sysrq-trigger as an alternative reboot primitive would tell us whether the block is in device_shutdown() (sysrq-b skips it) or lower down.
If the hypothesis holds, the fix is presumably to get the overlay out of the way before erasing it — mount -o remount,ro or a real unmount of /mnt/overlay post-pivot — rather than to make the reboot more forceful.
sysupgrade -ncompletes and announces its reboot, but the camera sometimes never comes back — only a physical power cycle recovers it. Seen repeatedly; opening this to pin the mechanism down rather than to report a single event.Distinct from the page-cache hazard fixed by the ramfs pivot in #2251: that one is about rewriting the rootfs the camera runs from, and it is excluded here — the run below pivoted into RAM successfully (
Flashing from RAM (pid 1041)) and never touchedmtd3. The only partition written wasrootfs_data.Environment
master+2f558d4, 2026-08-21,BUILD_PLATFORM=hi3516ev300_lite,OPENIPC_VERSION=2.6.08.21mtd4 "rootfs_data",008b0000, erasesize00010000, jffs2 on/dev/mtdblock4mounted at/overlaySteps to reproduce
The WebUI's Reset firmware button runs the same thing, so it reproduces from the browser too.
--webis incidental — it only skips thekillall -3 majesticinfree_resources().What happens
The run completes normally end to end, erase reaches 100%, and sysupgrade prints its reboot line:
Then nothing. No ICMP, no
:80, no:22for ~45 minutes. A manual power cycle brought it straight back, healthy, with a correctly wiped overlay — so the flash contents were fine and the reset itself did what it was asked. It is the reboot that did not take.Timing, from the timestamped capture: the whole run is 34 s. The erase is 139 blocks at ~215 ms each (~30 s of the 34), and the last byte received is
Unconditional reboot.What this rules out
rebootwasbusyboxrunning from tmpfs, not from a rewritten partition.mtd3was never written.Leading hypothesis: the overlay is erased while it is still mounted
do_wipe_overlay()erasesrootfs_dataand nothing unmounts or remounts it first:At that point
/dev/mtdblock4is still a live, read-write jffs2, andpivot_rootmoved it to/mntrather than releasing it — so after the erase the in-kernel jffs2 state describes a medium that no longer exists.busybox reboot -fcallsreboot(RB_AUTOBOOT)straight intokernel_restart(), which runsdevice_shutdown()beforemachine_restart(). A jffs2 GC thread or a pending writeback stuck on erased blocks would block exactly there, which fits the symptom: the announcement is printed, nothing further happens, and only cutting power gets the SoC to reset.That would also explain the intermittency — whether jffs2 has dirty state or GC in flight at erase time depends on what was written to the overlay just before.
Worth considering alongside it:
free_resources()stops the watchdog service on boards that have one, so nothing is left armed to rescue a hung reset. If the reboot path can hang at all, disarming the watchdog first removes the one thing that would have papered over it.--web, majestic is deliberately left running across the erase. Anything of its still open on the overlay disappears mid-erase.What would settle it
A serial console capture across the next reproduction — that is the only place a hang between
Unconditional rebootandmachine_restart()is visible. Failing that,echo b > /proc/sysrq-triggeras an alternative reboot primitive would tell us whether the block is indevice_shutdown()(sysrq-b skips it) or lower down.If the hypothesis holds, the fix is presumably to get the overlay out of the way before erasing it —
mount -o remount,roor a real unmount of/mnt/overlaypost-pivot — rather than to make the reboot more forceful.Found while working on majestic-webui#154 (OpenIPC/majestic-webui#154).