Alright - so I was actually wrong...

I am testing this on two beaglebone blues and both had the same issue - 
it's only when the WiFi is ON and you're doing some kind of update/writing 
the the eMMC (or SD card for that matter, it was the same in both cases!)

Having had a look around, someone mentioned here: 
https://forums.balena.io/t/beaglebone-green-read-only-filesystem-lockup/560/3

That you need to change some kernel parameters - so I tried various 
min_free_kbytes sizes, and finally it seems 128kb (1024 * 128) worked. ie.:

Run these commands to fix:

sudo sysctl -w vm.min_free_kbytes=131072
sudo sysctl -w vm.dirty_ratio=5
sudo sysctl -w vm.dirty_background_ratio=10

Additionally if you're flashing the eMMC, I beleive you have to add these 
lines to the beginning of "/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh" 
if you're flashing the eMMC as per Tharmo in 
https://groups.google.com/forum/#!topic/beagleboard/xpvjJAHm8mU

(I will try this next).

But so far so good! I've been running an apt-get upgrade for a solid 10 
minutes now, and previously it would always revert to read only mode, at 
about 1 - 2 minutes in. I guess we know why this is due to /etc/fstab 
reverting to read-only mode on error, as per "errors=remount-ro"

My assumption is this:

when wifi is getting data, the wifi chip is getting the bytes too fast for 
the emmc to handle, so, if the min_free_kbytes is too small, it won't know 
where to dump the data == kernel panic ?

Anyway - hopefully this helps someone else - was a very frustrating bug to 
figure out and seems like it is related to the hardware - something to do 
with how the WiFi chip, eMMC and RAM communicate.

On Monday, June 8, 2020 at 7:22:23 AM UTC+10, Dennis Bieber wrote:
>
> On Sun, 7 Jun 2020 01:02:19 -0700 (PDT), in 
> gmane.comp.hardware.beagleboard.user Daniel 
> <me-OZSSi2IBlpFBDLzU/[email protected] <javascript:>> wrote: 
>
>
> >Jun 07 07:47:39 beaglebone kernel: omap_hsmmc 481d8000.mmc: error -110 
> >requesting status 
> >Jun 07 07:47:39 beaglebone kernel: mmcblk1: recovery failed! 
> >Jun 07 07:47:39 beaglebone kernel: print_req_error: I/O error, dev 
> mmcblk1, 
> >sector 3420440 
> >Jun 07 07:47:39 beaglebone kernel: Aborting journal on device 
> mmcblk1p1-8. 
>
>         My question would be <why is the kernel trying some sort of 
> recovery?> 
>
>         Failing a recovery likely forces the read-only mode. 
>
>         You may need to try something like booting from SD card, and 
> running 
> fsck on the eMMC partition(s). (Or worse -- a full formatting hitting 
> every 
> block of the eMMC followed by reflashing it; the eMMC may have some bad 
> blocks). 
>
>
>
>
> -- 
> Dennis L Bieber 
>
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/f976f5b5-a170-4767-a28f-4610015f544do%40googlegroups.com.

Reply via email to