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

RuntimeException is thown when I try to re-start an updated app from Quarkus client #21070

Closed
pjgg opened this issue Oct 28, 2021 · 8 comments
Closed
Labels
kind/bug Something isn't working

Comments

@pjgg
Copy link
Contributor

pjgg commented Oct 28, 2021

Describe the bug

Quarkus Core Upstream (999-SNAPSHOT).
Quarkus Client Upstream (999-SNAPSHOT)

We have a reproducer where we are checking the Quarkus client behavior. Basically, we are creating an app from scratch and then adding quarkus-smallrye-openapi, then start the app check that everything is fine, stop the app, remove quarkus-smallrye-openapi extension and start the app again, and here in the last step we are getting the following exception:

14:24:51,411 INFO  [app] 2021-10-28 14:24:49,810 ERROR [io.qua.dep.dev.IsolatedDevModeMain] (main) Failed to start quarkus: java.lang.RuntimeException: java.lang.RuntimeException: Failed to load steps from class io.quarkus.deployment.dev.io.NioThreadPoolDevModeProcessor
14:24:51,411 INFO  [app]        at io.quarkus.runner.bootstrap.AugmentActionImpl.runAugment(AugmentActionImpl.java:418)
14:24:51,412 INFO  [app]        at io.quarkus.runner.bootstrap.AugmentActionImpl.createInitialRuntimeApplication(AugmentActionImpl.java:276)
14:24:51,412 INFO  [app]        at io.quarkus.runner.bootstrap.AugmentActionImpl.createInitialRuntimeApplication(AugmentActionImpl.java:67)
14:24:51,412 INFO  [app]        at io.quarkus.deployment.dev.IsolatedDevModeMain.firstStart(IsolatedDevModeMain.java:92)
14:24:51,412 INFO  [app]        at io.quarkus.deployment.dev.IsolatedDevModeMain.accept(IsolatedDevModeMain.java:441)
14:24:51,413 INFO  [app]        at io.quarkus.deployment.dev.IsolatedDevModeMain.accept(IsolatedDevModeMain.java:65)
14:24:51,413 INFO  [app]        at io.quarkus.bootstrap.app.CuratedApplication.runInCl(CuratedApplication.java:149)
14:24:51,413 INFO  [app]        at io.quarkus.bootstrap.app.CuratedApplication.runInAugmentClassLoader(CuratedApplication.java:105)
14:24:51,413 INFO  [app]        at io.quarkus.deployment.dev.DevModeMain.start(DevModeMain.java:145)
14:24:51,413 INFO  [app]        at io.quarkus.deployment.dev.DevModeMain.main(DevModeMain.java:63)
14:24:51,414 INFO  [app] Caused by: java.lang.RuntimeException: Failed to load steps from class io.quarkus.deployment.dev.io.NioThreadPoolDevModeProcessor
14:24:51,414 INFO  [app]        at io.quarkus.deployment.ExtensionLoader.loadStepsFrom(ExtensionLoader.java:196)
14:24:51,414 INFO  [app]        at io.quarkus.deployment.QuarkusAugmentor.run(QuarkusAugmentor.java:108)
14:24:51,414 INFO  [app]        at io.quarkus.runner.bootstrap.AugmentActionImpl.runAugment(AugmentActionImpl.java:416)
14:24:51,414 INFO  [app]        ... 9 more
14:24:51,415 INFO  [app] Caused by: java.lang.RuntimeException: void io.quarkus.deployment.dev.io.NioThreadPoolDevModeProcessor.setupTCCL(io.quarkus.runtime.dev.io.NioThreadPoolRecorder,io.quarkus.deployment.builditem.ShutdownContextBuildItem) is marked @Record but does not inject an @Recorder object

Note that used to work as expected indeed is working fine with Quarkus 2.3.0.Final, or is working fine if you use Quarkus upstream but Quarkus Client 2.3.0.Final

I think that is something related to this commit: https://github.com/quarkusio/quarkus/pull/20998/files#diff-b4cbc080dba18bd5f82d2ece4ad078b684bfe808602e4a38e16d7de137d065dcR37 and also looks that there is a race condition in somewhere because from now we have fixed the scenario by adding a sleep.

To me that is important is to be sure that there is no a run condition on this method: https://github.com/quarkusio/quarkus/pull/20998/files#diff-b4cbc080dba18bd5f82d2ece4ad078b684bfe808602e4a38e16d7de137d065dcR37

Expected behavior

Be able to add and remove an extension by Quarkus client (even if is executed by a script) and the app should start without any exception.

Actual behavior

Currently, you could have a look at our GitHub actions: https://github.com/quarkus-qe/quarkus-test-framework/runs/4032194711?check_suite_focus=true

How to Reproduce?

quarkus-qe/quarkus-test-suite#361

cmd: mvn clean verify -Dall-modules -Dinclude.quarkus-cli-tests -Dts.quarkus.cli.cmd=/tmp/quarkus-dev-cli -pl quarkus-cli
Where ts.quarkus.cli.cmd is pointing to this script:

 #!/bin/bash
          java -jar //home/pablojosegonzalezgranados/Documents/workspace/quarkus/devtools/cli/target/quarkus-cli-999-SNAPSHOT
-runner.jar "$@"

Basically, I have compiled Quarkus-cli Upstream and used it in my test by this way.

Output of uname -a or ver

No response

Output of java -version

No response

GraalVM version (if different from Java)

No response

Quarkus version or git rev

No response

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

@geoand
Copy link
Contributor

geoand commented Oct 29, 2021

I am unclear from the description about which version is affected by this problem. Can you please clarify?

@pjgg
Copy link
Contributor Author

pjgg commented Oct 29, 2021

I am unclear from the description about which version is affected by this problem. Can you please clarify?

999-SNAPSHOT

@geoand
Copy link
Contributor

geoand commented Oct 29, 2021

I was not able to reproduce this on an example application.

What are the exact steps one needs to follow to reproduce this based on your testsuite?

@pjgg
Copy link
Contributor Author

pjgg commented Oct 29, 2021

  1. Clone this repo: https://github.com/pjgg/quarkus-test-suite/tree/feat/add_quarkus_restart_scenario and move to branch feat/add_quarkus_restart_scenario
  2. remove this disable tag
  3. executed this cmd: mvn clean verify -Dall-modules -Dinclude.quarkus-cli-tests -Dts.quarkus.cli.cmd=/tmp/quarkus-dev-cli -pl quarkus-cli

Remember that ts.quarkus.cli.cmd is pointing to this script:

#!/bin/bash
          java -jar //home/pablojosegonzalezgranados/Documents/workspace/quarkus/devtools/cli/target/quarkus-cli-999-SNAPSHOT
-runner.jar "$@"

You should change it in order to point to your latest quarkus-cli-999-SNAPSHOT

@geoand
Copy link
Contributor

geoand commented Nov 1, 2021

Surely running the entire testsuite just to see this one failure is not necessary :)

@geoand
Copy link
Contributor

geoand commented Nov 1, 2021

In case, I could not reproduce the problem.
I ran mvn verify -f quarkus-cli/ -Dit.test=QuarkusCliCreateJvmApplicationIT#shouldReStartAppAfterRemoveExtension a few times and it always worked

@pjgg
Copy link
Contributor Author

pjgg commented Nov 12, 2021

We could not reproduce the issue anymore on upstream so let's close it from now!.
Thank you anyway @geoand

@geoand
Copy link
Contributor

geoand commented Nov 12, 2021

Thanks for the info

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants