Skip to content

host-daemon-stdio.log grows without limit (437 MB on one Mac) #5821

Closed

Description

@brsbl

Summary

logs/host-daemon-stdio.log is appended to across restarts and never rotated. On a Mac whose host daemon serves a second server, the file reached 437 MB. A single repeating warning wrote it (see the related issue below). Disk use grows until someone deletes the file by hand.

Versions and environment

  • bb-app 0.46.2-nightly.39036585709.1, installed through the desktop app's host-daemon service
  • macOS 26.5 (Darwin 25.5.0), Apple silicon
  • One Mac runs two host daemons, each enrolled with a different server (--host-daemon-port 38887 and 38888)

Steps to reproduce

  1. Run a host daemon for several days while it logs a recurring warning (any repeated WARN with an err object will do).
  2. Check ls -l <dataDir>/logs/host-daemon-stdio.log.

Expected vs actual

  • Expected: the file is capped or rotated, as the application logs are (host-daemon.N.log).
  • Actual: 437,015,681 bytes and still growing. In the same directory the rotated host-daemon.N.log files are at most 15 MB each. There are also 2,521 other files under logs/ going back to July, about 0.8 GB in total.

Evidence

docs/debugging-and-qa.md says that these files "append across restarts and are separate from rotating application logs", so the missing cap is the documented behavior.

Suggested priority

Medium. Nothing is lost, but disk use grows silently and without limit. The workaround is to delete the file by hand.

Activity

  1. added theissue type on Oct 20, 2026
  2. added
    host
    confirmed-repro
    on Oct 20, 2026
  3. bb-slop-cop commented on Oct 20, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    • Classification: Bug · Priority: Medium · Effort: Medium · Area: host (all previously missing).
    • Reproduction and root-cause report: REPRODUCED, high root-cause confidence. Reproduction label: confirmed-repro.
    • Root cause: the launcher connects service stdout/stderr directly to an append-only file descriptor, without a size limit or rotation. Application-log rotation does not cover this capture.
    • Evidence: two clean checkouts of trusted main reproduced 48 MiB while running and 64 MiB after restart for both service captures. Both builds passed; all five existing capture tests passed. The original Mac measurements remain unverified.
    • No PR: safe live rotation needs a retention/reopen design that preserves the existing direct-file backpressure protection, outside this rule’s simple-fix gate. A real-child probe confirmed that renaming alone leaves the child writing to the old file.

    AGENT GENERATED

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-reprohost

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions