dotnet / orleans

Cloud Native application framework for .NET
https://docs.microsoft.com/dotnet/orleans
MIT License
10.07k stars 2.03k forks source link

Error occurs in clusterbuilder.build when iis website restart #4823

Closed JMPlus2015 closed 5 years ago

JMPlus2015 commented 6 years ago

Hi, I have a websit using Orleans Client connect to the server.

I have a static ClusterClient, and when the website start, the ClientBuilder.Build() is invoked and connect to the server. and when the website shut down, IClusterClient.Close() and Dispose() is invoked .

it runs good, but when the website restart, it become unstable, and then if continue access the website it will become ok, because the IClusterClient is still null, and ClientBuilder.Build() is also invoked for init. and then it will OK all the time.

the env is: windows 10 , IIS 10 , donet framework 4.7.2 , asp.net mvc 5.2.4.0.

the debugger show that: FatalExecutionEngineError , error address is 0x0df3063f,at thread 0xbf8 。error code is 0xc0000005。maybe it is a CLR bug,or unsafe code bug。maybe with COM-interop or PInvoke .

please help.

error

error2

JMPlus2015 commented 6 years ago

it happens in ClientBuilder.Build() method . it occus in a foreach iteration (Orleans.core), see the picture

win10 x64 .

errror3

JMPlus2015 commented 6 years ago

every time in the first request init IClusterClient with build() method after restart iis,
exception throws when populate . and then the website is crashed ,but when request the website again it become ok to run.

ReubenBond commented 6 years ago

@JMPlus2015 The error looks very similar to #4807 - could you please read that thread and ensure that all assembly versions are consistent?

ReubenBond commented 5 years ago

Closing due to inactivity