[ https://issues.apache.org/jira/browse/CAMEL-22207?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17987896#comment-17987896 ]
Claus Ibsen commented on CAMEL-22207: ------------------------------------- Hmm that could also happen if a user runs mvn quarkus:dev, and then delete the folder - does it not? I wonder if Quarkus can see if they can handle this. > camel-jbang: camel run --runtime=quarkus does not shut down cleanly > ------------------------------------------------------------------- > > Key: CAMEL-22207 > URL: https://issues.apache.org/jira/browse/CAMEL-22207 > Project: Camel > Issue Type: Bug > Components: camel-jbang > Reporter: James Netherton > Priority: Minor > Fix For: 4.13.0 > > > With Camel JBang if you do: > {code} > camel run foo.java --runtime=quarkus > {code} > Then ctrl-c to stop the application, shutdown does not happen cleanly due to > an exception. On Linux / Mac you're forced to search for the pid and kill -9. > I think it's due to the shutdown hook removing the app directory before > Quarkus is fully stopped. > https://github.com/apache/camel/blob/608700b1aece227896a055efc022e839a9085445/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Run.java#L1012-L1019 > E.g there is logic in the HTTP server stop that potentially triggers loading > of files that no longer exist, so you get: > {code} > io.vertx.core.VertxException: Thread blocked > at java.base/jdk.internal.misc.Unsafe.park(Native Method) > at > java.base/java.util.concurrent.locks.LockSupport.park(LockSupport.java:221) > at > java.base/java.util.concurrent.CompletableFuture$Signaller.block(CompletableFuture.java:1864) > at > java.base/java.util.concurrent.ForkJoinPool.unmanagedBlock(ForkJoinPool.java:3780) > at > java.base/java.util.concurrent.ForkJoinPool.managedBlock(ForkJoinPool.java:3725) > at > java.base/java.util.concurrent.CompletableFuture.waitingGet(CompletableFuture.java:1898) > at > java.base/java.util.concurrent.CompletableFuture.join(CompletableFuture.java:2117) > at > io.quarkus.bootstrap.runner.JarFileReference.asyncLoadAcquiredJarFile(JarFileReference.java:213) > at > io.quarkus.bootstrap.runner.JarFileReference.withJarFile(JarFileReference.java:147) > at > io.quarkus.bootstrap.runner.JarResource.getResourceData(JarResource.java:56) > at > io.quarkus.bootstrap.runner.RunnerClassLoader.loadClass(RunnerClassLoader.java:106) > at > io.quarkus.bootstrap.runner.RunnerClassLoader.loadClass(RunnerClassLoader.java:72) > at io.vertx.core.impl.ContextImpl.close(ContextImpl.java:94) > at > io.vertx.core.impl.DeploymentManager$VerticleHolder.close(DeploymentManager.java:251) > at > io.vertx.core.impl.DeploymentManager$DeploymentImpl.lambda$null$5(DeploymentManager.java:352) > at io.vertx.core.impl.future.FutureImpl$4.onSuccess(FutureImpl.java:176) > at > io.vertx.core.impl.future.FutureBase.lambda$emitSuccess$0(FutureBase.java:60) > at io.vertx.core.impl.ContextImpl.execute(ContextImpl.java:312) > at io.vertx.core.impl.ContextImpl.execute(ContextImpl.java:302) > at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:57) > at io.vertx.core.impl.future.FutureImpl.tryComplete(FutureImpl.java:259) > at io.vertx.core.Promise.tryComplete(Promise.java:121) > at io.vertx.core.Promise.complete(Promise.java:77) > at > io.quarkus.vertx.http.runtime.VertxHttpRecorder$WebDeploymentVerticle.lambda$stop$1(VertxHttpRecorder.java:1468) > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)