Xiaomi 3G, corrupted uhttpd and rpcd after installing new official 18.06.01

Hi all,

My brand new 3G turned up this morning, so I went straight in with the official build. The biggest issue with installing is getting the ssh working, because the download link (http://d.miwifi.com/rom/ssh) is https://, and it continually redirects to the http:// site - so it looks like the Xiaomi download site is down. So be sure to change the text in the URL bar to https:// AT LEAST twice through the process.

I now have an out-of-the-box, powered up with factory firmware once and then installed a fresh build using the new stable OpenWrt 18.06.1 r7258-5eb055306f (https://downloads.openwrt.org/releases/18.06.1/targets/ramips/mt7621/mir3g-squashfs-kernel1.bin and rootfs0.bin, dated August 17 2018).

Once up and running, it lasted three reboots before LuCI no longer worked. I could ssh in, and discovered /etc/config/uhttpd was corrupted and full of null bytes. Restored it with opkg update; opkg install uhttpd --force-reinstall.

LuCI login screen appeared, but would not accept my password (which I used to ssh with so knew it was good!). Another corrupted file; /etc/config/rpcd - also all full of null bytes. I recreated this by hand:

config login
option username 'root'
option password '$p$root'
list read '*'
list write '*'

and after restarting rpcd I had full access into LuCI again. I made no changes to anything that should have touched those files - so, be warned, something isn't quite right with how it is writing to flash or surviving power shutdowns. Maybe the hardware, maybe the software - I'll keep experimenting and report any further breakages. I have yet to find any other corrupted files; just those two.

Performance-wise, it is rock solid so far running 2.4 and 5g with 4 SSID, fairly restrictive firewalling between three zones, and trunking the VLANs off the switch into my NAS. If it hadn't had config file corruption so early, I'd say this device is five star; but I'll hold back for a bit on my overall opinion.

Hope my experience helps someone else if they run into something similar.

There have been reports of 3Gs which wouldn't boot properly because of bad flash memory, this may be caused by the same thing. Have you checked dmesg?

dmesg and logread both come up clean after this and other reboots. It's looking more like a one off. I found one previous mention of this in 17.01.3 openwrt bug 1381 with a few people affected, but not mid-build like I had.

One thing that might have been the trigger, is I backed out a change - I changed the IP address of an interface, and LuCI warns that it can't contact, do you want to revert or commit? And since I hadn't seen that before, I reverted, and it seemed to come up fine. Looking at my worklog, that was followed by a few more config commits, and the very next reboot was when I got the corruption. It's not a smoking gun but it was something unusual. I tried a revert again but (sadly!) it rebooted just fine this time.

Hi guys, could someone help me please?

I've got a Netgear r7800 with OpenWRT 18.06.01 and exactly the same problem. After a powercut the files uhttpd, rpcd and firewall in /etc/config were all either corrupt or empty. I can consistently reproduce it (just unplug the device).

Any clue if this is a bug of OpenWRT or a hardware fault?

It is an upstream kernel bug, hopefully adressed by https://git.openwrt.org/?p=openwrt/openwrt.git;a=commitdiff;h=c6a1bcac16f92afa1e41eaceafc85075d97a74cd - if proven correct, the fix will be part of the next 18.06.2 service release.

Great. I will try out the development build to see if it fixes it for me.

I think this is what is happening to my r3g right now, it's been a week working fine but yesterday woke up and no internet, no luci, but ssh worked.
Had to do a 'firstboot' and configure all again, everything got working fine again.
Today, arrived home and no internet again, no luci, and this time can't ssh.
This router got me crazy, don't know if i can do anything right now that i can't eaven ssh.

Did you try it out? Maybe it'd be possible to cherry pick that commit (if it does fix the issue) over the latest 18.06.1 and compile it.

I'm having this same issue with the 3G

Also, any idea if this is a 18.06.1 issue or does 18.06.0 also has it. I see that the 3G is supported from 18.06.0 so it may be worth downgrading until 18.06.2.

I'm running 18.06.2 and the issue is gone.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.