Skip to content
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

[HTTP/SSL] Fix stress #93135

Merged
merged 4 commits into from
Oct 9, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,3 @@

# performance testing sandbox
**/sandbox

#IL linker for testing
**/linker
4 changes: 2 additions & 2 deletions eng/docker/libraries-sdk.linux.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Builds and copies library artifacts into target dotnet sdk image
ARG BUILD_BASE_IMAGE=mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream8
ARG SDK_BASE_IMAGE=mcr.microsoft.com/dotnet/nightly/sdk:7.0-bullseye-slim
ARG SDK_BASE_IMAGE=mcr.microsoft.com/dotnet/nightly/sdk:8.0

FROM $BUILD_BASE_IMAGE as corefxbuild

Expand All @@ -12,7 +12,7 @@ RUN ./build.sh clr+libs -runtimeconfiguration Release -configuration $CONFIGURAT

FROM $SDK_BASE_IMAGE as target

ARG VERSION=8.0
ARG VERSION=9.0
ARG CONFIGURATION=Release
ENV _DOTNET_INSTALL_CHANNEL="$VERSION.1xx"

Expand Down
4 changes: 2 additions & 2 deletions eng/docker/libraries-sdk.windows.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# escape=`
# Simple Dockerfile which copies clr and library build artifacts into target dotnet sdk image
ARG SDK_BASE_IMAGE=mcr.microsoft.com/dotnet/nightly/sdk:7.0-nanoserver-ltsc2022
ARG SDK_BASE_IMAGE=mcr.microsoft.com/dotnet/nightly/sdk:8.0-nanoserver-ltsc2022
FROM $SDK_BASE_IMAGE as target

SHELL ["pwsh", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]

ARG VERSION=8.0
ARG VERSION=9.0
ENV _DOTNET_INSTALL_CHANNEL="$VERSION.1xx"
ARG CONFIGURATION=Release

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG SDK_BASE_IMAGE=mcr.microsoft.com/dotnet/nightly/sdk:7.0-bullseye-slim
ARG SDK_BASE_IMAGE=mcr.microsoft.com/dotnet/nightly/sdk:8.0
FROM $SDK_BASE_IMAGE

# Build latest msquic locally
Expand All @@ -20,7 +20,7 @@ RUN cd msquic/src/msquic/build/bin/Release && \
$( ls ./* | cut -d "/" -f 2 | sed -r "s/(.*)/\1=\/usr\/lib\/\1/g" ) && \
dpkg -i libmsquic_*.deb

ARG VERSION=8.0
ARG VERSION=9.0
ARG CONFIGURATION=Release

# Build the stress server
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ private static async Task<ExitCode> Run(Configuration config)

string GetAssemblyInfo(Assembly assembly) => $"{assembly.Location}, modified {new FileInfo(assembly.Location).LastWriteTime}";

Type msQuicApiType = Type.GetType("System.Net.Quic.MsQuicApi, System.Net.Quic");
string msQuicLibraryVersion = (string)msQuicApiType.GetProperty("MsQuicLibraryVersion", BindingFlags.NonPublic | BindingFlags.Static).GetGetMethod(true).Invoke(null, Array.Empty<object?>());
Type msQuicApiType = Type.GetType("System.Net.Quic.MsQuicApi, System.Net.Quic")!;
string msQuicLibraryVersion = (string)msQuicApiType.GetProperty("MsQuicLibraryVersion", BindingFlags.NonPublic | BindingFlags.Static)!.GetGetMethod(true)!.Invoke(null, Array.Empty<object?>())!;

Console.WriteLine(" .NET Core: " + GetAssemblyInfo(typeof(object).Assembly));
Console.WriteLine(" ASP.NET Core: " + GetAssemblyInfo(typeof(WebHost).Assembly));
Expand Down Expand Up @@ -192,8 +192,8 @@ private static async Task<ExitCode> Run(Configuration config)
{
// If the system gets overloaded, MsQuic has a tendency to drop incoming connections, see https://github.com/dotnet/runtime/issues/55979.
// So in case we're running H/3 stress test, we're using the same hack as for System.Net.Quic tests, which increases the time limit for pending operations in MsQuic thread pool.
object msQuicApiInstance = msQuicApiType.GetProperty("Api", BindingFlags.NonPublic | BindingFlags.Static).GetGetMethod(true).Invoke(null, Array.Empty<object?>());
QUIC_API_TABLE* apiTable = (QUIC_API_TABLE*)(Pointer.Unbox(msQuicApiType.GetProperty("ApiTable").GetGetMethod().Invoke(msQuicApiInstance, Array.Empty<object?>())));
object msQuicApiInstance = msQuicApiType.GetProperty("Api", BindingFlags.NonPublic | BindingFlags.Static)!.GetGetMethod(true)!.Invoke(null, Array.Empty<object?>())!;
QUIC_API_TABLE* apiTable = (QUIC_API_TABLE*)(Pointer.Unbox(msQuicApiType.GetProperty("ApiTable")!.GetGetMethod()!.Invoke(msQuicApiInstance, Array.Empty<object?>())!));
QUIC_SETTINGS settings = default(QUIC_SETTINGS);
settings.IsSet.MaxWorkerQueueDelayUs = 1;
settings.MaxWorkerQueueDelayUs = 2_500_000u; // 2.5s, 10x the default
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# escape=`
ARG SDK_BASE_IMAGE=mcr.microsoft.com/dotnet/nightly/sdk:7.0-nanoserver-ltsc2022
ARG SDK_BASE_IMAGE=mcr.microsoft.com/dotnet/nightly/sdk:8.0-nanoserver-ltsc2022
FROM $SDK_BASE_IMAGE

# Use powershell as the default shell
Expand All @@ -8,7 +8,7 @@ SHELL ["pwsh", "-Command"]
WORKDIR /app
COPY . .

ARG VERSION=8.0
ARG VERSION=9.0
ARG CONFIGURATION=Release

RUN dotnet build -c $env:CONFIGURATION `
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG SDK_BASE_IMAGE=mcr.microsoft.com/dotnet/nightly/sdk:6.0-bullseye-slim
ARG SDK_BASE_IMAGE=mcr.microsoft.com/dotnet/nightly/sdk:8.0
FROM $SDK_BASE_IMAGE

WORKDIR /app
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# escape=`
ARG SDK_BASE_IMAGE=mcr.microsoft.com/dotnet/nightly/sdk:6.0-nanoserver-1809
ARG SDK_BASE_IMAGE=mcr.microsoft.com/dotnet/nightly/sdk:8.0-nanoserver-ltsc2022
FROM $SDK_BASE_IMAGE

# Use powershell as the default shell
Expand Down
Loading