Skip to content

Every dotnet command waits 2 s on SDK 11 RC2/RC3 (Linux): the telemetry exporter's Azure VM metadata request to 169.254.169.254 times out #56928

Closed

Description

@zion-sati

Summary

On Linux, every dotnet command under SDK 11.0.100 RC2 and RC3 takes about 2 seconds longer than it should, including dotnet --version. The CLI telemetry exporter requests Azure VM metadata from 169.254.169.254 and waits for that request to time out before the process exits. On a machine that isn't an Azure VM, that address is routed through the default gateway, which silently drops it, so every command pays the full timeout.

SDK 10.0.402 on the same machine is not affected. Setting DOTNET_CLI_TELEMETRY_OPTOUT=1 removes the delay.

Environment

  • Ubuntu 26.04.1 LTS, x64 (linux-x64)
  • SDK 11.0.100-rc.3.26522.148 and 11.0.100-rc.2.26504.105, compared with 10.0.402, each selected with a global.json pin
  • No OTEL_*, APPLICATIONINSIGHTS_* or DOTNET_CLI_TELEMETRY_* variables set except where the table says so
  • An ordinary home network: ip route get 169.254.169.254 resolves through the default gateway; there's no link-local route

Reproduction

time dotnet --version
Configuration Wall time
SDK 10.0.402, default 0.06 s
SDK 11.0.100-rc.2.26504.105, default 2.02 s
SDK 11.0.100-rc.3.26522.148, default 2.02 s
RC3, DOTNET_CLI_TELEMETRY_OPTOUT=1 0.01 s
RC3, DOTNET_CLI_TELEMETRY_SHUTDOWN_TIMEOUT_MS=0, 100 or 500 2.02 s
RC3, APPLICATIONINSIGHTS_STATSBEAT_DISABLED=true 2.02 s
RC3, telemetry on, connections to 169.254.169.254 refused immediately (LD_PRELOAD shim on connect) 0.02 s

The time is spent waiting, not computing: real 2.03s, user 0.03s.

What the trace shows

strace -f -tt -e trace=connect,sendto,exit_group dotnet --version with RC3, times relative to the first connection:

  • +0.00 s: connect to ::ffff:169.254.169.254 port 80 returns EINPROGRESS and never completes.
  • +0.05 s: connect to the Application Insights ingestion endpoint on port 443; the TLS handshake completes and the telemetry payload is sent by +0.68 s.
  • +0.87 s: a second connect to ::ffff:169.254.169.254 port 80.
  • +2.00 s: exit_group(0).

The process exits 2.00 s after the first metadata request, long after the telemetry upload has finished.

The address appears in the SDK's Azure.Monitor.OpenTelemetry.Exporter.dll as http://169.254.169.254/metadata/instance/compute?api-version=2017-08-01&format=json. The SDK's Microsoft.Identity.Client.dll and Azure.Core.dll also contain IMDS endpoints, but the CLI configures the exporter with a connection string, so I believe the exporter's VM metadata lookup is the request being made. Refusing that address in a preload shim, with nothing else changed, brings the command from 2.02 s to 0.02 s.

Expected behavior

A CLI command shouldn't wait on cloud-VM detection. Skipping the VM metadata lookup in the CLI's exporter configuration, or not blocking process exit on it, would remove the delay for anyone whose network drops packets to 169.254.169.254 rather than rejecting them.

Related

Activity

  1. added
    untriaged
    on Nov 4, 2026
  2. locked and limited conversation to collaborators on Nov 4, 2026
  3. unlocked this conversation on Nov 4, 2026
  4. added
    needs team triage
    and removed
    untriaged
    on Nov 4, 2026
  5. github-actions commented on Nov 4, 2026

    @github-actions
    Contributor

    🎯 Agentic Issue Triage

    Triage Assessment:

    • 🏷️ Labels: Area-Telemetry Bug performance needs team triage Requires a full team discussion
    • 💻 Assignment: none | @dotnet/dotnet-cli
    • 🟨 Confidence: medium - Telemetry area fits, but CODEOWNERS has no Area-Telemetry section, so routing falls back to the default team.

    Similar issues: #54282 (potentially related) #55184 (potentially related)

    ➡️ Summary: On Linux, SDK 11 RC2/RC3 commands wait about 2 seconds on the telemetry exporter's Azure VM metadata request to 169.254.169.254. Consider disabling VM metadata detection in the exporter or not blocking exit on it.

    Generated by 🏷️ Issue Triage for #56928 · copilot · auto · 22 AIC · ⌖ 0.683 AIC · ⊞ 14.6K · ◷

  6. martincostello commented on Nov 4, 2026

    @martincostello
    Member

    I think this is already fixed for 11.0.0: #56863

  7. baronfel commented on Nov 4, 2026

    @baronfel
    Member

    Yep! We should be all clear.

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

    Area-TelemetryBugneeds team triageperformance

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions