Docker images for .NET Core 2.1, 3.1, and 5.0 Preview 5 have been released that support Alpine 3.12.
As part of these changes, the floating tags for Alpine-based images have been moved from Alpine 3.11 to 3.12.
If you made use of a floating tag for Alpine, such as 3.1-alpine and 2.1-alpine, these have been changed to now reference Alpine 3.12 instead of Alpine 3.11. Be sure to pull this tag on your Docker machine to get the latest image.
The following Docker repos have been updated:
Just an observation (don't want to create a bug request yet).
We use the 3.1-alpine image and after the update yesterday, few of our tests failed.
We use _dotnet test_ with _xunit_ and _WebApplicationFactory_ to start a test host for integration tests - and those tests failed. Yet another observation, those test fail when few test classes with the web application factory are created.
Changing an option to run those tests synchronously haven't helped - tests pass locally, with the same net version installed, and only fail in docker with the newest alpine version with a message: "The active test run was aborted. Reason: Test host process crashed.".
Using Alpine image with version 3.11 works fine.
Don't know the origin reason of the crash - this might be anything - even a SQL dependency.
Same here. We also saw a lot of host crashes and reverted to 3.11 for now. In our case it wasn't the tests but running the actual application.
Will come back with updates if we have them.
as mentioned, we saw a lot of host crashes and had to revert back to 3.11. When running 3.12 each time application seemed to be running as normal but then it crashes during a call to EFCore migrations. No error messages provided, Docker container exit code 139.
@DavidGirsvaldas - Could you provide a core dump? That would be very useful in diagnosing the issue.
cc EFCore folks: @smitpatel, @maumar, @roji
@DavidGirsvaldas and others, can you please open an issue on https://github.com/dotnet/efcore/issues describing the crash, with instructions on how to reproduce it? We'd definitely want to investigate that.
/cc @ajcvickers
another issue here with 3.12 - was using 3.1-alpine tag in my gitlab ci yaml, started seg faulting with 3.12 when attempting a dotnet gitversion (after restore dotnet tools). unfortunately, gitlab doesn't show me the actual error, just the error code (139). pinning to 3.1-alpine3.11 got it working again.
To everyone that's encountering this crash, please log an issue and provide a repro please. If you don't have a simple enough repro, please collect a core dump.
Ok, I'm taking the challenge :-) Here goes my dockerized repro (you can pretty much copy-n-paste into the terminal):
#run latest SDK alpine-3.12 image with dump capabilities
docker run -it --rm --cap-add=SYS_PTRACE mcr.microsoft.com/dotnet/core/sdk:3.1-alpine
#now inside container
#we'll be using git
apk add git
#some trivialities
alias ll='ls -lah --color'
cd /srv/
#clone my repo with tests
git clone https://github.com/ChaosEngine/InkBall.git
#go to test project
cd InkBall/test/InkBall.Tests/
dotnet restore -r alpine-x64
dotnet build
#allow to make core dumps
export COMPlus_DbgEnableMiniDump=1
#install needed tools :-)
dotnet tool install --global dotnet-gcdump
dotnet tool install --global dotnet-dump
export PATH="$PATH:/root/.dotnet/tools"
#finaly run the tests!!111one
dotnet test -v d
#
#it takes some time to generate dump
#
#now analyze it
dotnet-dump analyze /tmp/coredump.* -c clrstack
this gave me this output of tests run:
...
โ InkBall.Tests.UnitTest1.IncorrectPathValidation(parameters: (System.ValueTuple2[System.Int32,System.Int32][], 1,1 2,1 3,1 4,1 4,2 4,3 <script>alert(1)</script> 3,3 2,3 1,3 1,2 1,1, System.ValueTuple2[System.Int32,System.Int32][])) [< 1ms]
Writing minidump with heap to file /tmp/coredump.404
Written 142331904 bytes (34749 pages) to core file
โ InkBall.Tests.UnitTest1.IncorrectPathValidation(parameters: (System.ValueTuple2[System.Int32,System.Int32][], 10,4 9,5 9,6 10,7 11,6 11,5 10,4a, System.ValueTuple2[System.Int32,System.Int32][])) [< 1ms]
โ InkBall.Tests.DbContextTests.Benchmark_GetPathAndPoints [1s 131ms]
โ InkBall.Tests.SignalRTests.Benchmark_GetPathAndPoints [1s 131ms]
โ InkBall.Tests.DbContextTests.FullHierarchyCreation [23ms]
โ InkBall.Tests.DbContextTests.BasicHierarchyCreation [13ms]
The active test run was aborted. Reason: Test host process crashed
Test Run Aborted.
Total tests: Unknown
Passed: 32
Total time: 51.0251 Seconds
Done executing task "Microsoft.TestPlatform.Build.Tasks.VSTestTask" -- FAILED.
1:7>Done building target "VSTest" in project "InkBall.Tests.csproj" -- FAILED.
1:7>Done Building Project "/srv/InkBall/test/InkBall.Tests/InkBall.Tests.csproj" (VSTest target(s)) -- FAILED.
Build FAILED.
0 Warning(s)
0 Error(s)
Time Elapsed 00:00:52.19
/srv/InkBall/test/InkBall.Tests # #takes time to generatee dump#no analyze it
/srv/InkBall/test/InkBall.Tests # dotnet-dump analyze /tmp/coredump.* -c clrstack
Loading core dump: /tmp/coredump.404 ...
Ready to process analysis commands. Type 'help' to list available commands or 'help [command]' to get detailed help on a command.
Type 'quit' or 'exit' to exit the session.
OS Thread Id: 0x194 (0)
Child SP IP Call Site
00007FFFB1D43F30 00007f7f7383b878 [GCFrame: 00007fffb1d43f30]
00007FFFB1D44010 00007f7f7383b878 [HelperMethodFrame_1OBJ: 00007fffb1d44010] System.Threading.Monitor.ObjWait(Boolean, Int32, System.Object)
00007FFFB1D44140 00007F7EF9110A14 System.Threading.ManualResetEventSlim.Wait(Int32, System.Threading.CancellationToken)
00007FFFB1D441D0 00007F7EF91252C0 System.Threading.Tasks.Task.SpinThenBlockingWait(Int32, System.Threading.CancellationToken) [/_/src/System.Private.CoreLib/shared/System/Threading/Tasks/Task.cs @ 2922]
00007FFFB1D44230 00007F7EF9125164 System.Threading.Tasks.Task.InternalWaitCore(Int32, System.Threading.CancellationToken) [/_/src/System.Private.CoreLib/shared/System/Threading/Tasks/Task.cs @ 2861]
00007FFFB1D44280 00007F7EF9124ED7 System.Threading.Tasks.Task.Wait(Int32, System.Threading.CancellationToken) [/_/src/System.Private.CoreLib/shared/System/Threading/Tasks/Task.cs @ 2772]
00007FFFB1D442B0 00007F7EF9124DF2 System.Threading.Tasks.Task.Wait() [/_/src/System.Private.CoreLib/shared/System/Threading/Tasks/Task.cs @ 2655]
00007FFFB1D442C0 00007F7EF95FFD63 Microsoft.VisualStudio.TestPlatform.TestHost.DefaultEngineInvoker.Invoke(System.Collections.Generic.IDictionary`2
00007FFFB1D44340 00007F7EF95F71AC Microsoft.VisualStudio.TestPlatform.TestHost.Program.Run(System.String[])
00007FFFB1D44370 00007F7EF95F0495 Microsoft.VisualStudio.TestPlatform.TestHost.Program.Main(System.String[])
00007FFFB1D446A8 00007f7f72a24cff [GCFrame: 00007fffb1d446a8]
00007FFFB1D44B90 00007f7f72a24cff [GCFrame: 00007fffb1d44b90]
>
@ChaosEngine - Copy-and-paste repros are fantastic, thanks! Could you please log this as a separate issue in https://github.com/microsoft/vstest so that it can be appropriately tracked? Please also note in the issue that the problem is related to the Alpine version because the same steps succeed if you use mcr.microsoft.com/dotnet/core/sdk:3.1-alpine3.11.
Most helpful comment
Ok, I'm taking the challenge :-) Here goes my dockerized repro (you can pretty much copy-n-paste into the terminal):
this gave me this output of tests run:
...
โ InkBall.Tests.UnitTest1.IncorrectPathValidation(parameters: (System.ValueTuple
2[System.Int32,System.Int32][], 1,1 2,1 3,1 4,1 4,2 4,3 <script>alert(1)</script> 3,3 2,3 1,3 1,2 1,1, System.ValueTuple2[System.Int32,System.Int32][])) [< 1ms]Writing minidump with heap to file /tmp/coredump.404
Written 142331904 bytes (34749 pages) to core file
โ InkBall.Tests.UnitTest1.IncorrectPathValidation(parameters: (System.ValueTuple
2[System.Int32,System.Int32][], 10,4 9,5 9,6 10,7 11,6 11,5 10,4a, System.ValueTuple2[System.Int32,System.Int32][])) [< 1ms]โ InkBall.Tests.DbContextTests.Benchmark_GetPathAndPoints [1s 131ms]
โ InkBall.Tests.SignalRTests.Benchmark_GetPathAndPoints [1s 131ms]
โ InkBall.Tests.DbContextTests.FullHierarchyCreation [23ms]
โ InkBall.Tests.DbContextTests.BasicHierarchyCreation [13ms]
The active test run was aborted. Reason: Test host process crashed
Test Run Aborted.
Total tests: Unknown
Passed: 32
Total time: 51.0251 Seconds
Done executing task "Microsoft.TestPlatform.Build.Tasks.VSTestTask" -- FAILED.
1:7>Done building target "VSTest" in project "InkBall.Tests.csproj" -- FAILED.
1:7>Done Building Project "/srv/InkBall/test/InkBall.Tests/InkBall.Tests.csproj" (VSTest target(s)) -- FAILED.
Build FAILED.
0 Warning(s)
0 Error(s)
Time Elapsed 00:00:52.19)
/srv/InkBall/test/InkBall.Tests # #takes time to generatee dump#no analyze it
/srv/InkBall/test/InkBall.Tests # dotnet-dump analyze /tmp/coredump.* -c clrstack
Loading core dump: /tmp/coredump.404 ...
Ready to process analysis commands. Type 'help' to list available commands or 'help [command]' to get detailed help on a command.
Type 'quit' or 'exit' to exit the session.
OS Thread Id: 0x194 (0)
Child SP IP Call Site
00007FFFB1D43F30 00007f7f7383b878 [GCFrame: 00007fffb1d43f30]
00007FFFB1D44010 00007f7f7383b878 [HelperMethodFrame_1OBJ: 00007fffb1d44010] System.Threading.Monitor.ObjWait(Boolean, Int32, System.Object)
00007FFFB1D44140 00007F7EF9110A14 System.Threading.ManualResetEventSlim.Wait(Int32, System.Threading.CancellationToken)
00007FFFB1D441D0 00007F7EF91252C0 System.Threading.Tasks.Task.SpinThenBlockingWait(Int32, System.Threading.CancellationToken) [/_/src/System.Private.CoreLib/shared/System/Threading/Tasks/Task.cs @ 2922]
00007FFFB1D44230 00007F7EF9125164 System.Threading.Tasks.Task.InternalWaitCore(Int32, System.Threading.CancellationToken) [/_/src/System.Private.CoreLib/shared/System/Threading/Tasks/Task.cs @ 2861]
00007FFFB1D44280 00007F7EF9124ED7 System.Threading.Tasks.Task.Wait(Int32, System.Threading.CancellationToken) [/_/src/System.Private.CoreLib/shared/System/Threading/Tasks/Task.cs @ 2772]
00007FFFB1D442B0 00007F7EF9124DF2 System.Threading.Tasks.Task.Wait() [/_/src/System.Private.CoreLib/shared/System/Threading/Tasks/Task.cs @ 2655]
00007FFFB1D442C0 00007F7EF95FFD63 Microsoft.VisualStudio.TestPlatform.TestHost.DefaultEngineInvoker.Invoke(System.Collections.Generic.IDictionary`2
00007FFFB1D44340 00007F7EF95F71AC Microsoft.VisualStudio.TestPlatform.TestHost.Program.Run(System.String[])
00007FFFB1D44370 00007F7EF95F0495 Microsoft.VisualStudio.TestPlatform.TestHost.Program.Main(System.String[])
00007FFFB1D446A8 00007f7f72a24cff [GCFrame: 00007fffb1d446a8]
00007FFFB1D44B90 00007f7f72a24cff [GCFrame: 00007fffb1d44b90]
>