akkadotnet/Hyperion

Issues with Int64 mutation into Int32 during distributed pub sub messaging between linux and windows host

Arkatufus opened this issue · 3 comments

Int64 is somehow being serialized into Int32 in the wire format inside a distributed pub sub between linux and windows host.

2021-06-22 07:47:10 ERR AssociationError [REDACTED] -> REDACTED: Error [Unable to cast obje
ct of type 'System.Int32' to type 'System.Int64'.] [ 
   at lambda_method132(Closure , Stream , DeserializerSession )
   at Hyperion.ValueSerializers.ObjectSerializer.ReadValue(Stream stream, DeserializerSession session)
   at lambda_method130(Closure , Stream , DeserializerSession )
   at Hyperion.ValueSerializers.ObjectSerializer.ReadValue(Stream stream, DeserializerSession session)
   at Hyperion.Serializer.Deserialize[T](Stream stream)
   at Akka.Serialization.HyperionSerializer.FromBinary(Byte[] bytes, Type type)
   at Akka.Serialization.Serialization.Deserialize(Byte[] bytes, Int32 serializerId, String manifest)
   at Akka.Remote.MessageSerializer.Deserialize(ExtendedActorSystem system, Payload messageProtocol)
   at Akka.Remote.DefaultMessageDispatcher.Dispatch(IInternalActorRef recipient, Address recipientAddress, Payload message, IActorRef senderOption)
   at Akka.Remote.EndpointReader.<Reading>b__11_0(InboundPayload inbound)
   at lambda_method60(Closure , Object , Action`1 , Action`1 , Action`1 )
   at Akka.Actor.ReceiveActor.OnReceive(Object message)
   at Akka.Actor.UntypedActor.Receive(Object message)
   at Akka.Actor.ActorBase.AroundReceive(Receive receive, Object message)
   at Akka.Actor.ActorCell.ReceiveMessage(Object message)
   at Akka.Actor.ActorCell.Invoke(Envelope envelope)]

Attempted to reproduce the bug in this branch: akkadotnet/akka.net#5134
Could not reproduce the mutation problem.

Resolved via #236

As a reference, original issue was caused by different string sorting algorithm in different platforms.