-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"csc.exe" exited with code -2146232797 ("CompilerServer: server failed [...] Reached end of stream before end of read.") #59336
Comments
Addendum: This error only occurs with this specific project/solution. I do not get the error with other |
Feels like the server compiler crashed. Could you enable crash dumps (see instructions) and see if the repro produces one? |
@jcouv Thanks for the instructions. I tried to debug the memory dump file, however, I was unable to load all the symbols and therefore only had the raw assembly code, the heap dump, and an enumeration of all running tasks/threads. Due to my lack of knowledge of the roslyn codebase, I was unable to dig further into the problem. Could you possibly give me a few pointers? If you or someone else wishes to take a look at the memory dump, it is available here: |
@Unknown6656 When you debug the dump file, I assume you'll get a popup indicating that an exception happened. Can you copy the details from that exception (especially the stack trace)? |
@Unknown6656 Also, if you feel comfortable sharing the dump file with us, here are some instructions for doing that (you can attach the dump file when giving VS feedback): |
@jcouv: I uploaded the dump file to my web server (see: http://unknown6656.com/csc.exe.21680.dmp), however, I can also upload it via the VS feedback system if you want to. You are right in assuming that I get the exception popup.
When inspecting the current thread, I get the following stack trace (this trace includes the argument values of each function call):
This is the summary of the uploaded dump file:
I hope that this sort of helps. If not, just shoot me a message and I will try to help wherever I can. |
@Unknown6656 Thanks. That helps a lot. Would you mind digging one more piece of information? Get the version information for |
Oh, it looks like you already provided the version information I needed in OP: C# compiler: 4.1.0-3.22071.8 (663228d). Thanks! |
Wow, thanks @jcouv for responding that fast, and for tracking down the error source. The latter at least helps me track down the error in the source code and either remove the faulting code or try to refactor the code such that the compiler no longer crashes. (I'm speaking of my own code base -- not the faulting code inside roslyn...) |
I was able to repro the crash (code sample below). It requires a conversion of anonymous function ( Note: if you change from anonymous function syntax to lambda syntax
The crash occurs when we try to report this diagnostic on an anonymous function (parameters don't have names).
|
Thanks very much for tracking down this bug, @jcouv! |
Fix should be in 17.2p2. |
Thank you very much for fixing the issue, Julien! |
I used preview features of C# (!!), when this feature removed, csc had been exited |
Which specific settings? Thank you. |
If I remembered correctly: |
We are facing the same error, but are developing in a pure Linux environment, and builds are done inside Docker. Do you have any instructions on how to get a crashdump in Docker? All instructions I found were Windows based |
Define the container with the correct variables to collect a dump on crash: https://learn.microsoft.com/en-us/dotnet/core/diagnostics/collect-dumps-crash. |
Version Used:
4.1.0-3.22071.8
(663228d)6.0.200-preview.22055.15
Steps to Reproduce:
I am trying to re-compile my library (Unknown6656/Unknown6656.Core@e36c600) which worked perfectly fine in VS 17.1 Preview 1.1 using .NET SDK 5.0.104.
However, I currently get the following error:
Here is the relevant section from the build log:
The
.csproj
file in question can be seen here: https://github.com/Unknown6656/Unknown6656.Core/blob/e36c60073ed88f5c5b2b2de89b3cf791fa0fefd7/Unknown6656.Core/Unknown6656.Core.csprojI already tried the following - without success:
bin/
andobj/
folders..vs/
folder and.user
/.suo
-files.Can someone help me on this issue? Thank you.
The text was updated successfully, but these errors were encountered: