quarkusio/quarkus · error · RuntimeException
java.lang.RuntimeException wrapping the underlying Interrupt
Error message
java.lang.RuntimeException wrapping the underlying InterruptedException/ExecutionException (no own message)
What it means
MockEventServer.close() blocks on the Vert.x HTTP server close future via get(). If closing the server is interrupted or fails, the InterruptedException/ExecutionException is wrapped in a RuntimeException with no message of its own. This is cleanup-shutdown failure from the mock Lambda event server.
Source
Thrown at extensions/amazon-lambda/event-server/src/main/java/io/quarkus/amazon/lambda/runtime/MockEventServer.java:313
}
}
@Override
public void close() throws IOException {
if (!closed.compareAndSet(false, true)) {
return;
}
log.info("Stopping Mock Lambda Event Server");
for (var i : responsePending.entrySet()) {
i.getValue().response().setStatusCode(503).end();
}
for (var i : queue) {
i.response().setStatusCode(503).end();
}
try {
httpServer.close().toCompletionStage().toCompletableFuture().get();
} catch (InterruptedException | ExecutionException e) {
throw new RuntimeException(e);
} finally {
try {
vertx.close().toCompletionStage().toCompletableFuture().get();
} catch (InterruptedException | ExecutionException e) {
throw new RuntimeException(e);
} finally {
blockingPool.shutdown();
}
}
}
}
View on GitHub (pinned to e1c734241f)
Solutions
- Ensure all in-flight requests complete before calling close()
- Only call close() once; repeated shutdowns can fail
- Check the wrapped cause via getCause() for the real server error
- If interrupted, restore the interrupt flag instead of swallowing it
Example fix
// before
mockEventServer.close();
// after
try {
mockEventServer.close();
} catch (RuntimeException e) {
LOGGER.warn("mock server close failed", e.getCause());
} Defensive patterns
Strategy: try-catch
Validate before calling
if (!server.isStarted()) return; // don't close what isn't running
Try / catch
try { server.close(); } catch (RuntimeException e) { LOGGER.warn("close failed", e.getCause()); } Prevention
- Drain in-flight requests before close
- Close exactly once in teardown
- Log e.getCause() to surface the real failure
When it happens
Trigger: Calling mockEventServer.close() (or JVM shutdown hook invoking it) while the underlying Vert.x httpServer.close() future fails or the thread is interrupted.
Common situations: Test teardown races where requests are still in flight; the server was already stopped; port shutdown hanging in CI; interrupting the test thread during close.
Related errors
- Not Allowed
- java.lang.InterruptedException (wrapped)
- The application is stopping
- The application has not been started
- Extension passed an invalid shutdown handler
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/b26d085c508fbc9d.
Report an issue: GitHub.