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

RemoteWatcher race-condition fix #3519

Merged

Conversation

zbynek001
Copy link
Contributor

There is a race condition in the RemoteWatcher when Unwatching shortly before receiving Terminated
resulting in:

System.Collections.Generic.KeyNotFoundException: The given key '[akka.tcp://engine@10.0.0.5:30002/system/XXXXXXXXXX#399075042]' was not present in the dictionary.
 at TValue System.Collections.Generic.Dictionary<TKey, TValue>.get_Item(TKey key)
 at void Akka.Remote.RemoteWatcher.ProcessTerminated(IInternalActorRef watchee, bool existenceConfirmed, bool addressTerminated)
 at void Akka.Cluster.ClusterRemoteWatcher.OnReceive(object message)
 at bool Akka.Actor.UntypedActor.Receive(object message)
 at bool Akka.Actor.ActorBase.AroundReceive(Receive receive, object message)
 at void Akka.Actor.ActorCell.ReceiveMessage(object message)
 at void Akka.Actor.ActorCell.AutoReceiveMessage(Envelope envelope)
 at void Akka.Actor.ActorCell.Invoke(Envelope envelope)

@Aaronontheweb
Copy link
Member

@zbynek001 I think you've earned an Akka.NET tshirt or something by now with all of these fixes.

Copy link
Member

@Aaronontheweb Aaronontheweb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, looks like a definite bug on our part.

@zbynek001
Copy link
Contributor Author

@Aaronontheweb I'm happy to help, since I'm using it ;)

@Aaronontheweb Aaronontheweb added this to the 1.3.9 milestone Jun 22, 2018
@Aaronontheweb Aaronontheweb merged commit 8463034 into akkadotnet:dev Jun 22, 2018
@zbynek001 zbynek001 deleted the remotewatcher-racecondition-fix branch July 16, 2021 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants