Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: dotnet/SqlClient
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: dotnet/SqlClient
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: dev/automation/login-timeout-diagnostics
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 1 commit
  • 4 files changed
  • 2 contributors

Commits on Jul 22, 2026

  1. Add env-gated login-timeout diagnostics for post-login timeout invest…

    …igation
    
    Investigating intermittent CI failures of the form:
    
      Connection Timeout Expired. The timeout period elapsed during the
      post-login phase. ... [Post-Login] complete=89010
    
    These occur during connection OPEN (post-login CompleteLogin read), not
    bulk copy. To determine whether the ~89s budget comes from a large
    configured ConnectTimeout (environment/server stall) or from an inflated /
    mis-propagated timer budget (driver bug), this adds temporary instrumentation
    that correlates the configured ConnectTimeout with the actual timer budget
    handed to the SNI read.
    
    Instrumentation (LoginTimeoutDiagnostics, gated behind the
    MDS_LOGIN_TIMEOUT_DIAG environment variable; default OFF so normal builds and
    tests are unaffected):
    
      * LoginTimerSetup   - logs configured ConnectTimeout, resolved login-timer
                            budget, caller (pool) timer state, and the relevant
                            AppContext switches at login start.
      * LoginAttemptBudget- logs the timeout (seconds) actually handed to the SNI
                            read for each login attempt.
      * TimeoutMessageBuilt - logs phase durations and diagnostic context when the
                            timeout error message is built, and appends a compact
                            [MDS-TIMEOUT-DIAG ...] suffix directly to the
                            SqlException message so it is captured in test output.
    
    The CI-SqlClient pipeline (dotnet-sqlclient-ci-core.yml) sets
    MDS_LOGIN_TIMEOUT_DIAG=1 so scheduled/CI runs emit these lines automatically.
    
    This is temporary diagnostic tooling and should be reverted once the root
    cause is identified.
    
    Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
    Copilot-Session: 47316e67-7fb7-405b-9eea-1b5d075b0f49
    cheenamalhotra and Copilot committed Jul 22, 2026
    Configuration menu
    Copy the full SHA
    5ddb446 View commit details
    Browse the repository at this point in the history
Loading