You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On linux, after attempt to CreateSnapshotAndAttach for it's own process CLR crashes soon after the thread that called CreateRuntime() finishes. Looks like it happens when some resources disposed, so it may work some not-long time. To reproduce it is enough to call CreateRuntime() in separate thread and wait a little bit after thread will be finished.
Repro steps:
sources
using System.Diagnostics;using Microsoft.Diagnostics.Runtime;vart=new Thread(()=>{try{usingvardataTarget= DataTarget.CreateSnapshotAndAttach(Process.GetCurrentProcess().Id);usingvarruntime= dataTarget.ClrVersions[0].CreateRuntime();}catch(Exceptione){ Console.WriteLine(e);}});
t.Start();
t.Join();
Console.WriteLine("Done Get Runtime!");while(true){
Console.WriteLine("!!!!!!!! "+ DateTime.Now);
Thread.Sleep(1000);}
docker command to test (with docker running linux containers): docker run --rm --cap-add SYS_PTRACE -v %CD%:/app -w /app mcr.microsoft.com/dotnet/sdk:8.0 dotnet run
I've reproduced issue with different versions of Microsoft.Diagnostics.Runtime/Microsoft.Diagnostics.NETCore.Client and DOTNET runtime.
The text was updated successfully, but these errors were encountered:
On linux, after attempt to CreateSnapshotAndAttach for it's own process CLR crashes soon after the thread that called
CreateRuntime()
finishes. Looks like it happens when some resources disposed, so it may work some not-long time. To reproduce it is enough to callCreateRuntime()
in separate thread and wait a little bit after thread will be finished.Repro steps:
docker run --rm --cap-add SYS_PTRACE -v %CD%:/app -w /app mcr.microsoft.com/dotnet/sdk:8.0 dotnet run
I've reproduced issue with different versions of Microsoft.Diagnostics.Runtime/Microsoft.Diagnostics.NETCore.Client and DOTNET runtime.
The text was updated successfully, but these errors were encountered: