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

[Orleans 7] Orleans runtime fails to start when grain interface contains generic array constraint #8330

Closed
n-sidorov opened this issue Feb 24, 2023 · 0 comments · Fixed by #8337
Assignees
Labels
area-silos category for all the silos related issues Needs: investigation 🔍 Issue that needs investigation Status: Fixed

Comments

@n-sidorov
Copy link
Contributor

n-sidorov commented Feb 24, 2023

When Orleans encounters grain interfaces with generic array constraint it fails to start.

Example of interfaces:

public interface IGrainGeneric<T>
{
}

public interface IGrainArray<T> : IGrainGeneric<T[]>, IGrainWithStringKey
{ 
}

Example of error from trying to run TestCluster:

Message: Class Initialization method <omitted> threw exception. System.InvalidOperationException: System.InvalidOperationException: Encountered unexpected character. Expected '[', actual ']'..

Stack trace from failing TestCluster:

BufferReader.ThrowUnexpectedCharacter(Char expected, Char actual) line 380
BufferReader.ConsumeCharacter(Char assertChar) line 362
RuntimeTypeNameParser.ParseInternal(BufferReader& input) line 150
RuntimeTypeNameParser.ParseInternal(ReadOnlySpan`1& input) line 48
RuntimeTypeNameParser.ParseInternal(BufferReader& input) line 152
RuntimeTypeNameParser.ParseInternal(ReadOnlySpan`1& input) line 48
RuntimeTypeNameParser.Parse(ReadOnlySpan`1 input) line 42
RuntimeTypeNameParser.Parse(String input) line 35
TypeConverter.<ConsumeMetadata>g__FormatAndAddAllowedType|15_3(Type type) line 206
TypeConverter.<ConsumeMetadata>g__AddAllowedType|15_2(Type type) line 200
TypeConverter.ConsumeMetadata(TypeManifestOptions metadata) line 138
TypeConverter.ctor(IEnumerable`1 formatters, IEnumerable`1 typeNameFilters, IEnumerable`1 typeFilters, IOptions`1 options, TypeResolver typeResolver) line 98
RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
ConstructorInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
RuntimeConstructorInfo.InvokeWithManyArguments(RuntimeConstructorInfo ci, Int32 argCount, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)
CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)
CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)
CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
CallSiteRuntimeResolver.VisitIEnumerable(IEnumerableCallSite enumerableCallSite, RuntimeResolverContext context)
CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)
CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)
CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)
CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope)
ServiceProvider.CreateServiceAccessor(Type serviceType)
ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
ServiceProvider.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope)
ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
<>c__DisplayClass1_0.<AddFromExisting>b__0(IServiceProvider sp) line 48
CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)
CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)
CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)
CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)
CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)
CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)
CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope)
ServiceProvider.CreateServiceAccessor(Type serviceType)
ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
ServiceProvider.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope)
ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
TestClusterHostFactory.InitializeTestHooksSystemTarget(IHost host) line 256
TestClusterHostFactory.CreateSiloHost(String hostName, IConfiguration configuration, Action`1 postConfigureHostBuilder) line 74
<<CreateAsync>b__0>d.MoveNext() line 39
--- End of stack trace from previous location ---
InProcessSiloHandle.CreateAsync(String siloName, IConfiguration configuration, Action`1 postConfigureHostBuilder) line 37
TestCluster.DefaultCreateSiloAsync(String siloName, IConfiguration configuration) line 637
TestCluster.StartSiloAsync(Int32 instanceNumber, TestClusterOptions clusterOptions, IReadOnlyList`1 configurationOverrides, Boolean startSiloOnNewPort) line 700
TestCluster.InitializeAsync() line 612
TestCluster.DeployAsync() line 166
TestCluster.DeployAsync() line 201
TestCluster.Deploy() line 150
@ghost ghost added the Needs: triage 🔍 label Feb 24, 2023
@ReubenBond ReubenBond self-assigned this Feb 24, 2023
@ReubenBond ReubenBond added area-silos category for all the silos related issues Needs: investigation 🔍 Issue that needs investigation and removed Needs: triage 🔍 labels Feb 24, 2023
@ghost ghost added the Status: Fixed label Mar 7, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Apr 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-silos category for all the silos related issues Needs: investigation 🔍 Issue that needs investigation Status: Fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants