Skip to content

Prevent DNS crashes when updates arrive during heavy traffic #267

Closed

Description

@scotwells

Summary

Investigate whether replacing query-handling scripts during active traffic causes the DNS forwarding process to crash.

Why it matters

Record changes are routine operations and should not interrupt every workload using the affected DNS server. The reported cause is a hypothesis, not a confirmed diagnosis.

Acceptance criteria

  • Capture a crash report that confirms or rules out the suspected interaction between scripts, live queries, and configuration updates.
  • If confirmed, replace the per-query script with built-in address-matching rules so updates do not replace code still used by active queries.

Related work

Parent: Keep Private DNS working through updates and failures.

Original report and engineering evidence are preserved in the discussion.

Activity

  1. added theissue type on Oct 29, 2026
  2. scotwells commented on Oct 29, 2026

    @scotwells
    ContributorAuthor

    The description now explains the problem and expected outcome in plain language. The original report is preserved below for the observations, diagnostics, and implementation details behind this work. It describes the situation when the issue was reported; later comments and the issue state record subsequent progress.

    Original report and engineering evidence

    What we think is happening

    Each private DNS forwarder (dnsdist) decides which tenant a query belongs to by running a small script on every query. Every config update from the serving agent replaces that script. If the old script is cleaned up while queries are still using it, and a second update arrives at the same time, the forwarder can corrupt its memory and crash. That matches the crash in Private DNS forwarder crashed after a config update: two updates half a second apart, then a segfault.

    This is a hypothesis. We haven't confirmed it yet.

    Why it matters

    A forwarder crash breaks private DNS for every workload on that node until it restarts. Record changes trigger updates, so this could recur during normal operation.

    What we'd like

    • Capture a backtrace or core dump from a crashing forwarder in staging to confirm or rule this out.
    • If it's confirmed, stop running a script on the query path. Match each tenant by its address with built-in rules instead, so config updates no longer replace code that live queries are using.

    Related to Private DNS forwarder crashed after a config update and fix: Serialize and log private DNS forwarder updates

  3. changed the title [-]Private DNS forwarder may crash when its config is updated under load[/-] [+]Prevent DNS crashes when updates arrive during heavy traffic[/+] on Oct 29, 2026
  4. self-assigned this
    on Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions