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

Live Reload is Failing #24088

Closed
johnnorton opened this issue Mar 4, 2022 · 3 comments · Fixed by #24141
Closed

Live Reload is Failing #24088

johnnorton opened this issue Mar 4, 2022 · 3 comments · Fixed by #24141
Labels
area/amazon-lambda kind/bug Something isn't working
Milestone

Comments

@johnnorton
Copy link

johnnorton commented Mar 4, 2022

Describe the bug

While running the application (quarkus dev) and I make a change to the application, life reload kicks off but fails with the following exception. The HTTP request just hangs.

2022-03-03 21:14:09,407 INFO  [io.qua.dep.dev.RuntimeUpdatesProcessor] (Lambda Thread (DEVELOPMENT)) Restarting quarkus due to changes in RouteFilters.class.
2022-03-03 21:14:09,431 INFO  [io.quarkus] (Quarkus Main Thread) terraform-state-lambda stopped in 0.022s
__  ____  __  _____   ___  __ ____  ______
 --/ __ \/ / / / _ | / _ \/ //_/ / / / __/
 -/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \
--\___\_\____/_/ |_/_/|_/_/|_|\____/___/
2022-03-03 21:14:09,796 INFO  [io.qua.ama.lam.run.AbstractLambdaPollLoop] (Lambda Thread (DEVELOPMENT)) Listening on: http://localhost:8080/_lambda_/2018-06-01/runtime/invocation/next

2022-03-03 21:14:09,807 WARN  [io.qua.ama.lam.run.AbstractLambdaPollLoop] (Lambda Thread (DEVELOPMENT)) Aborting lambda poll loop: ending dev/test mode
2022-03-03 21:14:09,807 INFO  [io.qua.ama.lam.run.AbstractLambdaPollLoop] (Lambda Thread (DEVELOPMENT)) Lambda polling thread complete (DEVELOPMENT)
2022-03-03 21:14:09,816 ERROR [io.qua.run.Application] (Quarkus Main Thread) Failed to start application (with profile dev): io.netty.channel.ChannelException: address already in use by: [id: 0x3815400b, L:local:netty-virtual-http]
	at io.quarkus.netty.runtime.virtual.VirtualChannelRegistry.register(VirtualChannelRegistry.java:46)
	at io.quarkus.netty.runtime.virtual.VirtualServerChannel.doBind(VirtualServerChannel.java:101)
	at io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:562)
	at io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChannelPipeline.java:1334)
	at io.netty.channel.AbstractChannelHandlerContext.invokeBind(AbstractChannelHandlerContext.java:506)
	at io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHandlerContext.java:491)
	at io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.java:973)
	at io.netty.channel.AbstractChannel.bind(AbstractChannel.java:260)
	at io.netty.bootstrap.AbstractBootstrap$2.run(AbstractBootstrap.java:356)
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164)
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:469)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:503)
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Thread.java:829)


2022-03-03 21:14:09,817 ERROR [io.qua.dep.dev.IsolatedDevModeMain] (Lambda Thread (DEVELOPMENT)) Failed to start quarkus: java.lang.RuntimeException: java.lang.RuntimeException: Failed to start quarkus
	at io.quarkus.dev.appstate.ApplicationStateNotification.waitForApplicationStart(ApplicationStateNotification.java:51)
	at io.quarkus.runner.bootstrap.StartupActionImpl.runMainClass(StartupActionImpl.java:122)
	at io.quarkus.deployment.dev.IsolatedDevModeMain.restartApp(IsolatedDevModeMain.java:232)
	at io.quarkus.deployment.dev.IsolatedDevModeMain.restartCallback(IsolatedDevModeMain.java:213)
	at io.quarkus.deployment.dev.RuntimeUpdatesProcessor.doScan(RuntimeUpdatesProcessor.java:535)
	at io.quarkus.deployment.dev.RuntimeUpdatesProcessor.doScan(RuntimeUpdatesProcessor.java:436)
	at io.quarkus.amazon.lambda.runtime.LambdaHotReplacementRecorder.checkHotReplacement(LambdaHotReplacementRecorder.java:36)
	at io.quarkus.amazon.lambda.runtime.AbstractLambdaPollLoop$1.run(AbstractLambdaPollLoop.java:93)
	at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.RuntimeException: Failed to start quarkus
	at io.quarkus.runner.ApplicationImpl.doStart(Unknown Source)
	at io.quarkus.runtime.Application.start(Application.java:101)
	at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:103)
	at io.quarkus.runtime.Quarkus.run(Quarkus.java:67)
	at io.quarkus.runtime.Quarkus.run(Quarkus.java:41)
	at io.quarkus.runtime.Quarkus.run(Quarkus.java:120)
	at io.quarkus.runner.GeneratedMain.main(Unknown Source)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at io.quarkus.runner.bootstrap.StartupActionImpl$1.run(StartupActionImpl.java:103)
	... 1 more
Caused by: io.netty.channel.ChannelException: address already in use by: [id: 0x3815400b, L:local:netty-virtual-http]
	at io.quarkus.netty.runtime.virtual.VirtualChannelRegistry.register(VirtualChannelRegistry.java:46)
	at io.quarkus.netty.runtime.virtual.VirtualServerChannel.doBind(VirtualServerChannel.java:101)
	at io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:562)
	at io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChannelPipeline.java:1334)
	at io.netty.channel.AbstractChannelHandlerContext.invokeBind(AbstractChannelHandlerContext.java:506)
	at io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHandlerContext.java:491)
	at io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.java:973)
	at io.netty.channel.AbstractChannel.bind(AbstractChannel.java:260)
	at io.netty.bootstrap.AbstractBootstrap$2.run(AbstractBootstrap.java:356)
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164)
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:469)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:503)
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	... 1 more


2022-03-03 21:14:09,830 INFO  [io.qua.dep.dev.RuntimeUpdatesProcessor] (Lambda Thread (DEVELOPMENT)) Live reload total time: 1.416s
2022-03-03 21:14:09,834 INFO  [io.qua.ama.lam.run.AbstractLambdaPollLoop] (Lambda Thread (DEVELOPMENT)) Lambda polling thread complete (DEVELOPMENT)

Expected behavior

Reload the application and handle the request

Actual behavior

The application hangs. The HTTP request that started the reload just hangs.

How to Reproduce?

Here is a video showing what is happening:

https://www.loom.com/share/18a85ce9d732428f9cde69391544038f

Output of uname -a or ver

Darwin LSLCmacK1NMJGH8 21.3.0 Darwin Kernel Version 21.3.0: Wed Jan 5 21:37:58 PST 2022; root:xnu-8019.80.24~20/RELEASE_X86_64 x86_64

Output of java -version

openjdk version "11.0.12" 2021-07-20 LTS OpenJDK Runtime Environment Corretto-11.0.12.7.2 (build 11.0.12+7-LTS) OpenJDK 64-Bit Server VM Corretto-11.0.12.7.2 (build 11.0.12+7-LTS, mixed mode)

GraalVM version (if different from Java)

No response

Quarkus version or git rev

2.7.4

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

Maven home: /Users/jnorton9/.m2/wrapper/dists/apache-maven-3.8.1-bin/2l5mhf2pq2clrde7f7qp1rdt5m/apache-maven-3.8.1

Additional information

No response

@johnnorton johnnorton added the kind/bug Something isn't working label Mar 4, 2022
@geoand
Copy link
Contributor

geoand commented Mar 4, 2022

Can you please share a sample application where the live reload does not work?

Thanks

@geoand geoand added triage/needs-reproducer We are waiting for a reproducer. area/amazon-lambda and removed triage/needs-triage labels Mar 4, 2022
@johnnorton
Copy link
Author

Steps to Reproduce:

  1. Start Application quarkus dev
  2. Make http request http://localhost:8080/hello
  3. Change Code
  4. Make another request to http://localhost:8080/hello to trigger Restart. You will see the exception. HTTP Request hangs.

reactive-error.zip

@geoand geoand removed the triage/needs-reproducer We are waiting for a reproducer. label Mar 4, 2022
geoand added a commit to geoand/quarkus that referenced this issue Mar 7, 2022
@geoand
Copy link
Contributor

geoand commented Mar 7, 2022

Thanks for the reproducer.

#24141 fixes the issue

@quarkus-bot quarkus-bot bot added this to the 2.8 - main milestone Mar 7, 2022
patriot1burke added a commit that referenced this issue Mar 7, 2022
Close VirtualBootstrap channel on dev-mode restart
@gsmet gsmet modified the milestones: 2.8 - main, 2.7.4.Final Mar 8, 2022
gsmet pushed a commit to gsmet/quarkus that referenced this issue Mar 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/amazon-lambda kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants