What happened
On a dev machine, ~/.devedge/logs/devedged.err.log had grown to ~1.4 GB. It was being appended
several times a minute by the same line from the reconcile loop:
{"level":"ERROR","msg":"hosts sync failed","err":"open /etc/hosts: permission denied"}
i.e. an unprivileged devedged retries /etc/hosts sync every ~15s forever, writing an ERROR each
tick. A single persistent condition silently filled >1 GB of disk. (Also observed: a stale root-owned
devedged lingering for weeks, compounding the growth.)
Ask
Ship sane log hygiene by default — a dev tool should never let its own log fill the disk:
- Bound + rotate
~/.devedge/logs/devedged.{err,out}.log out of the box — e.g. lumberjack-style
MaxSize (say 10–50 MB), MaxBackups, MaxAge, Compress. No opt-in required.
- Rate-limit / dedupe repeating reconcile errors — a steady-state failure (permission denied, no
privilege, unreachable upstream) should log once then back off / collapse ("last error repeated
N times"), not once per tick.
- Optional: surface the steady-state error via
de status/de doctor instead of only the log, so a
broken-but-running daemon is visible without tailing a growing file.
Environment
- macOS,
de/devedged dev build.
- Repro: start
devedged unprivileged (can't write /etc/hosts) and leave it running — the err log
grows unbounded from the repeating reconcile error.
Impact
Silent disk fill on developer machines; the signal (one real problem) is buried in millions of
identical lines.
What happened
On a dev machine,
~/.devedge/logs/devedged.err.loghad grown to ~1.4 GB. It was being appendedseveral times a minute by the same line from the reconcile loop:
i.e. an unprivileged
devedgedretries/etc/hostssync every ~15s forever, writing an ERROR eachtick. A single persistent condition silently filled >1 GB of disk. (Also observed: a stale root-owned
devedgedlingering for weeks, compounding the growth.)Ask
Ship sane log hygiene by default — a dev tool should never let its own log fill the disk:
~/.devedge/logs/devedged.{err,out}.logout of the box — e.g. lumberjack-styleMaxSize(say 10–50 MB),MaxBackups,MaxAge,Compress. No opt-in required.privilege, unreachable upstream) should log once then back off / collapse ("last error repeated
N times"), not once per tick.
de status/de doctorinstead of only the log, so abroken-but-running daemon is visible without tailing a growing file.
Environment
de/devedgeddev build.devedgedunprivileged (can't write/etc/hosts) and leave it running — the err loggrows unbounded from the repeating reconcile error.
Impact
Silent disk fill on developer machines; the signal (one real problem) is buried in millions of
identical lines.