Skip to content

Large numbers of Quic tests failed when run locally #70673

Closed

Description

@danmoseley

I ran all inner+outerloop tests on my Windows 11 laptop (21H2 22000.675).

770 System.Net.Quic tests failed with "SEC_E_ALGORITHM_MISMATCH | The client and server cannot communicate, because they do not possess a common algorithm."

    <test name="System.Net.Quic.Tests.QuicConnectionTests_MsQuicProvider.Dispose_WithPendingAcceptAndConnect_PendingAndSubsequentThrowOperationAbortedException" type="System.Net.Quic.Tests.QuicConnectionTests_MsQuicProvider" method="Dispose_WithPendingAcceptAndConnect_PendingAndSubsequentThrowOperationAbortedException" time="0.0306188" result="Fail">
        <failure exception-type="Microsoft.Quic.MsQuicException">
          <message><![CDATA[Microsoft.Quic.MsQuicException : ConfigurationLoadCredential failed: Unknown status '-2146893007']]></message>
          <stack-trace><![CDATA[   at Microsoft.Quic.MsQuic.ThrowIfFailure(Int32 status, String message) in C:\git\runtime\src\libraries\System.Net.Quic\src\System\Net\Quic\Implementations\MsQuic\Interop\msquic.cs:line 47
   at System.Net.Quic.Implementations.MsQuic.Internal.SafeMsQuicConfigurationHandle.Create(QuicOptions options, QUIC_CREDENTIAL_FLAGS flags, X509Certificate certificate, SslStreamCertificateContext certificateContext, List`1 alpnProtocols, CipherSuitesPolicy cipherSuitesPolicy) in C:\git\runtime\src\libraries\System.Net.Quic\src\System\Net\Quic\Implementations\MsQuic\Interop\SafeMsQuicConfigurationHandle.cs:line 237
   at System.Net.Quic.Implementations.MsQuic.Internal.SafeMsQuicConfigurationHandle.Create(QuicClientConnectionOptions options) in 

As far as I know there's nothing special about my machine. How should I diagnose this?

Activity

  1. ghost added
    untriaged
    on Jun 13, 2022
  2. wfurt commented on Jun 13, 2022

    @wfurt
    Member

    Do you have anything in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols ?
    (or ciphers/CipherSuites)

    It feels like the system is somehow constrained to run QUIC.

  3. ManickaP commented on Jun 13, 2022

    @ManickaP
    Member

    About the ability to diagnose this. @rzikm @wfurt what kind of details does SslStream provide when similar issue happen? I'm wondering if we should include details about provided vs expected algorithms, but only if it doesn't have any security impact and if we already do or consider doing this for SslStream?

  4. danmoseley commented on Jun 13, 2022

    @danmoseley
    ContributorAuthor

    I have

    Windows Registry Editor Version 5.00
    
    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client]
    "DisabledByDefault"=dword:00000000
    "Enabled"=dword:00000001
    
    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.3\Client]
    "DisabledByDefault"=dword:00000001
    
  5. danmoseley commented on Jun 13, 2022

    @danmoseley
    ContributorAuthor

    Regardless of the cause, if a customer might see this perhaps the exception should have a custom message like " The client and server cannot communicate, because they do not possess a common algorithm." instead of "ConfigurationLoadCredential failed: Unknown status '-2146893007'"?

  6. danmoseley commented on Jun 13, 2022

    @danmoseley
    ContributorAuthor

    (Although, as a non expert, I wouldn't know how to proceed faced even with that message, it might at least give more of a clue.)

  7. wfurt commented on Jun 13, 2022

    @wfurt
    Member

    while the root cause is not clear, this is similar to #55237 in essence IMHO.
    Unfortunately, at this point the way how to solve some of this is to enable MsQuic tracing because we are dependent on native binaries and some some of the knowledge is not easy to surface in managed code.

    Out of curiosity, would the outcome change if you flip DisabledByDefault to 0 for Tls 1.3?

  8. danmoseley commented on Jun 13, 2022

    @danmoseley
    ContributorAuthor

    Out of curiosity, would the outcome change if you flip DisabledByDefault to 0 for Tls 1.3?

    When I do this the tests pass. (I don't remember ever setting this key myself...?)

  9. danmoseley commented on Jun 13, 2022

    @danmoseley
    ContributorAuthor

    so indeed this seems similar to #55237, but the message when TLS1.3 is disabled is still not clear.

  10. wfurt commented on Jun 13, 2022

    @wfurt
    Member

    MsIT ??? ;(
    AFAIK this is not the default. Perhaps #66019 could be improved.

  11. danmoseley commented on Jun 13, 2022

    @danmoseley
    ContributorAuthor

    What could have helped here is a MsQuicException message like (assuming Windows) "TLS1.3 is disabled. Check your Windows version is XX.YYYY or later, and that HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.3\Client@DisabledByDefault has the value 0"

    Perhaps that would avoid a support call? Of course if basically nobody ever sets this key and it's just my machine got messed up, maybe it's not worth it.

  12. ManickaP commented on Jun 14, 2022

    @ManickaP
    Member

    Yeah, we check for Enabled = 1 but we haven't considered DisabledByDefault, we can expand the check, that should do.

    @rzikm do you want to take this? I don't have Win11 machine on hand to test this.

  13. removed
    untriaged
    on Jun 14, 2022
  14. added this to the 7.0.0 milestone on Jun 14, 2022
  15. rzikm commented on Jun 14, 2022

    @rzikm
    Member

    I can take a look

  16. self-assigned this
    on Jun 14, 2022
  17. ghost added
    in-pr
    on Jun 14, 2022
  18. ghost removed
    in-pr
    on Jun 17, 2022
  19. ghost locked as resolved and limited conversation to collaborators on Jul 17, 2022
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

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions