Skip to content

Tracking: outstanding fork work — dnssd pin & upstreaming #2

Description

@hughobrien

Tracking issue for outstanding work on this fork and its downstream consumer (keylight-hap), so it doesn't get lost. The upstreaming approach is being discussed in brutella#68.

1. dnssd mDNS busy-loop — pinned to an unreleased upstream commit

keylight-hap pins github.com/brutella/dnssd to v1.2.15-0.20260227152348-8c9d3cd68d00 (upstream master) to pick up commit 8c8f363 "Fixes connection leak and endless loop when context error is deadline exceeded".

  • Bug: in dnssd ≤ v1.2.14, mdnsConn.readInto's isDone only treats context.Canceled as done; on a DeadlineExceeded context the read loop never exits and spins on immediate ReadFrom errors → 2–3 cores pegged. Observed on the deploy host (216–300% CPU → ~4% after the bump; nanosleep ~37k/4s → ~95).
  • The fix is already merged upstream, just unreleased. Latest dnssd release is still v1.2.14.
  • Action: bump the pin from the commit to a tagged release once brutella publishes v1.2.15+. No PR needed.

2. Upstreaming the feature branches

Approach under discussion in brutella#68.

3. tlv8 fixes currently bundled inside adaptive-lighting

The AL branch also carries two general, non-AL tlv8 bugfixes:

  • 7435a20writeFloat32 wrote zero bytes (encoder).
  • 5ddb625 — encoder ignored the ,optional tag flag + decoder dropped fields after an absent optional.

For clean upstreaming these would ideally live on their own branch/PR rather than riding the AL PR. (The decoder-side ,optional fix complements the already-merged tlv8-unmarshal-bug work, which fixed only the decode path.)

Current pins (keylight-hap)

  • hap fork: github.com/hughobrien/hap@910e73c (fork master)
  • dnssd: github.com/brutella/dnssd@v1.2.15-0.20260227152348-8c9d3cd68d00

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions