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

[QUIC] Stress crash WIP #72769

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
20 changes: 19 additions & 1 deletion eng/pipelines/libraries/stress/http.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ variables:
jobs:
- job: linux
displayName: Docker Linux
timeoutInMinutes: 180
timeoutInMinutes: 240
variables:
DUMPS_SHARE_MOUNT_ROOT: "/dumps-share"
pool:
Expand All @@ -44,6 +44,24 @@ jobs:
name: buildRuntime
displayName: Build CLR and Libraries

- bash: |
$(httpStressProject)/run-docker-compose.sh -o -c Debug -t $(sdkBaseImage) && \
echo "##vso[task.setvariable variable=succeeded;isOutput=true]true"
name: buildStressDebug
displayName: Build HttpStress Debug

- bash: |
cd '$(httpStressProject)'
export CLIENT_DUMPS_SHARE="$(Build.ArtifactStagingDirectory)/dumps/client-debug/3.0"
export SERVER_DUMPS_SHARE="$(Build.ArtifactStagingDirectory)/dumps/server-debug/3.0"
export HTTPSTRESS_CLIENT_ARGS="$HTTPSTRESS_CLIENT_ARGS -http 3.0"
export HTTPSTRESS_SERVER_ARGS="$HTTPSTRESS_SERVER_ARGS -http 3.0"
export CONFIGURATION="Debug"
docker-compose up --abort-on-container-exit --no-color
timeoutInMinutes: 35 # In case the HTTP/3.0 run hangs, we timeout shortly after the expected 30 minute run
displayName: Run HttpStress - HTTP 3.0 Debug
condition: and(eq(variables['buildRuntime.succeeded'], 'true'), eq(variables['buildStressDebug.succeeded'], 'true'))

- bash: |
$(httpStressProject)/run-docker-compose.sh -o -c $(BUILD_CONFIGURATION) -t $(sdkBaseImage) && \
echo "##vso[task.setvariable variable=succeeded;isOutput=true]true"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
ARG SDK_BASE_IMAGE=mcr.microsoft.com/dotnet/nightly/sdk:6.0-bullseye-slim
FROM $SDK_BASE_IMAGE

ARG VERSION=7.0
ARG CONFIGURATION=Release

# Build latest msquic locally
WORKDIR /msquic
RUN apt-get update -y && \
Expand All @@ -10,19 +13,16 @@ RUN apt-get update -y && \
RUN git clone --recursive https://github.com/dotnet/msquic
RUN cd msquic/src/msquic && \
mkdir build && \
cmake -B build -DCMAKE_BUILD_TYPE=Release -DQUIC_ENABLE_LOGGING=false -DQUIC_USE_SYSTEM_LIBCRYPTO=true -DQUIC_BUILD_TOOLS=off -DQUIC_BUILD_TEST=off -DQUIC_BUILD_PERF=off && \
cmake -B build -DCMAKE_BUILD_TYPE=$CONFIGURATION -DQUIC_ENABLE_LOGGING=false -DQUIC_USE_SYSTEM_LIBCRYPTO=true -DQUIC_BUILD_TOOLS=off -DQUIC_BUILD_TEST=off -DQUIC_BUILD_PERF=off && \
cd build && \
cmake --build . --config Release
RUN cd msquic/src/msquic/build/bin/Release && \
cmake --build . --config $CONFIGURATION
RUN cd msquic/src/msquic/build/bin/$CONFIGURATION && \
rm libmsquic.so && \
fpm -f -s dir -t deb -n libmsquic -v $( find -type f | cut -d "." -f 4- ) \
--license MIT --url https://github.com/microsoft/msquic --log error \
$( ls ./* | cut -d "/" -f 2 | sed -r "s/(.*)/\1=\/usr\/lib\/\1/g" ) && \
dpkg -i libmsquic_*.deb

ARG VERSION=7.0
ARG CONFIGURATION=Release

# Build the stress server
WORKDIR /app
COPY . .
Expand All @@ -34,13 +34,17 @@ RUN dotnet build -c $CONFIGURATION \

# Enable dump collection
ENV COMPlus_DbgEnableMiniDump=1
ENV COMPlus_DbgMiniDumpType=MiniDumpWithFullMemory
ENV COMPlus_DbgMiniDumpType=4
ENV COMPlus_DbgMiniDumpName="/dumps-share/coredump.%p"

EXPOSE 5001

ENV VERSION=$VERSION
ENV CONFIGURATION=$CONFIGURATION
ENV HTTPSTRESS_ARGS=''
CMD /live-runtime-artifacts/testhost/net$VERSION-Linux-$CONFIGURATION-x64/dotnet exec \
./bin/$CONFIGURATION/net$VERSION/HttpStress.dll $HTTPSTRESS_ARGS
# Try to find the newest testhost in live-runtime-artifacts to use for the stress.
# Note that docker cannot export variables (https://github.com/moby/moby/issues/29110) so we generate script to run the stress.
RUN TESTHOST=$( ls -td /live-runtime-artifacts/testhost/net$VERSION-Linux-*-x64 | head -1 ) && \
echo "$TESTHOST/dotnet exec ./bin/$CONFIGURATION/net$VERSION/HttpStress.dll $HTTPSTRESS_ARGS" > run-stress.sh && \
chmod +x run-stress.sh
CMD ./run-stress.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ elseif ($privateAspNetCore) {

# Dockerize the stress app using docker-compose

$BUILD_ARGS = ""
$BUILD_ARGS = "--build-arg CONFIGURATION=$configuration"
if (![string]::IsNullOrEmpty($sdkImageName))
{
$BUILD_ARGS += " --build-arg SDK_BASE_IMAGE=$sdkImageName"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ if [[ "$buildcurrentlibraries" -eq 1 ]]; then
fi
fi

build_args=""
build_args="--build-arg CONFIGURATION=$configuration"
if [[ -n "$imagename" ]]; then
build_args=" --build-arg SDK_BASE_IMAGE=$imagename"
build_args="${build_args} --build-arg SDK_BASE_IMAGE=$imagename"
fi

compose_file="$scriptroot/docker-compose.yml"
Expand All @@ -90,6 +90,7 @@ if [[ "$buildonly" -eq 0 ]]; then

export HTTPSTRESS_CLIENT_ARGS=$clientstressargs
export HTTPSTRESS_SERVER_ARGS=$serverstressargs
export CONFIGURATION=$configuration
docker-compose --file "$compose_file" up --abort-on-container-exit
exit $?
fi
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ RUN dotnet build -c $env:CONFIGURATION `

# Enable dump collection
ENV COMPlus_DbgEnableMiniDump=1
ENV COMPlus_DbgMiniDumpType=MiniDumpWithFullMemory
ENV COMPlus_DbgMiniDumpType=4
ENV COMPlus_DbgMiniDumpName="C:/dumps-share/coredump.%p"

EXPOSE 5001
Expand Down