vlingo / xoom-schemata

The VLINGO XOOM Schema Registry.
https://vlingo.io
Mozilla Public License 2.0
17 stars 9 forks source link

ExtendedResourceTest#testSchemaVersionSelection hangs #130

Open wwerner opened 4 years ago

wwerner commented 4 years ago

Since a recent (< 4d ago) upstream update, the test io.vlingo.schemata.resource.ExtendedResourceTest#testSchemaVersionSelection hangs, but only when run using maven from the shell. In IntelliJ, it runs fine. I have no idea what the difference is. The CI build with the same commits on master ran fine 4 days ago.

I'm seeing an instantiation exception during creation of TypeDefinitionCompilerActor due to missing constructor arguments, it seems that a no-arg constructor is expected somewhere, see below.

It looks like https://github.com/vlingo/vlingo-actors/commit/4719dc9c33d89bc3c6d6ae63a1c8d2e2e2d6da26 was pushed in the timeframe in question, and shows up in the stack trace, so perhaps this is a suspect. Just guesswork as of now, though.

What happens is that SchemaVersionEntity tries to use a TypeDefinitionCompilerActor in #diff that is passed in via the command io.vlingo.schemata.resource.SchemaVersionCommands#diffAgainst.

To analyze:

In the debugger I see

Can anyone (@buritos ?) shed some light on this? Thanks!

[INFO] Running io.vlingo.schemata.resource.ExtendedResourceTest
11:26:35.609 [pool-171-thread-5] ERROR io.vlingo.actors.Logger - Actor instantiation failed because: io.vlingo.schemata.codegen.TypeDefinitionCompilerActor
java.lang.InstantiationException: io.vlingo.schemata.codegen.TypeDefinitionCompilerActor
    at java.lang.Class.newInstance(Class.java:427) ~[na:1.8.0_212]
    at io.vlingo.actors.ActorFactory.actorFor(ActorFactory.java:74) ~[vlingo-actors-1.2.0.jar:na]
    at io.vlingo.actors.Stage.createRawActor(Stage.java:667) ~[vlingo-actors-1.2.0.jar:na]
    at io.vlingo.actors.Stage.actorProtocolFor(Stage.java:451) ~[vlingo-actors-1.2.0.jar:na]
    at io.vlingo.actors.Stage.actorFor(Stage.java:112) ~[vlingo-actors-1.2.0.jar:na]
    at io.vlingo.lattice.grid.Grid.actorFor(Grid.java:106) ~[vlingo-lattice-1.2.0.jar:na]
    at io.vlingo.actors.ActorProxyBase.thunk(ActorProxyBase.java:16) ~[vlingo-actors-1.2.0.jar:na]
    at io.vlingo.schemata.model.SchemaVersion__Proxy.lambda$diff$f4acaa83$1(SchemaVersion__Proxy.java:127) ~[classes/:na]
    at io.vlingo.actors.LocalMessage.internalDeliver(LocalMessage.java:121) ~[vlingo-actors-1.2.0.jar:na]
    at io.vlingo.actors.LocalMessage.deliver(LocalMessage.java:53) ~[vlingo-actors-1.2.0.jar:na]
    at io.vlingo.actors.plugin.mailbox.concurrentqueue.ConcurrentQueueMailbox.run(ConcurrentQueueMailbox.java:101) ~[vlingo-actors-1.2.0.jar:na]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[na:1.8.0_212]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[na:1.8.0_212]
    at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_212]
Caused by: java.lang.NoSuchMethodException: io.vlingo.schemata.codegen.TypeDefinitionCompilerActor.<init>()
    at java.lang.Class.getConstructor0(Class.java:3082) ~[na:1.8.0_212]
    at java.lang.Class.newInstance(Class.java:412) ~[na:1.8.0_212]
    ... 13 common frames omitted
java.lang.IllegalArgumentException: Actor instantiation failed because: io.vlingo.schemata.codegen.TypeDefinitionCompilerActor
    at io.vlingo.actors.Stage.createRawActor(Stage.java:670)
    at io.vlingo.actors.Stage.actorProtocolFor(Stage.java:451)
    at io.vlingo.actors.Stage.actorFor(Stage.java:112)
    at io.vlingo.lattice.grid.Grid.actorFor(Grid.java:106)
    at io.vlingo.actors.ActorProxyBase.thunk(ActorProxyBase.java:16)
    at io.vlingo.schemata.model.SchemaVersion__Proxy.lambda$diff$f4acaa83$1(SchemaVersion__Proxy.java:127)
    at io.vlingo.actors.LocalMessage.internalDeliver(LocalMessage.java:121)
    at io.vlingo.actors.LocalMessage.deliver(LocalMessage.java:53)
    at io.vlingo.actors.plugin.mailbox.concurrentqueue.ConcurrentQueueMailbox.run(ConcurrentQueueMailbox.java:101)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.InstantiationException: io.vlingo.schemata.codegen.TypeDefinitionCompilerActor
    at java.lang.Class.newInstance(Class.java:427)
    at io.vlingo.actors.ActorFactory.actorFor(ActorFactory.java:74)
    at io.vlingo.actors.Stage.createRawActor(Stage.java:667)
    ... 11 more
Caused by: java.lang.NoSuchMethodException: io.vlingo.schemata.codegen.TypeDefinitionCompilerActor.<init>()
    at java.lang.Class.getConstructor0(Class.java:3082)
    at java.lang.Class.newInstance(Class.java:412)
    ... 13 more
wwerner commented 4 years ago

I reactivated the travis build and see the same thing there: https://travis-ci.org/vlingo/vlingo-schemata/builds/650400216#L7382.

On CircleCI, the same schemata state built successfully 4d ago (https://app.circleci.com/github/vlingo/vlingo-schemata/pipelines/18533e9f-f705-4e03-baff-e74d0b6e6f2f/workflows/29a36593-bd09-485f-ba98-12c267759c95) and failed today with the same issue (https://app.circleci.com/jobs/github/vlingo/vlingo-schemata/497); the only change was an update to the travis config, so we can be sure it's an upstream issue.

For now, the test in question is @Ignored as we have found no ill effects on the application and the E2E tests are fine. Will revisit/refactor once the ongoing changes in actors (https://github.com/vlingo/vlingo-actors/pull/66) and lattice (https://github.com/buritos/vlingo-lattice/pull/1) are finished.

buritos commented 4 years ago

@wwerner is there a chance that this could be from keeping a reference to the proxy of a stopped actor?