-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Deadlock when using 'System.exit(1)' #28899
Comments
/cc @Sanne, @aloubyansky, @geoand, @gsmet, @radcortez, @stuartwdouglas |
This is expected as per the Javadoc you linked:
|
Which documentation do you mean here? I don't see |
Thats the problem, the Quarkus documentation does not mention this behaviour. |
The Javadoc does however. I am interested in hearing where you would expect to see this behavior mentioned. Asking because if we just add it to some random place, there is little chance people will actually see it. |
Actually, I have another idea... We can detect if this being called on the main thread and print an error |
👍 . This is way better than the documentation. |
Warn about usage of Quarkus#blockingExit on the main thread
Relates to: quarkusio#28899 (cherry picked from commit 04652b7)
Relates to: quarkusio#28899 (cherry picked from commit 04652b7)
Relates to: quarkusio#28899 (cherry picked from commit 04652b7)
Describe the bug
If
System.exit
is used on thequarkus-main-thread
the complete application deadlocks. If i executeSystem.exit
on a different thread then the application terminates as expected.Maybe this is an expected behaviour as stated in Quarkus#blockingExit but it feels odd.
The behavior should at least be explicitly described in the documentation. What do you think?
Expected behavior
No response
Actual behavior
No response
How to Reproduce?
./mvnw quarkus:dev
Output of
uname -a
orver
Linux
Output of
java -version
Java 17
GraalVM version (if different from Java)
No response
Quarkus version or git rev
Quarkus 2.13.3.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)Maven
Additional information
No response
The text was updated successfully, but these errors were encountered: