Skip to content
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

Compiler crashing issues reported through internal telemetry #38878

Closed
mkArtakMSFT opened this issue Dec 7, 2021 · 6 comments
Closed

Compiler crashing issues reported through internal telemetry #38878

mkArtakMSFT opened this issue Dec 7, 2021 · 6 comments
Labels
area-razor.compiler This issue is related to the Razor compiler (now external) bug This issue describes a behavior which is not expected - a bug. Priority:1 Work that is critical for the release, but we could probably ship without razor.compiler-toolingsupport

Comments

@mkArtakMSFT
Copy link
Member

Internal Error - System.InvalidOperationException: Se produjo una excepción de tipo 'System.InvalidOperationException'. en System.Runtime.CompilerServices.ConditionalWeakTable2.VerifyIntegrity() en System.Runtime.CompilerServices.ConditionalWeakTable2.Add(TKey key, TValue value) en Microsoft.AspNetCore.Razor.Language.Syntax.GreenNode..ctor(SyntaxKind kind, Int32 fullWidth, RazorDiagnostic[] diagnostics, SyntaxAnnotation[] annotations) en Microsoft.AspNetCore.Razor.Language.Syntax.InternalSyntax.MarkupTextLiteralSyntax.SetAnnotations(SyntaxAnnotation[] annotations) en Microsoft.AspNetCore.Razor.Language.Legacy.TokenizerBackedParser`1.GetNodeWithSpanContext[TNode](TNode node) en @Artak this is another compiler error which also would have killed VS but in the new editor scenario will give funky colors, lacking IntelliSense etc. (experience will fall over). Could you file a separate issue to track please.

More context can be found from: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1435565

@mkArtakMSFT mkArtakMSFT added bug This issue describes a behavior which is not expected - a bug. area-razor.compiler This issue is related to the Razor compiler (now external) razor.compiler-toolingsupport labels Dec 7, 2021
@mkArtakMSFT mkArtakMSFT added this to the .NET 7 Planning milestone Dec 7, 2021
@ghost
Copy link

ghost commented Dec 7, 2021

Thanks for contacting us.

We're moving this issue to the .NET 7 Planning milestone for future evaluation / consideration. We would like to keep this around to collect more feedback, which can help us with prioritizing this work. We will re-evaluate this issue, during our next planning meeting(s).
If we later determine, that the issue has no community involvement, or it's very rare and low-impact issue, we will close it - so that the team can focus on more important and high impact issues.
To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.

@mkArtakMSFT mkArtakMSFT added the Priority:1 Work that is critical for the release, but we could probably ship without label Dec 7, 2021
@javiercn
Copy link
Member

javiercn commented Jan 25, 2022

It's not clear that this is a bug in our code.

The source of the exception seems to be in the runtime https://github.com/dotnet/runtime/blob/main/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/ConditionalWeakTable.cs#L747-L752

The issue seems to be originated in our code here

However, I don't see how we can be misusing the APIs offered by the runtime, so I believe this might be a bug in the runtime.

It's also important to note, that these nodes are generated based on some tool from Roslyn adapted for Blazor.

@javiercn
Copy link
Member

I suspect this might be a bug in .NET Framework (which is used only when the compiler is running inside VS) as noted by the call here

@javiercn
Copy link
Member

javiercn commented Jan 25, 2022

@mkArtakMSFT can you get more details on how common this issue is? I also suspect that the roslyn folks will have observed the same issue. This was literally removed on Core CLR like 5 years ago (https://github.com/dotnet/runtime/blame/34a4cdb72c5da9c163167618799b37549b4d80ee/src/coreclr/src/mscorlib/src/System/Runtime/CompilerServices/ConditionalWeakTable.cs#L136) so I don't believe there's any action we can take here.

dotnet/runtime@854532c

@javiercn javiercn removed this from the .NET 7 Planning milestone Jan 25, 2022
@mkArtakMSFT
Copy link
Member Author

@javiercn you seem to be right here. I glanced through the links you've shared as well as the exception stack trace.
Also, I've tried to go back to Watson logs to get details about this particular exception and found no reports of it in the original internal ticket.
@NTaylorMullen if you disagree with the assessment here, please let us know and also share a link to Watson reports so that we can confirm the above theory. Otherwise no further action is pending here.

@NTaylorMullen
Copy link
Contributor

One thing to keep in mind. Visual Studio is a .NET Framework application. Meaning, any change to the .NET Core side of the world doesn't necessarily mean it's fixed in the .NET Framework side.

@ghost ghost locked as resolved and limited conversation to collaborators Feb 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-razor.compiler This issue is related to the Razor compiler (now external) bug This issue describes a behavior which is not expected - a bug. Priority:1 Work that is critical for the release, but we could probably ship without razor.compiler-toolingsupport
Projects
None yet
Development

No branches or pull requests

3 participants