[Bug Report] GL-MT6000 (Flint 2) Firmware 4.11.1 / 4.11.2: Unbounded /tmp/beerocks/logs growth fills /tmp to 100%, breaking WAN DNS (DNS_PROBE_FINISHED_BAD_CONFIG)

Environment

  • Device: GL-MT6000 (Flint 2) reproduced identically on two units (main router + mesh node)
  • Firmware Version: 4.11.1 (OpenWrt 21.02-SNAPSHOT r15812+1102-46b6ee7ffc, build timestamp Nov 22 11:38); also likely affecting 4.11.2 (released Nov 25), whose changelog only lists two targeted security fixes (rtty hardening and parameter validation) with no mention of prplMesh logging changes.

Summary

In firmware 4.11.1, prplMesh (beerocks) continuously writes ~1 MB rotated log files into /tmp/beerocks/logs with no file count limit. Within ~24 hours of uptime, /tmp (494.7M tmpfs) reaches 100% capacity (0–44K free). Once /tmp is full, WAN DHCP renewals fail to populate /tmp/resolv.conf.d/resolv.conf.auto, leaving dnsmasq without upstream DNS servers and breaking internet resolution across all LAN clients (DNS_PROBE_FINISHED_BAD_CONFIG).

Root Cause

Inspecting /opt/prplmesh/config/beerocks_controller.conf (and beerocks_agent.conf), the service startup script generates the following [log] configuration:

[log]
log_global_levels=error,info,warning,fatal
log_global_syslog_levels=error,info,warning,fatal,trace,debug
log_global_size=1000000
log_files_enabled=true
log_files_path=/tmp/beerocks/logs
log_files_auto_roll=true
log_stdout_enabled=false
log_syslog_enabled=false

Because log_files_auto_roll=true has no max-file retention cap and info logging is enabled, beerocks_*.20*.log accumulates until /tmp is completely exhausted:

Filesystem                Size      Used Available Use% Mounted on
tmpfs                   494.7M    494.6M     44.0K 100% /tmp

505228  /tmp/beerocks

When /tmp hits 100%, udhcpc cannot write upstream DNS entries to /tmp/resolv.conf.d/resolv.conf.auto, leaving the file empty while dnsmasq remains pointed at resolv-file=/tmp/resolv.conf.d/resolv.conf.auto.

Temporary Workaround (Until Patched)

  1. Prune rotated beerocks logs every 10 minutes via system cron (note: GL.iNet's default crond only watches /tmp/gl_crontabs, so /etc/init.d/cron must also be enabled):

    for f in /tmp/beerocks/logs/*.log; do : > "$f"; done
    (crontab -l 2>/dev/null | grep -v '/tmp/beerocks/logs'; echo "*/10 * * * * find /tmp/beerocks/logs -name 'beerocks_*.20*.log' -mmin +10 -delete") | crontab -
    /etc/init.d/cron enable
    /etc/init.d/cron restart
    
  2. Ensure resolv.conf.auto stays populated by setting static upstream resolvers on wan (or running ifup wan after clearing /tmp):

    uci set network.wan.peerdns='0'
    uci del network.wan.dns 2>/dev/null
    uci add_list network.wan.dns='1.1.1.1'
    uci add_list network.wan.dns='8.8.8.8'
    uci commit network
    /etc/init.d/network reload
    /etc/init.d/dnsmasq restart
    

Suggested Fix for Next Release

Set log_files_enabled=false (or restrict log_global_levels=error,fatal with a strict rotated file count cap) in the prplMesh config generator so /tmp/beerocks/logs cannot exhaust RAM on tmpfs.

I have found the same issue as this. I have disabled mesh for now. Hope an updated FW is released soon.

@charles2 Can you have a look on this?
I've not enabled mesh

Hi,

Thank you for the detailed report.

We’ve reported this issue to the relevant team for further investigation.

If possible, could you please run the following command on the affected devices before clearing the logs or rebooting, and share the output with us?

uptime
ls -agh /tmp/beerocks/logs/
du -sh /tmp/beerocks/logs/

Temporary workaround

  • On the Controller, run the following commands:
/opt/prplmesh/bin/beerocks_cli -c "bml_set_log_level all a 0"
rm -r /tmp/beerocks/logs/*
  • For all Mesh nodes, including the main node and child nodes, you can use the following commands.
sed -i '/^log_files_enabled=/s/=.*/=false/' /opt/prplmesh/config/beerocks_controller.conf
sed -i '/^log_files_enabled=/s/=.*/=false/' /opt/prplmesh/config/beerocks_agent.conf

After running these two commands, we recommend rebooting the device.

If you choose not to reboot, please run the following two commands instead.

rm -r /tmp/beerocks/logs/*
/etc/init.d/gl-mesh restart

If the issue persists, please feel free to contact us.

Thank you for your understanding and support.

I’m seeing the same log buildup on a Flint 2 (GL-MT6000) running firmware 4.11.2 with Mesh enabled. About 36 hours after updating, internet access stopped and the router became very slow. A reboot restored connectivity. After 2 hours and 29 minutes, /tmp/beerocks/logs was already using about 37 MiB and was still growing.

Thanks for the quick fix! I tested firmware 4.11.3 on my Flint 2 and can confirm the Mesh log buildup is resolved. When a new log file was created, the oldest one was removed, and /tmp usage stayed at 2%.

Thank you for the quick fix, do you still need me to run the command and share the output?

(post deleted by author)

I'm very new with running commands like this through SSH.

Could i run these commands also on my Flint 3 with 4.10.3 and Mesh on?

Because, since updating my Flint 3 with a No settings update from 4.10.2 to 4.10.3 and a clean Slate 7 as a mesh node with 4.10.3, my memory is also very high with or without Adguard On. I also deleted some Adguard filter lists, but my memory sits on about 85-87%. When my Flint 3 was on 4.10.1 an 4.10.2 with Slate 7 as mesh node on 4.10.1 and more filter lists in Adguard, my memory was steady 78-79%.

But my Flint 3 uses 7% less Flash now at this moment with 4.10.3 comparing to when it was running on 4.10.1 and 4.10.2.

Edit:

I just started local SSH and memory usage dropped 4% and did nothing in SSH.

Directly Closing SSH again, is causing another drop to 80.3% memory usage.

I don't understand why SSH is causing a memory drop?