Comments (5)
I confirmed it works in 2.10.28
, 2.15.30
, 2.18.16
, 2.23.15
. Broken in 2.28.11
.
I've reverted 2.23.15. Razor syntax highlighting still doesn't work at all, but at least the whole LSP server doesn't crash and break regular .cs
files too.
from vscode-csharp.
Formatting the exception from the logs
[stderr] Fatal error.
[stderr] System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
[stderr] at System.Buffer.Memmove(Byte ByRef, Byte ByRef, UIntPtr)
[stderr] at System.IO.UnmanagedMemoryStream.WriteCore(System.ReadOnlySpan`1)
[stderr] at System.IO.UnmanagedMemoryStream.Write(Byte[], Int32, Int32)
[stderr] at System.IO.Stream.Write(System.ReadOnlySpan`1)
[stderr] at System.IO.StreamWriter.Flush(Boolean, Boolean)
[stderr] at System.IO.StreamWriter.Write(Char[], Int32, Int32)
[stderr] at Microsoft.CodeAnalysis.Text.LargeText.Write(System.IO.TextWriter, Microsoft.CodeAnalysis.Text.TextSpan, System.Threading.CancellationToken)
[stderr] at Microsoft.CodeAnalysis.Host.TemporaryStorageService.g__WriteToMemoryMappedFile|12_0(<>c__DisplayClass12_0 ByRef)
at Microsoft.CodeAnalysis.Host.TemporaryStorageService+d__13.MoveNext()
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Microsoft.CodeAnalysis.Host.TemporaryStorageService+d__13, Microsoft.CodeAnalysis.Workspaces, Version=4.11.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](d__13 ByRef)
at Microsoft.CodeAnalysis.Host.TemporaryStorageService+d__11.MoveNext()
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Microsoft.CodeAnalysis.Host.TemporaryStorageService+d__11, Microsoft.CodeAnalysis.Workspaces, Version=4.11.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](d__11 ByRef)
at Microsoft.CodeAnalysis.RecoverableTextAndVersion+RecoverableText+d__12.MoveNext()
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Microsoft.CodeAnalysis.RecoverableTextAndVersion+RecoverableText+d__12, Microsoft.CodeAnalysis.Workspaces, Version=4.11.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](d__12 ByRef)
at Microsoft.CodeAnalysis.RecoverableTextAndVersion+RecoverableText+d__27.MoveNext()
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Microsoft.CodeAnalysis.RecoverableTextAndVersion+RecoverableText+d__27, Microsoft.CodeAnalysis.Workspaces, Version=4.11.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](d__27 ByRef)
at Microsoft.CodeAnalysis.RecoverableTextAndVersion+RecoverableText.SaveAllAsync(Microsoft.CodeAnalysis.Collections.ImmutableSegmentedList`1>, System.Threading.CancellationToken)
at Roslyn.Utilities.AsyncBatchingWorkQueue`1+<>c__DisplayClass2_0+<b__0>d[[System.ValueTuple`2[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Roslyn.Utilities.AsyncBatchingWorkQueue`1+<>c__DisplayClass2_0+<b__0>d[[System.ValueTuple`2[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], Microsoft.CodeAnalysis.Workspaces, Version=4.11.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<b__0>d> ByRef) [stderr]
at Roslyn.Utilities.AsyncBatchingWorkQueue`1+<>c__DisplayClass2_0[[System.ValueTuple`2[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].b__0(Microsoft.CodeAnalysis.Collections.ImmutableSegmentedList`1>, System.Threading.CancellationToken)
at Roslyn.Utilities.AsyncBatchingWorkQueue`2+d__17[[System.ValueTuple`2[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[Roslyn.Utilities.VoidResult, Microsoft.CodeAnalysis.Workspaces, Version=4.11.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]].MoveNext()
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Roslyn.Utilities.AsyncBatchingWorkQueue`2+d__17[[System.ValueTuple`2[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[Roslyn.Utilities.VoidResult, Microsoft.CodeAnalysis.Workspaces, Version=4.11.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]], Microsoft.CodeAnalysis.Workspaces, Version=4.11.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](d__17,Roslyn.Utilities.VoidResult> ByRef)
at Roslyn.Utilities.AsyncBatchingWorkQueue`2[[System.ValueTuple`2[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[Roslyn.Utilities.VoidResult, Microsoft.CodeAnalysis.Workspaces, Version=4.11.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]].ProcessNextBatchAsync() [stderr]
at Roslyn.Utilities.AsyncBatchingWorkQueue`2+<g__ContinueAfterDelayAsync|15_1>d[[System.ValueTuple`2[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[Roslyn.Utilities.VoidResult, Microsoft.CodeAnalysis.Workspaces, Version=4.11.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]].MoveNext()
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[Roslyn.Utilities.VoidResult, Microsoft.CodeAnalysis.Workspaces, Version=4.11.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35],[Roslyn.Utilities.AsyncBatchingWorkQueue`2+<g__ContinueAfterDelayAsync|15_1>d[[System.ValueTuple`2[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[Roslyn.Utilities.VoidResult, Microsoft.CodeAnalysis.Workspaces, Version=4.11.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]], Microsoft.CodeAnalysis.Workspaces, Version=4.11.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]].MoveNext(System.Threading.Thread)
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading.PortableThreadPool+WorkerThread.WorkerThreadStart()
[Error - 2:35:01 AM] Client Microsoft.CodeAnalysis.LanguageServer: connection to server is erroring. Shutting down server.
@TrieBr would you be able to enable crash dump collection by setting dotnet.server.crashDumpPath
to a user writeable folder in vscode settings? That should hopefully create a crash dump. You can email the dump to me directly if you don't want to share publicly ([email protected])
from vscode-csharp.
@dibarbet Did you receive the crash dump? I'm having the same issue, can generate the crash dump if needed.
from vscode-csharp.
@dibarbet Did you receive the crash dump? I'm having the same issue, can generate the crash dump if needed.
@gabynevada I haven't, if you have one please send it
from vscode-csharp.
Was able to reproduce today on a devcontainer, and figured out the issue thanks to dotnet/runtime#79832
Issue appears to be our usage of memory mapped files - these files are getting stored in /dev/shm
in the docker container which by default is given a max size of 64MB. We quickly exceed this value. Can view this in realtime via the command watch --interval=1 df --human-readable /dev/shm
to see the usage of /dev/shm
slowly go up to 100%, at which point the server crashes.
Currently exploring a fix for the issue, but in the meantime you can start the container with a larger /dev/shm
size by passing --shm-size=4G
to docker run
(or adding "runArgs": ["--shm-size=4G"]
to your devcontainer.json
from vscode-csharp.
Related Issues (20)
- Option to disable implicitly adding `using` directives HOT 4
- C# code analysis fails to initialize with error `System.ArgumentException: filePath` HOT 1
- Request codeLens/resolve failed in git diff HOT 2
- Auto doc comment generation and other formatOnType features broken HOT 9
- Request textDocument/foo failed HOT 10
- Creating a new class under a folder in Solution Explorer does not give the class correct namespace HOT 2
- Iteration Plan for June 2024
- Please default to P2P reference HOT 1
- Standardize UI Navigation with `workbench.action.navigate` HOT 1
- test HOT 1
- If your .NET version is too old, you get no intellisense and an unhelpful error. HOT 1
- Project system ran into an unexcepted error HOT 1
- Various missing features in RazorPages in 2.31.19 HOT 1
- LSP server fails to initialize with: "Failed to find all versions of .NET Core MSBuild. Call to hostfxr_resolve_sdk2." HOT 1
- [MacOS] Unable to display source file when debugging .net dll compiled on Windows with portable pdb format and published as nuget HOT 4
- Debugger UX should show stack for current thread instead of a treeview with all threads HOT 1
- XML documentation (doc comment) creation is no longer working HOT 1
- vscode-maui.android.autosdk.configure HOT 1
- vscode-maui.android.autosdk.configure HOT 1
- Issue loading csproj projects if it includes linked files HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-csharp.