vlingo-net / xoom-net-directory

Service registration and discovery for the VLINGO/PLATFORM.
Mozilla Public License 2.0
8 stars 7 forks source link

Random test failure on CI #7

Closed tjaskula closed 4 years ago

tjaskula commented 4 years ago

Have to investigate why some tests TestAlteredLeadership are randomly failing as here

https://ci.appveyor.com/project/VlingoNetOwner/vlingo-net-directory/builds/27992540/tests

mihaj commented 4 years ago

Here are some details of current investigation:

In DirectoryServiceTest Setup constructor the clients (client1,...) are null:

            _client1 = _testWorld.ActorFor<IDirectoryClient>(
                Definition.Has<DirectoryClientActor>(
                    Definition.Parameters(_interest1, _group, 1024, 50, 10)));

The error message I get is:

Test Name:  Vlingo.Directory.Tests.Model.DirectoryServiceTest.TestAlteredLeadership
Test Outcome:   Failed
Result Message: System.NullReferenceException : Object reference not set to an instance of an object.
Result StandardOutput:  
consoleLogger[Info]: DIRECTORY: Starting...
consoleLogger[Info]: DIRECTORY: Waiting to gain leadership...
Actor instantiation failed because: ActorFactory failed actor creation for: Address[Id=4, Name=(none)]
consoleLogger[Error]: ActorFactory: failed actor creation. This is sometimes cause by the constructor parameter types not matching the types in the Definition.parameters(). Often it is caused by a failure in the actor constructor. We have attempted to uncover the root cause here, but that may not be available in some cases.
The root cause may be: Cannot assign network interface
See stacktrace for more information. We strongly recommend reviewing your constructor for possible failures in dependencies that it creates.
consoleLogger[Error] [Exception]: Cannot assign network interface
   at Vlingo.Actors.Stage.CreateRawActor(Definition definition, Actor parent, IAddress maybeAddress, IMailbox maybeMailbox, ISupervisor maybeSupervisor, ILogger logger)
   at Vlingo.Actors.Stage.ActorProtocolFor[T](Definition definition, Actor parent, IAddress maybeAddress, IMailbox maybeMailbox, ISupervisor maybeSupervisor, ILogger logger)
Object reference not set to an instance of an object.
   at Vlingo.Actors.Stage.TestActorFor[T](Definition definition)
consoleLogger[Error] [StackTrace]:    at Vlingo.Wire.Multicast.MulticastSubscriber.AssignBestGuessNetworkInterfaceTo(Socket channel)
   at Vlingo.Wire.Multicast.MulticastSubscriber..ctor(String name, Group group, String networkInterfaceName, Int32 maxMessageSize, Int32 maxReceives, ILogger logger)
   at Vlingo.Wire.Multicast.MulticastSubscriber..ctor(String name, Group group, Int32 maxMessageSize, Int32 maxReceives, ILogger logger)
   at Vlingo.Directory.Client.DirectoryClientActor..ctor(IServiceDiscoveryInterest interest, Group directoryPublisherGroup, Int32 maxMessageSize, Int64 processingInterval, Int32 processingTimeout) in C:\Users\MJC-PC\source\repos\vlingo-net-directory\src\Vlingo.Directory\Client\DirectoryClientActor.cs:line 41
consoleLogger[Error]: Actor instantiation failed because: ActorFactory failed actor creation for: Address[Id=4, Name=(none)]
consoleLogger[Error] [Exception]: ActorFactory failed actor creation for: Address[Id=4, Name=(none)]
consoleLogger[Error] [StackTrace]:    at Vlingo.Actors.ActorFactory.Start(ConstructorInfo ctor, IAddress address, Definition definition, ILogger logger)
   at Vlingo.Actors.ActorFactory.ActorFor(Stage stage, Actor parent, Definition definition, IAddress address, IMailbox mailbox, ISupervisor supervisor, ILogger logger)
   at Vlingo.Actors.Stage.CreateRawActor(Definition definition, Actor parent, IAddress maybeAddress, IMailbox maybeMailbox, ISupervisor maybeSupervisor, ILogger logger)
consoleLogger[Error]: vlingo-net/actors: FAILED: Actor instantiation failed because: ActorFactory failed actor creation for: Address[Id=4, Name=(none)]
consoleLogger[Error] [Exception]: Actor instantiation failed because: ActorFactory failed actor creation for: Address[Id=4, Name=(none)]
consoleLogger[Error] [StackTrace]:    at Vlingo.Actors.Stage.CreateRawActor(Definition definition, Actor parent, IAddress maybeAddress, IMailbox maybeMailbox, ISupervisor maybeSupervisor, ILogger logger)
   at Vlingo.Actors.Stage.ActorProtocolFor[T](Definition definition, Actor parent, IAddress maybeAddress, IMailbox maybeMailbox, ISupervisor maybeSupervisor, ILogger logger)
consoleLogger[Error] [InnerException]: ActorFactory failed actor creation for: Address[Id=4, Name=(none)]
consoleLogger[Error] [InnerException-StackTrace]:    at Vlingo.Actors.ActorFactory.Start(ConstructorInfo ctor, IAddress address, Definition definition, ILogger logger)
   at Vlingo.Actors.ActorFactory.ActorFor(Stage stage, Actor parent, Definition definition, IAddress address, IMailbox mailbox, ISupervisor supervisor, ILogger logger)
   at Vlingo.Actors.Stage.CreateRawActor(Definition definition, Actor parent, IAddress maybeAddress, IMailbox maybeMailbox, ISupervisor maybeSupervisor, ILogger logger)
consoleLogger[Error]: vlingo-net/actors: FAILED: Object reference not set to an instance of an object.
consoleLogger[Error] [Exception]: Object reference not set to an instance of an object.
consoleLogger[Error] [StackTrace]:    at Vlingo.Actors.Stage.TestActorFor[T](Definition definition)
consoleLogger[Error]: ActorFactory: failed actor creation. This is sometimes cause by the constructor parameter types not matching the types in the Definition.parameters(). Often it is caused by a failure in the actor constructor. We have attempted to uncover the root cause here, but that may not be available in some cases.
The root cause may be: Cannot assign network interface
See stacktrace for more information. We strongly recommend reviewing your constructor for possible failures in dependencies that it creates.
consoleLogger[Error] [Exception]: Cannot assign network interface
Actor instantiation failed because: ActorFactory failed actor creation for: Address[Id=6, Name=(none)]
   at Vlingo.Actors.Stage.CreateRawActor(Definition definition, Actor parent, IAddress maybeAddress, IMailbox maybeMailbox, ISupervisor maybeSupervisor, ILogger logger)
   at Vlingo.Actors.Stage.ActorProtocolFor[T](Definition definition, Actor parent, IAddress maybeAddress, IMailbox maybeMailbox, ISupervisor maybeSupervisor, ILogger logger)
consoleLogger[Error] [StackTrace]:    at Vlingo.Wire.Multicast.MulticastSubscriber.AssignBestGuessNetworkInterfaceTo(Socket channel)
   at Vlingo.Wire.Multicast.MulticastSubscriber..ctor(String name, Group group, String networkInterfaceName, Int32 maxMessageSize, Int32 maxReceives, ILogger logger)
   at Vlingo.Wire.Multicast.MulticastSubscriber..ctor(String name, Group group, Int32 maxMessageSize, Int32 maxReceives, ILogger logger)
   at Vlingo.Directory.Client.DirectoryClientActor..ctor(IServiceDiscoveryInterest interest, Group directoryPublisherGroup, Int32 maxMessageSize, Int64 processingInterval, Int32 processingTimeout) in C:\Users\MJC-PC\source\repos\vlingo-net-directory\src\Vlingo.Directory\Client\DirectoryClientActor.cs:line 41
consoleLogger[Error]: Actor instantiation failed because: ActorFactory failed actor creation for: Address[Id=6, Name=(none)]
consoleLogger[Error] [Exception]: ActorFactory failed actor creation for: Address[Id=6, Name=(none)]
consoleLogger[Error] [StackTrace]:    at Vlingo.Actors.ActorFactory.Start(ConstructorInfo ctor, IAddress address, Definition definition, ILogger logger)
   at Vlingo.Actors.ActorFactory.ActorFor(Stage stage, Actor parent, Definition definition, IAddress address, IMailbox mailbox, ISupervisor supervisor, ILogger logger)
   at Vlingo.Actors.Stage.CreateRawActor(Definition definition, Actor parent, IAddress maybeAddress, IMailbox maybeMailbox, ISupervisor maybeSupervisor, ILogger logger)
consoleLogger[Error]: vlingo-net/actors: FAILED: Actor instantiation failed because: ActorFactory failed actor creation for: Address[Id=6, Name=(none)]
Object reference not set to an instance of an object.
consoleLogger[Error] [Exception]: Actor instantiation failed because: ActorFactory failed actor creation for: Address[Id=6, Name=(none)]
   at Vlingo.Actors.Stage.TestActorFor[T](Definition definition)
consoleLogger[Error] [StackTrace]:    at Vlingo.Actors.Stage.CreateRawActor(Definition definition, Actor parent, IAddress maybeAddress, IMailbox maybeMailbox, ISupervisor maybeSupervisor, ILogger logger)
   at Vlingo.Actors.Stage.ActorProtocolFor[T](Definition definition, Actor parent, IAddress maybeAddress, IMailbox maybeMailbox, ISupervisor maybeSupervisor, ILogger logger)
consoleLogger[Error] [InnerException]: ActorFactory failed actor creation for: Address[Id=6, Name=(none)]
consoleLogger[Error] [InnerException-StackTrace]:    at Vlingo.Actors.ActorFactory.Start(ConstructorInfo ctor, IAddress address, Definition definition, ILogger logger)
   at Vlingo.Actors.ActorFactory.ActorFor(Stage stage, Actor parent, Definition definition, IAddress address, IMailbox mailbox, ISupervisor supervisor, ILogger logger)
   at Vlingo.Actors.Stage.CreateRawActor(Definition definition, Actor parent, IAddress maybeAddress, IMailbox maybeMailbox, ISupervisor maybeSupervisor, ILogger logger)
consoleLogger[Error]: vlingo-net/actors: FAILED: Object reference not set to an instance of an object.
consoleLogger[Error] [Exception]: Object reference not set to an instance of an object.
consoleLogger[Error] [StackTrace]:    at Vlingo.Actors.Stage.TestActorFor[T](Definition definition)
consoleLogger[Error]: ActorFactory: failed actor creation. This is sometimes cause by the constructor parameter types not matching the types in the Definition.parameters(). Often it is caused by a failure in the actor constructor. We have attempted to uncover the root cause here, but that may not be available in some cases.
The root cause may be: Cannot assign network interface
See stacktrace for more information. We strongly recommend reviewing your constructor for possible failures in dependencies that it creates.
consoleLogger[Error] [Exception]: Cannot assign network interface
Actor instantiation failed because: ActorFactory failed actor creation for: Address[Id=8, Name=(none)]
   at Vlingo.Actors.Stage.CreateRawActor(Definition definition, Actor parent, IAddress maybeAddress, IMailbox maybeMailbox, ISupervisor maybeSupervisor, ILogger logger)
   at Vlingo.Actors.Stage.ActorProtocolFor[T](Definition definition, Actor parent, IAddress maybeAddress, IMailbox maybeMailbox, ISupervisor maybeSupervisor, ILogger logger)
consoleLogger[Error] [StackTrace]:    at Vlingo.Wire.Multicast.MulticastSubscriber.AssignBestGuessNetworkInterfaceTo(Socket channel)
   at Vlingo.Wire.Multicast.MulticastSubscriber..ctor(String name, Group group, String networkInterfaceName, Int32 maxMessageSize, Int32 maxReceives, ILogger logger)
   at Vlingo.Wire.Multicast.MulticastSubscriber..ctor(String name, Group group, Int32 maxMessageSize, Int32 maxReceives, ILogger logger)
   at Vlingo.Directory.Client.DirectoryClientActor..ctor(IServiceDiscoveryInterest interest, Group directoryPublisherGroup, Int32 maxMessageSize, Int64 processingInterval, Int32 processingTimeout) in C:\Users\MJC-PC\source\repos\vlingo-net-directory\src\Vlingo.Directory\Client\DirectoryClientActor.cs:line 41
consoleLogger[Error]: Actor instantiation failed because: ActorFactory failed actor creation for: Address[Id=8, Name=(none)]
consoleLogger[Error] [Exception]: ActorFactory failed actor creation for: Address[Id=8, Name=(none)]
consoleLogger[Error] [StackTrace]:    at Vlingo.Actors.ActorFactory.Start(ConstructorInfo ctor, IAddress address, Definition definition, ILogger logger)
   at Vlingo.Actors.ActorFactory.ActorFor(Stage stage, Actor parent, Definition definition, IAddress address, IMailbox mailbox, ISupervisor supervisor, ILogger logger)
   at Vlingo.Actors.Stage.CreateRawActor(Definition definition, Actor parent, IAddress maybeAddress, IMailbox maybeMailbox, ISupervisor maybeSupervisor, ILogger logger)
Object reference not set to an instance of an object.
consoleLogger[Error]: vlingo-net/actors: FAILED: Actor instantiation failed because: ActorFactory failed actor creation for: Address[Id=8, Name=(none)]
consoleLogger[Error] [Exception]: Actor instantiation failed because: ActorFactory failed actor creation for: Address[Id=8, Name=(none)]
   at Vlingo.Actors.Stage.TestActorFor[T](Definition definition)
consoleLogger[Error] [StackTrace]:    at Vlingo.Actors.Stage.CreateRawActor(Definition definition, Actor parent, IAddress maybeAddress, IMailbox maybeMailbox, ISupervisor maybeSupervisor, ILogger logger)
   at Vlingo.Actors.Stage.ActorProtocolFor[T](Definition definition, Actor parent, IAddress maybeAddress, IMailbox maybeMailbox, ISupervisor maybeSupervisor, ILogger logger)
consoleLogger[Error] [InnerException]: ActorFactory failed actor creation for: Address[Id=8, Name=(none)]
consoleLogger[Error] [InnerException-StackTrace]:    at Vlingo.Actors.ActorFactory.Start(ConstructorInfo ctor, IAddress address, Definition definition, ILogger logger)
   at Vlingo.Actors.ActorFactory.ActorFor(Stage stage, Actor parent, Definition definition, IAddress address, IMailbox mailbox, ISupervisor supervisor, ILogger logger)
   at Vlingo.Actors.Stage.CreateRawActor(Definition definition, Actor parent, IAddress maybeAddress, IMailbox maybeMailbox, ISupervisor maybeSupervisor, ILogger logger)
consoleLogger[Error]: vlingo-net/actors: FAILED: Object reference not set to an instance of an object.
consoleLogger[Error] [Exception]: Object reference not set to an instance of an object.
consoleLogger[Error] [StackTrace]:    at Vlingo.Actors.Stage.TestActorFor[T](Definition definition)

I made two small updates and here are the build results: https://ci.appveyor.com/project/VlingoNetOwner/vlingo-net-directory/builds/28013507

tjaskula commented 4 years ago

The root cause may be: Cannot assign network interface. Maybe something with conflicting ports to check on. If the port was not released by previous test or something like that

tjaskula commented 4 years ago

The route cause of this issue is different. I'm closing this issue because it is misleading. New issue has been opened #12