Open Lobosque opened 4 years ago
Registered MSBuild instance: StandAlone 16.8.0 - "/root/.vscode-server/extensions/ms-dotnettools.csharp-1.23.1/.omnisharp/1.37.0/omnisharp/.msbuild/Current/Bin"
@Lobosque Noticed this is running from /root/.vscode-server. Are you using WSL?
@JoeRobich no, but I am running inside a container using ms-vscode-remote.remote-containers
@JoeRobich anything else I can do to help investigating this issue? Other teammates have the same problem, even in different projects
@Lobosque Sorry this looks like a duplicate of this long open issue - https://github.com/OmniSharp/omnisharp-vscode/issues/1794
@nohwnd Are there any known issues with the vstest runner on Mono?
I was trying to repro this in container and never got it to fail. Either the project was not recognized by omnisharp at all, or it worked fine.
I am not aware of anything specific to vstest and mono. But if this is a long running issue I will have a closer look on 1794, maybe there is some clue, and even a repro.
Crashing after a test is the easiest way to reproduce, but I also get random crashes with enough frequency to make the developing experience a bit annoying. I can gather some logs when these crashes happens and send them over to you. Just let me know what I should configure in order to get helpful logs and what steps to follow when a crash occurs.
On Thu, Sep 24, 2020, 06:45 Jakub Jareš notifications@github.com wrote:
I was trying to repro this in container and never got it to fail. Either the project was not recognized by omnisharp at all, or it worked fine.
I am not aware of anything specific to vstest and mono. But if this is a long running issue I will have a closer look on 1794, maybe there is some clue, and even a repro.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/OmniSharp/omnisharp-vscode/issues/4021#issuecomment-698238573, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHMQXVBBSJQOTHP7QJGTGDSHMINBANCNFSM4QNA55VA .
@nohwnd I can reproduce this pretty consistenly by opening OmniSharp-Roslyn in VSCode and using the codelens to try and debug tests.
@JoeRobich could you also collect the bug report info so I have a starting point for repro, please? Are you on Windows or Mac? :)
I have the same issue on Pop!_OS 20.04 LTS. I'm running my application using VS Code's ms-vscode-remote.remote-containers
extension too.
Affected by the same symptoms: OmniSharp server crashes after debugging test over SSH-remote. The breakpoints are hit, but as soon as the tests finish, OmniSharp server crashes. I've attached the OmniSharp log and the test project I was using (though I don't know how far you will be able to get) RabbitWarren.tar.gz . OmniSharp.log
@cubikca thanks for the project.
For my future reference this is how to run a rabbitmq in docker to be able to succeed when running the test locally.
docker run -p 5672:5672 --hostname my-rabbit --name some-rabbit -e RABBITMQ_DEFAULT_USER=brian -e RABBITMQ_DEFAULT_PASS=development rabbitmq:3
Then I need to re-open it in container, and dotnet restore; dotnet clean; dotnet build
in terminal and then restart omnisharp. Then finally the Debug tests
lens appears. And after that omnisharp crashes.
@nohwnd @JoeRobich this appears to be related to msbuild in omnisharp reloading of projects when a build is triggered. I can hit this pretty consistently just by opening roslyn/Compilers.sln in vscode (I'm on linux), waiting for it to load, and then running a dotnet build Compilers.sln
in the terminal. One of two behaviors almost always occurs: omnisharp attempts to reload projects, and fails to do so, and then crashes, or it just straight up crashes.
Triggering a test builds the project, which should then have the same behavior. But I don't think it's the test runner itself, I think it's the build triggering some kind of operation that causes omnisharp to reload, and it fails to do so catastrophically.
Do you see exitcode 0 in the omnisharp log if that happens?
No, I see a mono crash.
Just happened to me again, so I grabbed the log. It's too long to put into this comment, so I saved it as a gist: https://gist.github.com/333fred/b4d73c5d89301052e48d4d2d43fc14be.
Managed stacktrace is at the very bottom:
=================================================================
Managed Stacktrace:
=================================================================
at <unknown> <0xffffffff>
at System.Reflection.Assembly:InternalGetAssemblyName <0x0008b>
at System.Reflection.AssemblyName:GetAssemblyName <0x00087>
at Microsoft.Build.Shared.AssemblyNameExtension:GetAssemblyNameEx <0x0003f>
at Microsoft.Build.Tasks.SystemState:GetAssemblyName <0x00262>
at Microsoft.Build.Tasks.ReferenceTable:NameAssemblyFileReference <0x000f8>
at Microsoft.Build.Tasks.ReferenceTable:SetPrimaryFileItem <0x0012f>
at Microsoft.Build.Tasks.ReferenceTable:SetPrimaryItems <0x00097>
at Microsoft.Build.Tasks.ReferenceTable:ComputeClosure <0x000b3>
at Microsoft.Build.Tasks.ResolveAssemblyReference:Execute <0x01703>
at Microsoft.Build.Tasks.ResolveAssemblyReference:Execute <0x009e3>
at Microsoft.Build.BackEnd.TaskExecutionHost:Microsoft.Build.BackEnd.ITaskExecutionHost.Execute <0x0007c>
at <ExecuteInstantiatedTask>d__26:MoveNext <0x00bcf>
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:Start <0x000bb>
at Microsoft.Build.BackEnd.TaskBuilder:ExecuteInstantiatedTask <0x0016f>
at <InitializeAndExecuteTask>d__24:MoveNext <0x0013b>
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:Start <0x000af>
at Microsoft.Build.BackEnd.TaskBuilder:InitializeAndExecuteTask <0x0016f>
at <ExecuteBucket>d__19:MoveNext <0x0072b>
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:Start <0x000b7>
at Microsoft.Build.BackEnd.TaskBuilder:ExecuteBucket <0x0013f>
at <ExecuteTask>d__18:MoveNext <0x005cb>
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:Start <0x000bb>
at Microsoft.Build.BackEnd.TaskBuilder:ExecuteTask <0x000e7>
at <ExecuteTask>d__13:MoveNext <0x004b7>
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:Start <0x000bb>
at Microsoft.Build.BackEnd.TaskBuilder:ExecuteTask <0x0023f>
at <ProcessBucket>d__51:MoveNext <0x001ce>
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:Start <0x000bb>
at Microsoft.Build.BackEnd.TargetEntry:ProcessBucket <0x00183>
at <ExecuteTarget>d__44:MoveNext <0x00b97>
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder:Start <0x000bb>
at Microsoft.Build.BackEnd.TargetEntry:ExecuteTarget <0x00147>
at <ProcessTargetStack>d__21:MoveNext <0x00d6f>
at MoveNextRunner:InvokeMoveNext <0x00092>
at System.Threading.ExecutionContext:RunInternal <0x001c6>
at System.Threading.ExecutionContext:Run <0x00043>
at MoveNextRunner:Run <0x000bb>
at <>c:<Run>b__2_0 <0x00047>
at System.Threading.Tasks.Task:InnerInvoke <0x0008e>
at System.Threading.Tasks.Task:Execute <0x00037>
at System.Threading.Tasks.Task:ExecutionContextCallback <0x00053>
at System.Threading.ExecutionContext:RunInternal <0x001c6>
at System.Threading.ExecutionContext:Run <0x00043>
at System.Threading.Tasks.Task:ExecuteWithThreadLocal <0x000f3>
at System.Threading.Tasks.Task:ExecuteEntry <0x000cf>
at System.Threading.Tasks.TaskScheduler:TryExecuteTask <0x00043>
at DedicatedThreadsTaskScheduler:<InjectThread>b__6_0 <0x0009b>
at System.Threading.ThreadHelper:ThreadStart_Context <0x000a5>
at System.Threading.ExecutionContext:RunInternal <0x001c6>
at System.Threading.ExecutionContext:Run <0x00043>
at System.Threading.ExecutionContext:Run <0x00067>
at System.Threading.ThreadHelper:ThreadStart <0x00047>
at System.Object:runtime_invoke_void__this__ <0x00085>
=================================================================
Any news on this issue? This is dragging my team productivity to the bottom. Anything we can do to help investigate this further?
I have troubles with omnsharp crashing every time I create a new file class in C#. I'm using VS Code on Windows 10 with .net core 3.1.
[info]: OmniSharp.MSBuild.ProjectManager
Loading project: /workspaces/backend/API/Sled.Api.Test/Sled.Api.Test.csproj
* Assertion at metadata.c:1086, condition `index < meta->heap_blob.size' not met
=================================================================
Native Crash Reporting
=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================
=================================================================
Native stacktrace:
=================================================================
0x4b8a69 - /root/.vscode-server/extensions/ms-dotnettools.csharp-1.23.6/.omnisharp/1.37.3/bin/mono :
0x4b8dd9 - /root/.vscode-server/extensions/ms-dotnettools.csharp-1.23.6/.omnisharp/1.37.3/bin/mono :
0x4626d5 - /root/.vscode-server/extensions/ms-dotnettools.csharp-1.23.6/.omnisharp/1.37.3/bin/mono :
0x4b800f - /root/.vscode-server/extensions/ms-dotnettools.csharp-1.23.6/.omnisharp/1.37.3/bin/mono :
0x7f81947cc730 - /lib/x86_64-linux-gnu/libpthread.so.0 :
0x7f819430d7bb - /lib/x86_64-linux-gnu/libc.so.6 : gsignal
0x7f81942f8535 - /lib/x86_64-linux-gnu/libc.so.6 : abort
0x718ed4 - /root/.vscode-server/extensions/ms-dotnettools.csharp-1.23.6/.omnisharp/1.37.3/bin/mono :
0x6fc0f1 - /root/.vscode-server/extensions/ms-dotnettools.csharp-1.23.6/.omnisharp/1.37.3/bin/mono :
0x718dbb - /root/.vscode-server/extensions/ms-dotnettools.csharp-1.23.6/.omnisharp/1.37.3/bin/mono :
0x71943d - /root/.vscode-server/extensions/ms-dotnettools.csharp-1.23.6/.omnisharp/1.37.3/bin/mono : monoeg_assertion_message
0x71947a - /root/.vscode-server/extensions/ms-dotnettools.csharp-1.23.6/.omnisharp/1.37.3/bin/mono :
0x60ba58 - /root/.vscode-server/extensions/ms-dotnettools.csharp-1.23.6/.omnisharp/1.37.3/bin/mono :
0x59611e - /root/.vscode-server/extensions/ms-dotnettools.csharp-1.23.6/.omnisharp/1.37.3/bin/mono :
0x5d0496 - /root/.vscode-server/extensions/ms-dotnettools.csharp-1.23.6/.omnisharp/1.37.3/bin/mono :
0x5dcf4b - /root/.vscode-server/extensions/ms-dotnettools.csharp-1.23.6/.omnisharp/1.37.3/bin/mono :
0x41752f3c - Unknown
=================================================================
Telemetry Dumper:
=================================================================
Pkilling 0x140194456160000x from 0x140193334032128x
Pkilling 0x140194513506176x from 0x140193334032128x
Pkilling 0x140192357807872x from 0x140193334032128x
Pkilling 0x140192348874496x from 0x140193334032128x
Pkilling 0x140193340237568x from 0x140193334032128x
Pkilling 0x140193913652992x from 0x140193334032128x
Pkilling 0x140192350975744x from 0x140193334032128x
Pkilling 0x140194450761472x from 0x140193334032128x
Pkilling 0x140193342338816x from 0x140193334032128x
Pkilling 0x140194460395264x from 0x140193334032128x
Pkilling 0x140193915754240x from 0x140193334032128x
Pkilling 0x140193305523968x from 0x140193334032128x
Pkilling 0x140192353076992x from 0x140193334032128x
Pkilling 0x140194452862720x from 0x140193334032128x
Pkilling 0x140193344440064x from 0x140193334032128x
Pkilling 0x140193917855488x from 0x140193334032128x
Pkilling 0x140193307625216x from 0x140193334032128x
Pkilling 0x140193346541312x from 0x140193334032128x
Pkilling 0x140193919956736x from 0x140193334032128x
Pkilling 0x140193362503424x from 0x140193334032128x
Pkilling 0x140193348642560x from 0x140193334032128x
Pkilling 0x140193922057984x from 0x140193334032128x
Pkilling 0x140193353381632x from 0x140193334032128x
Pkilling 0x140193350743808x from 0x140193334032128x
Pkilling 0x140194458277632x from 0x140193334032128x
Pkilling 0x140193963013888x from 0x140193334032128x
Pkilling 0x140193928169216x from 0x140193334032128x
Pkilling 0x140194462512896x from 0x140193334032128x
Pkilling 0x140193362769664x from 0x140193334032128x
Pkilling 0x140193965115136x from 0x140193334032128x
Pkilling 0x140194464614144x from 0x140193334032128x
Pkilling 0x140193328690944x from 0x140193334032128x
Pkilling 0x140192332560128x from 0x140193334032128x
Pkilling 0x140194476537600x from 0x140193334032128x
Pkilling 0x140192363050752x from 0x140193334032128x
Pkilling 0x140192355706624x from 0x140193334032128x
Could not exec mono-hang-watchdog, expected on path '/root/.vscode-server/extensions/ms-dotnettools.csharp-1.23.6/.omnisharp/1.37.3/etc/../bin/mono-hang-watchdog' (errno 2)
Entering thread summarizer pause from 0x140193334032128x
Finished thread summarizer pause from 0x140193334032128x.
Failed to create breadcrumb file (null)/crash_hash_0x21acb2ca88
Waiting for dumping threads to resume
=================================================================
External Debugger Dump:
=================================================================
mono_gdb_render_native_backtraces not supported on this platform, unable to find gdb or lldb
=================================================================
Basic Fault Address Reporting
=================================================================
Memory around native instruction pointer (0x7f819430d7bb):0x7f819430d7ab d2 4c 89 ce bf 02 00 00 00 b8 0e 00 00 00 0f 05 .L..............
0x7f819430d7bb 48 8b 8c 24 08 01 00 00 64 48 33 0c 25 28 00 00 H..$....dH3.%(..
0x7f819430d7cb 00 44 89 c0 75 1d 48 81 c4 10 01 00 00 5b c3 66 .D..u.H......[.f
0x7f819430d7db 0f 1f 44 00 00 48 8b 15 89 36 18 00 f7 d8 64 89 ..D..H...6....d.
=================================================================
Managed Stacktrace:
=================================================================
at <unknown> <0xffffffff>
at System.Reflection.Assembly:InternalGetAssemblyName <0x0008b>
at System.Reflection.AssemblyName:GetAssemblyName <0x00087>
at Microsoft.Build.Shared.AssemblyNameExtension:GetAssemblyNameEx <0x0003f>
at Microsoft.Build.Tasks.SystemState:GetAssemblyName <0x00262>
at Microsoft.Build.Tasks.ReferenceTable:NameAssemblyFileReference <0x000f8>
at Microsoft.Build.Tasks.ReferenceTable:SetPrimaryFileItem <0x0012f>
at Microsoft.Build.Tasks.ReferenceTable:SetPrimaryItems <0x00097>
at Microsoft.Build.Tasks.ReferenceTable:ComputeClosure <0x000b3>
at Microsoft.Build.Tasks.ResolveAssemblyReference:Execute <0x01703>
at Microsoft.Build.Tasks.ResolveAssemblyReference:Execute <0x009e3>
at Microsoft.Build.BackEnd.TaskExecutionHost:Microsoft.Build.BackEnd.ITaskExecutionHost.Execute <0x0007c>
at <ExecuteInstantiatedTask>d__26:MoveNext <0x00bd3>
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:Start <0x000bb>
at Microsoft.Build.BackEnd.TaskBuilder:ExecuteInstantiatedTask <0x0016f>
at <InitializeAndExecuteTask>d__24:MoveNext <0x0013b>
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:Start <0x000af>
at Microsoft.Build.BackEnd.TaskBuilder:InitializeAndExecuteTask <0x0016f>
at <ExecuteBucket>d__19:MoveNext <0x0072b>
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:Start <0x000b7>
at Microsoft.Build.BackEnd.TaskBuilder:ExecuteBucket <0x0013f>
at <ExecuteTask>d__18:MoveNext <0x005cb>
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:Start <0x000bb>
at Microsoft.Build.BackEnd.TaskBuilder:ExecuteTask <0x000e7>
at <ExecuteTask>d__13:MoveNext <0x004b7>
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:Start <0x000bb>
at Microsoft.Build.BackEnd.TaskBuilder:ExecuteTask <0x0023f>
at <ProcessBucket>d__51:MoveNext <0x001ce>
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:Start <0x000bb>
at Microsoft.Build.BackEnd.TargetEntry:ProcessBucket <0x00183>
at <ExecuteTarget>d__44:MoveNext <0x00b97>
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder:Start <0x000bb>
at Microsoft.Build.BackEnd.TargetEntry:ExecuteTarget <0x00147>
at <ProcessTargetStack>d__21:MoveNext <0x00d6f>
at MoveNextRunner:InvokeMoveNext <0x00092>
at System.Threading.ExecutionContext:RunInternal <0x001c6>
at System.Threading.ExecutionContext:Run <0x00043>
at MoveNextRunner:Run <0x000cf>
at <>c:<Run>b__2_0 <0x00047>
at System.Threading.Tasks.Task:InnerInvoke <0x0008e>
at System.Threading.Tasks.Task:Execute <0x00037>
at System.Threading.Tasks.Task:ExecutionContextCallback <0x00053>
at System.Threading.ExecutionContext:RunInternal <0x001c6>
at System.Threading.ExecutionContext:Run <0x00043>
at System.Threading.Tasks.Task:ExecuteWithThreadLocal <0x00103>
at System.Threading.Tasks.Task:ExecuteEntry <0x000cf>
at System.Threading.Tasks.TaskScheduler:TryExecuteTask <0x00043>
at DedicatedThreadsTaskScheduler:<InjectThread>b__6_0 <0x0009b>
at System.Threading.ThreadHelper:ThreadStart_Context <0x000b3>
at System.Threading.ExecutionContext:RunInternal <0x001c6>
at System.Threading.ExecutionContext:Run <0x00043>
at System.Threading.ExecutionContext:Run <0x00067>
at System.Threading.ThreadHelper:ThreadStart <0x00047>
at System.Object:runtime_invoke_void__this__ <0x00085>
=================================================================
/root/.vscode-server/extensions/ms-dotnettools.csharp-1.23.6/.omnisharp/1.37.3/run: line 28: 881 Aborted (core dumped) "${mono_cmd}" "${omnisharp_cmd}" "$@"
Having the same Issue, sometimes i need to restart the remote container two times because omnisharp crashes on the initialization. Using Remote container on linux.
=================================================================
Managed Stacktrace:
=================================================================
at <unknown> <0xffffffff>
at System.Reflection.Assembly:InternalGetAssemblyName <0x0008b>
at System.Reflection.AssemblyName:GetAssemblyName <0x00087>
at Microsoft.Build.Shared.AssemblyNameExtension:GetAssemblyNameEx <0x0003b>
at Microsoft.Build.Tasks.SystemState:GetAssemblyName <0x0024a>
at Microsoft.Build.Tasks.ReferenceTable:NameAssemblyFileReference <0x000d9>
at Microsoft.Build.Tasks.ReferenceTable:SetPrimaryFileItem <0x0012f>
at Microsoft.Build.Tasks.ReferenceTable:SetPrimaryItems <0x00097>
at Microsoft.Build.Tasks.ReferenceTable:ComputeClosure <0x000b3>
at Microsoft.Build.Tasks.ResolveAssemblyReference:Execute <0x01703>
at Microsoft.Build.Tasks.ResolveAssemblyReference:Execute <0x0060b>
at Microsoft.Build.BackEnd.TaskExecutionHost:Microsoft.Build.BackEnd.ITaskExecutionHost.Execute <0x0007c>
at <ExecuteInstantiatedTask>d__26:MoveNext <0x00bd3>
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:Start <0x000bb>
at Microsoft.Build.BackEnd.TaskBuilder:ExecuteInstantiatedTask <0x0016f>
at <InitializeAndExecuteTask>d__24:MoveNext <0x0013b>
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:Start <0x000af>
at Microsoft.Build.BackEnd.TaskBuilder:InitializeAndExecuteTask <0x0016f>
at <ExecuteBucket>d__19:MoveNext <0x0072b>
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:Start <0x000b7>
at Microsoft.Build.BackEnd.TaskBuilder:ExecuteBucket <0x0013f>
at <ExecuteTask>d__18:MoveNext <0x005cb>
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:Start <0x000bb>
at Microsoft.Build.BackEnd.TaskBuilder:ExecuteTask <0x000e7>
at <ExecuteTask>d__13:MoveNext <0x004b7>
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:Start <0x000bb>
at Microsoft.Build.BackEnd.TaskBuilder:ExecuteTask <0x0023f>
at <ProcessBucket>d__51:MoveNext <0x001ce>
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:Start <0x000bb>
at Microsoft.Build.BackEnd.TargetEntry:ProcessBucket <0x00183>
at <ExecuteTarget>d__44:MoveNext <0x00b97>
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder:Start <0x000bb>
at Microsoft.Build.BackEnd.TargetEntry:ExecuteTarget <0x00147>
at <ProcessTargetStack>d__21:MoveNext <0x00d6f>
at MoveNextRunner:InvokeMoveNext <0x00092>
at System.Threading.ExecutionContext:RunInternal <0x001c6>
at System.Threading.ExecutionContext:Run <0x00043>
at MoveNextRunner:Run <0x000bb>
at <>c:<Run>b__2_0 <0x00047>
at System.Threading.Tasks.Task:InnerInvoke <0x0008e>
at System.Threading.Tasks.Task:Execute <0x00037>
at System.Threading.Tasks.Task:ExecutionContextCallback <0x00053>
at System.Threading.ExecutionContext:RunInternal <0x001c6>
at System.Threading.ExecutionContext:Run <0x00043>
at System.Threading.Tasks.Task:ExecuteWithThreadLocal <0x000f3>
at System.Threading.Tasks.Task:ExecuteEntry <0x000cf>
at System.Threading.Tasks.TaskScheduler:TryExecuteTask <0x00043>
at DedicatedThreadsTaskScheduler:<InjectThread>b__6_0 <0x0009b>
at System.Threading.ThreadHelper:ThreadStart_Context <0x000b8>
at System.Threading.ExecutionContext:RunInternal <0x001c6>
at System.Threading.ExecutionContext:Run <0x00043>
at System.Threading.ExecutionContext:Run <0x00067>
at System.Threading.ThreadHelper:ThreadStart <0x00047>
at System.Object:runtime_invoke_void__this__ <0x00085>
=================================================================
/root/.vscode-server/extensions/ms-dotnettools.csharp-1.23.8/.omnisharp/1.37.5/run: line 28: 393 Aborted (core dumped) "${mono_cmd}" "${omnisharp_cmd}" "$@"
`
@nohwnd @JoeRobich what else can I do to help fixing this issue?
I often (multiple times per day) get this crash when debugging. Running on linux, no containers.
I can often (but not always) prevent a crash by disabling the "All Exceptions" and "User-Unhandled Exceptions" breakpoints. When those are disabled, it crashes less often.
When those are enabled - and I hit a breakpoint, or step through code - and step over a throw new FooException()
, it'll proceed to the end of the test, then crash (a Mono crash like described above.)
Hope that provide more insight into the problem? This is a really (!) bad bug, which has been with us for ages.
I often (multiple times per day) get this crash when debugging. Running on linux, no containers.
I can often (but not always) prevent a crash by disabling the "All Exceptions" and "User-Unhandled Exceptions" breakpoints. When those are disabled, it crashes less often.
When those are enabled - and I hit a breakpoint, or step through code - and step over a
throw new FooException()
, it'll proceed to the end of the test, then crash (a Mono crash like described above.)Hope that provide more insight into the problem? This is a really (!) bad bug, which has been with us for ages.
Really BAD. All bugs witch need restart entire IDE is pain for developer day-life. Please, help us ...
Some feedback: since upgrading to the net6-based o#, I no longer have debugging crashes. :smile:
Some feedback: since upgrading to the net6-based o#, I no longer have debugging crashes.
thanks for confirming. The crash was indeed coming from the embedded Mono and we are going to be moving away from it - NET 6 build will become the default.
@filipw Still experiencing the crash on OmniSharp v1.24.3
Some feedback: since upgrading to the net6-based o#, I no longer have debugging crashes. 😄
Same here. To enable the .NET Core Build of OmniSharp in VSCode, just add the following line to your VSCode configuration:
"omnisharp.useModernNet": true
Issue Description
Steps to Reproduce
1 - Add breakpoint to code 2 - Run a test with "Debug Test"
Expected Behavior
Expected code execution to reach the breakpoint
Actual Behavior
1- Omnisharp server crashes
Obs: There is also a huge json crash dump from mono, I can send it via email under request. I also saved the debug log and can send it also.
Logs
OmniSharp log
Starting OmniSharp server at 8/27/2020, 1:58:21 PM Target: /workspaces/backend/backend.sln
OmniSharp server started. Path: /root/.vscode-server/extensions/ms-dotnettools.csharp-1.23.1/.omnisharp/1.37.0/run PID: 408
Can't find custom attr constructor image: /workspaces/backend/API/Troco.Api.Common/bin/Debug/netcoreapp3.1/Troco.Api.Common.dll mtoken: 0x0a00000c due to: Cannot resolve dependency to assembly because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event. Can't find custom attr constructor image: /workspaces/backend/API/Troco.Api.Common/bin/Debug/netcoreapp3.1/Troco.Api.Common.dll mtoken: 0x0a00000c due to: Cannot resolve dependency to assembly because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.
Can't find custom attr constructor image: /workspaces/backend/API/Troco.Api.Common/bin/Debug/netcoreapp3.1/Troco.Api.Common.dll mtoken: 0x0a00000c due to: Cannot resolve dependency to assembly because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event. Can't find custom attr constructor image: /workspaces/backend/API/Troco.Api.Common/bin/Debug/netcoreapp3.1/Troco.Api.Common.dll mtoken: 0x0a00000c due to: Cannot resolve dependency to assembly because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.
/workspaces/backend/API/Sled.Api/Sled.Api.csproj /usr/share/dotnet/sdk/3.1.302/Sdks/Microsoft.NET.Sdk.Razor/build/netstandard2.0/Sdk.Razor.CurrentVersion.targets(404,5): Error: Detected Razor language version downgrade. This is typically caused by a reference to the Microsoft.AspNetCore.Razor.Design package. Consider removing this package reference.
Can't find custom attr constructor image: /workspaces/backend/API/Troco.Api.Common/bin/Debug/netcoreapp3.1/Troco.Api.Common.dll mtoken: 0x0a00000c due to: Cannot resolve dependency to assembly because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event. Can't find custom attr constructor image: /workspaces/backend/API/Troco.Api.Common/bin/Debug/netcoreapp3.1/Troco.Api.Common.dll mtoken: 0x0a00000c due to: Cannot resolve dependency to assembly because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.
Can't find custom attr constructor image: /workspaces/backend/API/Troco.Api.Common/bin/Debug/netcoreapp3.1/Troco.Api.Common.dll mtoken: 0x0a00000c due to: Cannot resolve dependency to assembly because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event. Can't find custom attr constructor image: /workspaces/backend/API/Troco.Api.Common/bin/Debug/netcoreapp3.1/Troco.Api.Common.dll mtoken: 0x0a00000c due to: Cannot resolve dependency to assembly because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.
Can't find custom attr constructor image: /workspaces/backend/API/Troco.Api.Common/bin/Debug/netcoreapp3.1/Troco.Api.Common.dll mtoken: 0x0a00000c due to: Cannot resolve dependency to assembly because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event. Can't find custom attr constructor image: /workspaces/backend/API/Troco.Api.Common/bin/Debug/netcoreapp3.1/Troco.Api.Common.dll mtoken: 0x0a00000c due to: Cannot resolve dependency to assembly because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.
/workspaces/backend/API/Troco.CustomerApi/Troco.CustomerApi.csproj /usr/share/dotnet/sdk/3.1.302/Sdks/Microsoft.NET.Sdk.Razor/build/netstandard2.0/Sdk.Razor.CurrentVersion.targets(404,5): Error: Detected Razor language version downgrade. This is typically caused by a reference to the Microsoft.AspNetCore.Razor.Design package. Consider removing this package reference.
Can't find custom attr constructor image: /workspaces/backend/API/Troco.Api.Common/bin/Debug/netcoreapp3.1/Troco.Api.Common.dll mtoken: 0x0a00000c due to: Cannot resolve dependency to assembly because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event. Can't find custom attr constructor image: /workspaces/backend/API/Troco.Api.Common/bin/Debug/netcoreapp3.1/Troco.Api.Common.dll mtoken: 0x0a00000c due to: Cannot resolve dependency to assembly because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.
Can't find custom attr constructor image: /workspaces/backend/API/Troco.Api.Common/bin/Debug/netcoreapp3.1/Troco.Api.Common.dll mtoken: 0x0a00000c due to: Cannot resolve dependency to assembly because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event. Can't find custom attr constructor image: /workspaces/backend/API/Troco.Api.Common/bin/Debug/netcoreapp3.1/Troco.Api.Common.dll mtoken: 0x0a00000c due to: Cannot resolve dependency to assembly because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.
Can't find custom attr constructor image: /workspaces/backend/API/Troco.Api.Common/bin/Debug/netcoreapp3.1/Troco.Api.Common.dll mtoken: 0x0a00000c due to: Cannot resolve dependency to assembly because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event. Can't find custom attr constructor image: /workspaces/backend/API/Troco.Api.Common/bin/Debug/netcoreapp3.1/Troco.Api.Common.dll mtoken: 0x0a00000c due to: Cannot resolve dependency to assembly because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.
Can't find custom attr constructor image: /workspaces/backend/API/Troco.Api.Common/bin/Debug/netcoreapp3.1/Troco.Api.Common.dll mtoken: 0x0a00000c due to: Cannot resolve dependency to assembly because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event. Can't find custom attr constructor image: /workspaces/backend/API/Troco.Api.Common/bin/Debug/netcoreapp3.1/Troco.Api.Common.dll mtoken: 0x0a00000c due to: Cannot resolve dependency to assembly because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.
Can't find custom attr constructor image: /workspaces/backend/API/Troco.Api.Common/bin/Debug/netcoreapp3.1/Troco.Api.Common.dll mtoken: 0x0a00000c due to: Cannot resolve dependency to assembly because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event. Can't find custom attr constructor image: /workspaces/backend/API/Troco.Api.Common/bin/Debug/netcoreapp3.1/Troco.Api.Common.dll mtoken: 0x0a00000c due to: Cannot resolve dependency to assembly because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.
Can't find custom attr constructor image: /workspaces/backend/API/Troco.Api.Common/bin/Debug/netcoreapp3.1/Troco.Api.Common.dll mtoken: 0x0a00000c due to: Cannot resolve dependency to assembly because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event. Can't find custom attr constructor image: /workspaces/backend/API/Troco.Api.Common/bin/Debug/netcoreapp3.1/Troco.Api.Common.dll mtoken: 0x0a00000c due to: Cannot resolve dependency to assembly because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.
Can't find custom attr constructor image: /workspaces/backend/API/Troco.Api.Common/bin/Debug/netcoreapp3.1/Troco.Api.Common.dll mtoken: 0x0a00000c due to: Cannot resolve dependency to assembly because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event. Can't find custom attr constructor image: /workspaces/backend/API/Troco.Api.Common/bin/Debug/netcoreapp3.1/Troco.Api.Common.dll mtoken: 0x0a00000c due to: Cannot resolve dependency to assembly because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.
Can't find custom attr constructor image: /workspaces/backend/API/Troco.Api.Common/bin/Debug/netcoreapp3.1/Troco.Api.Common.dll mtoken: 0x0a00000c due to: Cannot resolve dependency to assembly because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event. Can't find custom attr constructor image: /workspaces/backend/API/Troco.Api.Common/bin/Debug/netcoreapp3.1/Troco.Api.Common.dll mtoken: 0x0a00000c due to: Cannot resolve dependency to assembly because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.
Can't find custom attr constructor image: /workspaces/backend/API/Troco.Api.Common/bin/Debug/netcoreapp3.1/Troco.Api.Common.dll mtoken: 0x0a00000c due to: Cannot resolve dependency to assembly because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event. Can't find custom attr constructor image: /workspaces/backend/API/Troco.Api.Common/bin/Debug/netcoreapp3.1/Troco.Api.Common.dll mtoken: 0x0a00000c due to: Cannot resolve dependency to assembly because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.
/root/.vscode-server/extensions/ms-dotnettools.csharp-1.23.1/.omnisharp/1.37.0/run: line 28: 433 Killed "${mono_cmd}" "${omnisharp_cmd}" "$@"
C# log
blank
Environment information
VSCode version: 1.48.2 C# Extension: 1.23.1
Mono Information
OmniSharp using built-in monoDotnet Information
.NET Core SDK (reflecting any global.json): Version: 3.1.302 Commit: 41faccf259 Runtime Environment: OS Name: ubuntu OS Version: 18.04 OS Platform: Linux RID: ubuntu.18.04-x64 Base Path: /usr/share/dotnet/sdk/3.1.302/ Host (useful for support): Version: 3.1.6 Commit: 3acd9b0cd1 .NET Core SDKs installed: 3.1.302 [/usr/share/dotnet/sdk] .NET Core runtimes installed: Microsoft.AspNetCore.App 3.1.6 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 3.1.6 [/usr/share/dotnet/shared/Microsoft.NETCore.App] To install additional .NET Core runtimes or SDKs: https://aka.ms/dotnet-downloadVisual Studio Code Extensions
|Extension|Author|Version| |---|---|---| |csharp|ms-dotnettools|1.23.1| |csharpfixformat|Leopotam|0.0.84| |dotnet-test-explorer|formulahendry|0.7.4| |gitlab-workflow|GitLab|3.2.0| |gitlens|eamodio|10.2.2| |vscode-solution-explorer|fernandoescolar|0.3.11| |vsliveshare|ms-vsliveshare|1.0.2708|;