Skip to content

Instantly share code, notes, and snippets.

@ChaosEngine
Created July 29, 2020 19:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ChaosEngine/72a334c9b5db6ba878cf4c86a108a3b2 to your computer and use it in GitHub Desktop.
Save ChaosEngine/72a334c9b5db6ba878cf4c86a108a3b2 to your computer and use it in GitHub Desktop.
dotnet docker sdk alpine-3.12 test failing repro
#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
#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 time to generatee dump
#
now analyze it
dotnet-dump analyze /tmp/coredump.* -c clrstack
@ChaosEngine
Copy link
Author

ChaosEngine commented Jul 29, 2020

Result (one observerd):

clrstack
OS Thread Id: 0x193 (0)
Child SP IP Call Site
00007FFE58E5CD20 00007f5061c45878 [GCFrame: 00007ffe58e5cd20]
00007FFE58E5CE00 00007f5061c45878 [HelperMethodFrame_1OBJ: 00007ffe58e5ce00] System.Threading.Monitor.ObjWait(Boolean, Int32, System.Object)
00007FFE58E5CF30 00007F4FE7530A14 System.Threading.ManualResetEventSlim.Wait(Int32, System.Threading.CancellationToken)
00007FFE58E5CFC0 00007F4FE75452C0 System.Threading.Tasks.Task.SpinThenBlockingWait(Int32, System.Threading.CancellationToken) [//src/System.Private.CoreLib/shared/System/Threading/Tasks/Task.cs @ 2922]
00007FFE58E5D020 00007F4FE7545164 System.Threading.Tasks.Task.InternalWaitCore(Int32, System.Threading.CancellationToken) [/
/src/System.Private.CoreLib/shared/System/Threading/Tasks/Task.cs @ 2861]
00007FFE58E5D070 00007F4FE7544ED7 System.Threading.Tasks.Task.Wait(Int32, System.Threading.CancellationToken) [//src/System.Private.CoreLib/shared/System/Threading/Tasks/Task.cs @ 2772]
00007FFE58E5D0A0 00007F4FE7544DF2 System.Threading.Tasks.Task.Wait() [/
/src/System.Private.CoreLib/shared/System/Threading/Tasks/Task.cs @ 2655]
00007FFE58E5D0B0 00007F4FE7A1FD63 Microsoft.VisualStudio.TestPlatform.TestHost.DefaultEngineInvoker.Invoke(System.Collections.Generic.IDictionary`2<System.String,System.String>)
00007FFE58E5D130 00007F4FE7A171AC Microsoft.VisualStudio.TestPlatform.TestHost.Program.Run(System.String[])
00007FFE58E5D160 00007F4FE7A10495 Microsoft.VisualStudio.TestPlatform.TestHost.Program.Main(System.String[])
00007FFE58E5D498 00007f5060e2ecff [GCFrame: 00007ffe58e5d498]
00007FFE58E5D980 00007f5060e2ecff [GCFrame: 00007ffe58e5d980]

Possible cause hides here ???

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment