-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
NullReferenceException inside ConcurrentDictionary.GrowTable #69192
Comments
It can be a symptom of #68443. It is hard to tell with any level of confidence without a crash dump. |
Another similar-looking-but-not-quite example in #69068: Generating native code
Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.
at System.Collections.Concurrent.ConcurrentDictionary`2.TryGetValueInternal(TKey key, Int32 hashcode, TValue& value)
at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
at ILCompiler.DependencyAnalysis.NodeFactory.NodeCache`2.GetOrAdd(TKey key) in /_/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/NodeFactory.cs:line 156
at ILCompiler.DependencyAnalysis.NodeFactory.MethodMetadata(MethodDesc method) in /_/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/NodeFactory.cs:line 998
at ILCompiler.UsageBasedMetadataManager.GeneratedTypesAndCodeMetadataPolicy.GeneratesMetadata(MethodDesc methodDef) in /_/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/UsageBasedMetadataManager.cs:line 873
at ILCompiler.Metadata.Transform`1.HandleQualifiedMethod(MethodDesc method) in /_/src/coreclr/tools/aot/ILCompiler.MetadataTransform/ILCompiler/Metadata/Transform.Method.cs:line 36
at ILCompiler.MetadataManager.CreateStackTraceRecord(MetadataTransform transform, MethodDesc method) in /_/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/MetadataManager.cs:line 573 Pipeline run: https://dev.azure.com/dnceng/public/_build/results?buildId=1769350&view=results |
Failed again in: runtime-coreclr outerloop 20220526.2 Failed test:
Error message:
|
Failed in #70251
|
I have a more or less reproducible crash attached. Is this related? I'm on .NET 6.0, VS 2022.
This is the line. The visible IP is in two lines below, probably because it is optimized.
Seems to happen at large item counts (Count = 94644926). I don't see which value exactly is null.
As far as I can tell this occurs even when no second thread is currently holding a lock. Update The linked list had a length of 42 before When I replaced the hash function with a better one, the problem disappeared. |
I'm wondering whether this might be related to #66079 - in this issue we're observing unbounded growth of certain dictionaries due to the generic explosion, at one point I observed 32-bit integer wraparound that might theoretically explain the nullref. I continue working on the fix for 66079 with the hope that this may go away once it's available. |
@nerai I do not see the repro attached. Could you please share it? |
Sorry, I worded that poorly. The crash was reproducible, but it was part of a large in-prod project. It took hours/days to manifest during runtime, so it's not easy to create a separate project that I could share here. |
Hi @nerai, would you be able to share a few dumps of the failure so we could investigate further? Thanks |
No repro since June 18th? |
Ok to close then and re-evaluate if it shows up again. |
Pipeline: https://dev.azure.com/dnceng/public/_build/results?buildId=1764865&view=results
Job: Installer Build and Test coreclr Linux_arm Release
@jkotas do you think this could also be a symptom of #68443?
The text was updated successfully, but these errors were encountered: