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

Unexpected(?) exception in EndpointRegistry.RegisterReadOnlyEndpoint() #1845

Closed
joonhwan opened this issue Apr 2, 2016 · 2 comments · Fixed by #1862
Closed

Unexpected(?) exception in EndpointRegistry.RegisterReadOnlyEndpoint() #1845

joonhwan opened this issue Apr 2, 2016 · 2 comments · Fixed by #1862

Comments

@joonhwan
Copy link

joonhwan commented Apr 2, 2016

Hi,

I'm using Akka.remote(1.0.6 from nuget) to build pub-sub like service.
When one of pub-sub member restarts its actorsystem while the other is running, using
following code

  var task = Instance.Terminate(); // Instance of  'ActorSystem' 
  task.Wait();
  Instance = null;

Sometims(not always I think) I got following error log in the other side(not the one restarted)

2016/04/02 09:29:07.303    11 ERROR Akka.Actor.OneForOneStrategy  동일한 키를 사용하는 항목이 이미 추가되었습니다. System.ArgumentException: 동일한 키를 사용하는 항목이 이미 추가되었습니다.
   위치: System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
   위치: System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   위치: Akka.Remote.EndpointRegistry.RegisterReadOnlyEndpoint(Address address, IActorRef endpoint, Int32 uid)
   위치: Akka.Remote.EndpointManager.AcceptPendingReader(IActorRef takingOverFrom)
   위치: Akka.Remote.EndpointManager.<Accepting>b__42_21(Terminated terminated)
   위치: lambda_method(Closure , Object , Action`1 , Action`1 , Action`1 , Action`1 , Action`1 , Action`1 , Action`1 , Action`1 , Action`1 , Action`1 , Action`1 )
   위치: Akka.Tools.MatchHandler.PartialHandlerArgumentsCapture`12.Handle(T value)
   위치: Akka.Actor.ReceiveActor.ExecutePartialMessageHandler(Object message, PartialAction`1 partialAction)
   위치: Akka.Actor.ReceiveActor.<>c__DisplayClass11_0.<Become>b__0(Object m)
   위치: Akka.Actor.ActorCell.<>c__DisplayClass109_0.<Akka.Actor.IUntypedActorContext.Become>b__0(Object m)
   위치: Akka.Actor.ActorBase.AroundReceive(Receive receive, Object message)
   위치: Akka.Actor.ActorCell.ReceiveMessage(Object message)
   위치: Akka.Actor.ActorCell.ReceivedTerminated(Terminated t)
   위치: Akka.Actor.ActorCell.AutoReceiveMessage(Envelope envelope)
   위치: Akka.Actor.ActorCell.Invoke(Envelope envelope)

Sorry for the Korean in log, anyway it reads "You are trying to add a new item whose key is already in dictionary" or something.

Due to my lack of knowledge on EndpointManager, I only have to say I'm feeling like somethings go wrong. sorry for that. but Is this really ok?

https://github.com/akkadotnet/akka.net/blob/dev/src/core/Akka.Remote/EndpointRegistry.cs#L58

After this happens, the other actorsystem(not the one who restarted) looks like missing detectection of some remote actors(in the actorsystem who restarted)'s death watch.

Any hint or advice will be appreciated.

@Aaronontheweb
Copy link
Member

Thanks for this - looks like a bug in our Remoting system. We've known there are some in the EndpointManager and this helps limit the search area.

@Aaronontheweb
Copy link
Member

Working on this now

Aaronontheweb added a commit to Aaronontheweb/akka.net that referenced this issue Apr 7, 2016

Verified

This commit was signed with the committer’s verified signature.
pmccarren Patrick McCarren
…ecs to verify akkadotnet#1845
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants