Skip to content

[Bug]: QoderWake daemon falls into infinite update download loop due to probe timeout, consuming 10GB+ bandwidth #11

Open

Description

@zbjincheng

Component

QoderWake / qoderwake __daemon (macOS darwin_arm64)

Description

On macOS, the background daemon qoderwake __daemon entered a silent infinite download loop during auto-updates. Over a span of several days, it attempted to download the complete ~138MB archive (qoderwake_..._darwin_arm64.tar.gz) from download.qoder.com over 120 times, consuming tens of gigabytes of network traffic.

Root Cause Analysis

  1. Trigger: HotDeployService periodically detects a newer release (e.g. 1.1.8 → 1.1.13 / 1.2.0).
  2. Download & Extract: The service pauses polling and successfully downloads the ~138MB tarball, then extracts it into .qoderwake/.
  3. Probe Failure: When verifying the extracted binary via Runtime binary version probe, it consistently hits a 5000ms timeout (elapsedMs=4005~5357ms, timedOut=true).
  4. No Backoff / Circuit Breaker: Because the probe times out, the deployment is considered incomplete and rolls back/resumes polling. On the next cycle, the daemon sees it is still on 1.1.8, and initiates the full 138MB download from CDN all over again.

Log Evidence (~/.qoderwake/logs/qoderwake.log)

[HotDeployService] Update available: 1.1.8 → 1.1.13
[HotDeployService] Hot-deploy polling paused for update.
[HotDeployService] Downloading qoderwake 1.1.13...
[HotDeployService] Runtime binary version probe failed: reason=timeout elapsedMs=5000ms timedOut=true detail=5000ms path=/Users/.../.qoderwake/qoderwake
[HotDeployService] Extracting...
[HotDeployService] Hot-deploy polling resumed; installed updates await user restart.
[HotDeployService] Update available: 1.1.8 → 1.1.13
[HotDeployService] Downloading qoderwake 1.1.13...

Impact

  • Extreme and silent bandwidth consumption (over 10GB within 48h).
  • Potential proxy / cellular data exhaustion for developers using metered connections or proxy clients.

Suggested Fixes

  1. Circuit Breaker / Exponential Backoff: Halt repeated downloads after 2-3 consecutive failures until user intervention or application restart.
  2. Local Cache / Checksum Validation: If the .tar.gz archive is already downloaded and passes SHA-256 verification, reuse the local cache instead of fetching it from remote CDN repeatedly.
  3. Adjust Probe Timeout on macOS: Newly extracted binaries on macOS may undergo Gatekeeper/signature evaluation which can exceed 5000ms when invoked from a background daemon process.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions