Skip to content

DnsResolver Windows 10/Server 2019 memory leak #130374

Closed

Description

@MichalPetryka

so I was kinda curious how you'll solve this.

Currently it's best-effort. As the article you linked in one of your previous comments said, there is no good way to predict if the query will complete synchronously, so we instead detect the condition ex-post and take the memory leak. We will also practively avoid async path for names we are sure will be resolved synchronously (currently "localhost" only, but we can add more in the future) to mittigate the most common case that would otherwise leak.

I plan to follow-up with the Windows team to see if there a more specific criteria we can use for that.

Originally posted by @rzikm in #129845 (comment)

Activity

  1. added
    untriaged
    on Jul 8, 2026
  2. MichalPetryka commented on Jul 8, 2026

    @MichalPetryka
    ContributorAuthor

    Opened for tracking.

  3. dotnet-policy-service commented on Jul 8, 2026

    @dotnet-policy-service
    Contributor

    Tagging subscribers to this area: @karelz, @dotnet/ncl
    See info in area-owners.md if you want to be subscribed.

  4. MichalPetryka commented on Jul 9, 2026

    @MichalPetryka
    ContributorAuthor

    @rzikm From my local testing, it seems that doing a sync request first with DNS_QUERY_NO_WIRE_QUERY seems like a possible solution, it returns an error for entries not in cache and succeeds for those needing sync parsing.

  5. rzikm commented on Jul 9, 2026

    @rzikm
    Member

    Per conversation with the OS team:

    There are only a few types of query names that fall into the inline completion path, namely:

    • IP string literals
    • The machine's hostname
    • Special names "loopback", "localhost", "..DnsServers", and "..localmachine"

    Otherwise, other query names sent async should be completed in the normal callback process.

    It shouldn't be hard to augment the existing logic to trip for those

  6. rzikm commented on Jul 9, 2026

    @rzikm
    Member

    @rzikm From my local testing, it seems that doing a sync request first with DNS_QUERY_NO_WIRE_QUERY seems like a possible solution, it returns an error for entries not in cache and succeeds for those needing sync parsing.

    I don't like adding a perf hit of always doing DNS_QUERY_NO_WIRE_QUERY first I would consider it a last resort if the above is not sufficient.

  7. removed
    untriaged
    on Jul 14, 2026
  8. added this to the 11.0.0 milestone on Jul 14, 2026
  9. locked and limited conversation to collaborators on Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

  • Status
    No status

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions