Repository navigation
test(integration): survive intermittent SQL Server 2025 startup crashes - #796
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #796 +/- ##
==========================================
+ Coverage 95.70% 95.77% +0.07%
==========================================
Files 270 270
Lines 10466 10466
Branches 953 953
==========================================
+ Hits 10016 10024 +8
+ Misses 243 235 -8
Partials 207 207 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
The fixture used the stale 2025-RTM-ubuntu-24.04-preview image. SQL Server 2025 images on the ubuntu-24.04 base crash intermittently during startup with a sqlpal/LSASS fatal error (Reason 0x00000002, errno 11), more often when several containers start at once (microsoft/mssql-docker#974). Integration tests start one container per target framework concurrently, so a single crash failed every SQL Server test of that TFM. Switch to 2025-CU9-ubuntu-22.04, which is not affected.
Loose docker versioning could not move the 2025-RTM-ubuntu-24.04-preview tag to any GA cumulative update. Use regex versioning for mcr.microsoft.com/mssql/server so CU and GDR releases are proposed on the same Ubuntu base while preview, RC and CTP tags are ignored.
TUnit creates a new test class instance per test, so each test opens its own connection and exclusive queue. The exchange was declared auto-delete; closing the previous test's connection removed its queue binding and the broker deleted the exchange asynchronously, sometimes after the next test's idempotent ExchangeDeclare, so its QueueBind failed with 404 NOT_FOUND. Declare the exchange without auto-delete; it lives only as long as the per-session container.
samtrion
force-pushed
the
fix/integration-container-exit
branch
from
September 26, 2026 16:34
5b145db to
b113f21
Compare
… startup The ubuntu-22.04 base did not avoid the intermittent SQL Server 2025 startup crash (sqlpal/LSASS fatal error, Reason 0x00000002). Run 36255943687 hit it again on 2025-CU9-ubuntu-22.04 and failed all 133 SQL Server tests on net10.0. When a container exits before it is ready, dispose it and start a fresh one, up to 3 attempts. Each retry is written to stderr and, on GitHub Actions, to the job summary so the crash rate stays visible. A crash on the last attempt still fails the tests with the container output. Refs: microsoft/mssql-docker#974
samtrion
force-pushed
the
fix/integration-container-exit
branch
from
September 26, 2026 17:19
1734927 to
b9456a2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
On
main, the integration tests failed withContainerNotRunningException: Container <id> exited with code 1. The container is the SQL Server fixture, and SQL Server crashed while starting up. This is an intermittent upstream bug, and changing the image did not remove it. The fixture now replaces a container that crashes during startup, with at most 3 attempts. Every retry is reported. The PR also moves the image off a stale preview tag and fixes an unrelated flaky RabbitMQ test.Root cause
SqlServerContainerFixture.InitializeAsyncon net10.0. All 250exited with code 1lines name the same container id; net8.0 and net9.0 passed.2025-CU9-ubuntu-22.04, based on the issue's "0 crashes in ~250 starts" on 22.04. The issue itself says that only bounds the rate and does not make it zero. After the rebase, run 36255943687 crashed the same way on the new image: 133 SQL Server failures on net10.0, one container,Ubuntu 22.04.5 LTS,Reason: 0x00000002, sqlpal and lsasrv in the stack. The 22.04 claim from the first version of this PR was wrong.2025-RTM-ubuntu-24.04-previewsince chore(docker): update mcr.microsoft.com/mssql/server docker tag to v2025 #534. No GA tag has the-previewsuffix, solooseversioning never proposed a cumulative update.Decision: stay on SQL Server 2025 and retry
src/NetEvolve.Pulse.SqlServer/Scriptsuse nothing specific to 2025, and EF Core'sUseSqlServerdefaults to compatibility level 150.Reason: 0x00000002signature appears in older reports such as This program has encountered a fatal error and cannot continue running. The following diagnostic information is available: Reason: 0x00000002 Status: 0xd000000d Parameters: 0x280bafe00 [0] 0x10010 Stacktrace: 000000006a4ea978 000000006a43f6fd 000000006a514015 000000006a514044 0000000280f70aa5 Process: 7 - sqlservr Thread: 51 (application thread 0x10a0) Instance Id: 1dd11547-c8f1-4f55-ba66-e00daa0a5908 Crash Id: 5cf4d7ff-06b5-4135-9269-ef0938cd46e7 Build stamp: 7d599fe53e35b5a1b0c8a5e4185d8b7334e01a8c5fa77540415502a85f37ef27 Capturing core dump and information... dmesg: read kernel buffer failed: Operation not permitted No journal files were found. No journal files were found. Attempting to capture a dump with paldumper microsoft/mssql-docker#524, which predates 2025. Changing the engine major would reduce test coverage of the 2025 engine without a proven benefit.Changes
SqlServerContainerFixturemcr.microsoft.com/mssql/server:2025-CU9-ubuntu-22.04: same engine major, current CU, and the lower-rate base.ContainerNotRunningExceptionduringStartAsync, it disposes the container and builds a fresh one, up to 3 attempts. A crash on the final attempt still fails the tests with the full container output.dotnet testdoes not print output from passing runs.renovate.json: regex versioning formcr.microsoft.com/mssql/server(YYYY-CU<n>[-GDR<n>]-ubuntu-<ver>). It stays on the same Ubuntu base and never matches preview, RC or CTP tags. The file is byte-identical to the template after chore(renovate): track SQL Server CU/GDR tags on a fixed Ubuntu base template-dotnet#371, so the next template sync changes nothing.RabbitMqMessageTransportIntegrationTests: the test exchange is now declared withautoDelete: false.ExchangeDeclare, and the followingQueueBindfailed with404 NOT_FOUND - no exchange 'pulse.integration.test'.Test evidence
dotnet build Pulse.slnx -c Release: 0 warnings, 0 errors, including the CSharpier.MSBuild check.