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

ExtendedResourceTest#testSchemaVersionSelection hangs #130

Open
wwerner opened this issue Feb 14, 2020 · 2 comments
Open

ExtendedResourceTest#testSchemaVersionSelection hangs #130

wwerner opened this issue Feb 14, 2020 · 2 comments

Comments

@wwerner
Copy link
Contributor

wwerner commented Feb 14, 2020

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 vlingo/xoom-actors@4719dc9 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:

  • Create a remote debug connection at port 5005
    image
  • run the build from the shell enabling test debugging: mvn -Dmaven.surefire.debug test
  • add a breakpoint in io/vlingo/actors/Stage.java:670; it will get hit in the error case
  • Start the remote debug connection

In the debugger I see

  • that the proxied diff method has the correct arguments
  • in TypeDefinitionMiddleware, the compiler actor is found: src/main/java/io/vlingo/schemata/codegen/TypeDefinitionMiddleware.java:14
  • in io.vlingo.actors.ActorProxyBase#thunk, when trying to retrieve the actor for arg (which contains the TypeDefinitionMiddleware used to retrieve the TypeDefinitionCompilerActor) from the grid, it receives null
  • When trying to create a new actor, the parameters needed for its creation are missing.

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
Copy link
Contributor Author

wwerner commented Feb 14, 2020

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 (vlingo/xoom-actors#66) and lattice (https://github.com/buritos/vlingo-lattice/pull/1) are finished.

@buritos
Copy link

buritos commented Feb 17, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants