Skip to content

[release/3.1] Stop building on Ubuntu 18.04 #43666

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 17, 2022

Conversation

dougbu
Copy link
Contributor

@dougbu dougbu commented Aug 31, 2022

  • use 20.04 instead

nit: Remove Ubuntu version from one CI job display name

@dougbu
Copy link
Contributor Author

dougbu commented Aug 31, 2022

@halter73 @Tratcher I bet PR validation here is going to fail similarly to how my manual #20220830.17 build failed: A number of tests (TlsHandshakeRejectsTlsLessThan12, DevCertWithInvalidPrivateKeyProducesCustomWarning, ClientAttemptingToUseUnsupportedProtocolIsLoggedAsDebug, and DoesNotSupportTls10) failed in both attempts there.

For example,

Error message
Assert.Throws() Failure\nExpected: typeof(System.IO.IOException)
Actual:   typeof(System.Security.Authentication.AuthenticationException): Authentication failed, see inner exception.
---- System.Security.Authentication.AuthenticationException : Authentication failed, see inner exception.
-------- Interop+OpenSsl+SslException : SSL Handshake failed with OpenSSL error - SSL_ERROR_SSL.
------------ Interop+Crypto+OpenSslCryptographicException : error:141E70BF:SSL routines:tls_construct_client_hello:no protocols available

Stack trace
at System.Net.Security.SslStream.StartSendAuthResetSignal(ProtocolToken message, AsyncProtocolRequest asyncRequest, ExceptionDispatchInfo exception)
at System.Net.Security.SslStream.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslStream.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslStream.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslStream.ProcessAuthentication(LazyAsyncResult lazyResult, CancellationToken cancellationToken)
at System.Net.Security.SslStream.BeginAuthenticateAsClient(SslClientAuthenticationOptions sslClientAuthenticationOptions, CancellationToken cancellationToken, AsyncCallback asyncCallback, Object asyncState)
at System.Net.Security.SslStream.BeginAuthenticateAsClient(String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation, AsyncCallback asyncCallback, Object asyncState)
at System.Net.Security.SslStream.<>c.<AuthenticateAsClientAsync>b__64_1(String arg1, X509CertificateCollection arg2, SslProtocols arg3, AsyncCallback callback, Object state)
at System.Threading.Tasks.TaskFactory`1.FromAsyncImpl[TArg1,TArg2,TArg3](Func`6 beginMethod, Func`2 endFunction, Action`1 endAction, TArg1 arg1, TArg2 arg2, TArg3 arg3, Object state, TaskCreationOptions creationOptions)
at System.Threading.Tasks.TaskFactory.FromAsync[TArg1,TArg2,TArg3](Func`6 beginMethod, Action`1 endMethod, TArg1 arg1, TArg2 arg2, TArg3 arg3, Object state, TaskCreationOptions creationOptions)
at System.Threading.Tasks.TaskFactory.FromAsync[TArg1,TArg2,TArg3](Func`6 beginMethod, Action`1 endMethod, TArg1 arg1, TArg2 arg2, TArg3 arg3, Object state)
at System.Net.Security.SslStream.AuthenticateAsClientAsync(String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation)
[at Microsoft.AspNetCore.Server.Kestrel.InMemory.FunctionalTests.HttpsConnectionMiddlewareTests.<>c__DisplayClass15_0.<<DoesNotSupportTls10>b__3>d.MoveNext() in /_/src/Servers/Kestrel/test/InMemory.FunctionalTests/HttpsConnectionMiddlewareTests.cs:line 388](https://dev.azure.com/dnceng/internal/_git/23330b81-8bf6-4092-af7d-db8dfba063b8?path=%2F_%2Fsrc%2FServers%2FKestrel%2Ftest%2FInMemory.FunctionalTests%2FHttpsConnectionMiddlewareTests.cs&version=GBdougbu%2Fubuntu.20.04%2F3.1&_a=contents&line=388&lineEnd=389&lineStartColumn=1&lineEndColumn=1&lineStyle=plain)
--- End of stack trace from previous location where exception was thrown ---
----- Inner Stack Trace -----
at System.Net.Security.SslStream.StartSendAuthResetSignal(ProtocolToken message, AsyncProtocolRequest asyncRequest, ExceptionDispatchInfo exception)
at System.Net.Security.SslStream.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslStream.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslStream.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslStream.ProcessAuthentication(LazyAsyncResult lazyResult, CancellationToken cancellationToken)
at System.Net.Security.SslStream.BeginAuthenticateAsClient(SslClientAuthenticationOptions sslClientAuthenticationOptions, CancellationToken cancellationToken, AsyncCallback asyncCallback, Object asyncState)
at System.Net.Security.SslStream.BeginAuthenticateAsClient(String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation, AsyncCallback asyncCallback, Object asyncState)
at System.Net.Security.SslStream.<>c.<AuthenticateAsClientAsync>b__64_1(String arg1, X509CertificateCollection arg2, SslProtocols arg3, AsyncCallback callback, Object state)
at System.Threading.Tasks.TaskFactory`1.FromAsyncImpl[TArg1,TArg2,TArg3](Func`6 beginMethod, Func`2 endFunction, Action`1 endAction, TArg1 arg1, TArg2 arg2, TArg3 arg3, Object state, TaskCreationOptions creationOptions)
at System.Threading.Tasks.TaskFactory.FromAsync[TArg1,TArg2,TArg3](Func`6 beg

In at least one later branch, ClientAttemptingToUseUnsupportedProtocolIsLoggedAsDebug() looks for any Exception. Should I make the same change here❔

@dougbu
Copy link
Contributor Author

dougbu commented Aug 31, 2022

/cc @BrennanConroy because the IOException ➡️ Exception change came in from #18584.

@dougbu
Copy link
Contributor Author

dougbu commented Aug 31, 2022

I'm thinking at least part of what's went on in that PR related to making the thrown Exceptions consistent across platforms, at least where OpenSSL is used. It may be the case that the runtime team didn't backport their changes to 3.1.x. Is that right @wfurt and @karelz

@dougbu
Copy link
Contributor Author

dougbu commented Aug 31, 2022

@halter73
Copy link
Member

halter73 commented Aug 31, 2022

@dougbu is the "[release/2.1]" in the title a typo? This is targeting release/3.1.

I don't think changing the exception type here matters much even in servicing. I doubt any real app to relies on AuthenticateAsClientAsync throwing an IOException instead of an AuthenticationException in these kinds of scenarios. The tests are just overly specific.

@wfurt
Copy link
Member

wfurt commented Aug 31, 2022

I don't really remember @dougbu. 2.1 is out of support and 3.1 support ends in December. Running on Ubuntu 20.04 seems fine. 22.04 is whole different beast as it comes with OpenSSL 3.

@dougbu dougbu changed the title [release/2.1] Stop building on Ubuntu 18.04 [release/3.1] Stop building on Ubuntu 18.04 Aug 31, 2022
@dougbu
Copy link
Contributor Author

dougbu commented Aug 31, 2022

@dougbu is the "[release/2.1]" in the title a typo? This is targeting release/3.1.

Yeah, my bad. Updating the title…

I don't think changing the exception type here matters much even in servicing

I'll make the change in my next iteration

I don't really remember @dougbu. 2.1 is out of support and 3.1 support ends in December.

Thanks for thinking back. (Note everything used in ASP.NET 2.1.x applications remains fully supported on .NET Framework:tm:)

Running on Ubuntu 20.04 seems fine. 22.04 is whole different beast as it comes with OpenSSL 3.

In addition, 20.04 should remain in support until April 2030 😀

@dougbu
Copy link
Contributor Author

dougbu commented Aug 31, 2022

@mthalman @crummel @lbussell which dotnet-buildtools/prereqs image should I use to replace mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-cross-arm64-alpine-85814b7-20200327151156

I can't find anything w/ alpine in the name on https://mcr.microsoft.com/v2/dotnet-buildtools/prereqs/tags/list between ubuntu-18.04-cross-arm64-alpine-85814b7-20200327151156 (how nice, we were at the latest 18.04-based image 😀) and ubuntu-22.04-cross-arm-alpine-20220830132559-b016fdd. We'd like an Ubuntu 20.04-based image for our Linux Musl ARM64 build job but I'm not sure how to search for what we need.

@dougbu
Copy link
Contributor Author

dougbu commented Sep 1, 2022

If it matters, we use the mcr.microsoft.com/dotnet/runtime-deps:2.1-alpine for our Linux Musl x64 build. Should we therefore consider mcr.microsoft.com/dotnet/runtime-deps:3.1.28-alpine3.15-arm64v8 or the alpine3.16 image❔ (I'm having trouble parsing the old Docker files to find which Alpine version we were getting.)

@dougbu dougbu force-pushed the dougbu/ubuntu.20.04/3.1 branch from a71a544 to ffe5eb9 Compare September 1, 2022 00:45
@dougbu
Copy link
Contributor Author

dougbu commented Sep 1, 2022

/azp run

@azure-pipelines
Copy link

Azure Pipelines failed to run 1 pipeline(s).

@dougbu dougbu closed this Sep 1, 2022
@dougbu dougbu reopened this Sep 1, 2022
@dougbu dougbu force-pushed the dougbu/ubuntu.20.04/3.1 branch from ffe5eb9 to 0deb156 Compare September 1, 2022 05:30
@mthalman
Copy link
Member

mthalman commented Sep 1, 2022

which dotnet-buildtools/prereqs image should I use to replace mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-cross-arm64-alpine-85814b7-20200327151156

I can't find anything w/ alpine in the name on https://mcr.microsoft.com/v2/dotnet-buildtools/prereqs/tags/list between ubuntu-18.04-cross-arm64-alpine-85814b7-20200327151156 (how nice, we were at the latest 18.04-based image 😀) and ubuntu-22.04-cross-arm-alpine-20220830132559-b016fdd. We'd like an Ubuntu 20.04-based image for our Linux Musl ARM64 build job but I'm not sure how to search for what we need.

If there isn't an existing one, the expectation is that teams will submit PRs to https://github.com/dotnet/dotnet-buildtools-prereqs-docker to produce images that meet their needs. Since this is just a move from 18.04 to 20.04, this might be as simple as copy-and-paste and update the version number.

@Pilchie Pilchie added the area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework label Sep 1, 2022
@ghost
Copy link

ghost commented Sep 1, 2022

Hey @dotnet/aspnet-build, looks like this PR is something you want to take a look at.

@dougbu dougbu force-pushed the dougbu/ubuntu.20.04/3.1 branch from 0abaf4f to 83ffcc9 Compare September 14, 2022 05:20
@dougbu dougbu marked this pull request as ready for review September 14, 2022 05:21
@dougbu
Copy link
Contributor Author

dougbu commented Sep 14, 2022

Internal test build #20220912.21 was successful, except for the DevCertWithInvalidPrivateKeyProducesCustomWarning failure addressed in the last commit here.

@dougbu dougbu enabled auto-merge (squash) September 14, 2022 05:24
sslStream.AuthenticateAsClientAsync("127.0.0.1", clientCertificates: null,
enabledSslProtocols: SslProtocols.Tls,
checkCertificateRevocation: false));
}
}

await loggerProvider.FilterLogger.LogTcs.Task.DefaultTimeout();
Assert.Equal(3, loggerProvider.FilterLogger.LastEventId);
Assert.Equal(1, loggerProvider.FilterLogger.LastEventId);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not exactly sure why this needed to change. But it lines up w/ tests in later branches

Copy link
Member

@wtgodbe wtgodbe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Infra changes seem fine

- use 20.04 instead

nit: Remove Ubuntu version from one CI job display name
…s<>()`

- skip `TlsHandshakeRejectsTlsLessThan12` because TLS1.0 is not available on Ubuntu 20.04
- for the other 3 tests, `IOException` was too specific for the platform switch
- test does not behave consistently across platforms
- test already removed in later branches
  - testing in this area has moved to CTI (manual testing)
@dougbu dougbu force-pushed the dougbu/ubuntu.20.04/3.1 branch from 83ffcc9 to c9bde8b Compare September 16, 2022 23:29
@dougbu dougbu merged commit dcf23c9 into dotnet:release/3.1 Sep 17, 2022
@dougbu dougbu deleted the dougbu/ubuntu.20.04/3.1 branch September 17, 2022 00:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants