-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Resteasy Reactive AsyncFile is never closed #41811
Comments
/cc @FroMage (resteasy-reactive), @geoand (resteasy-reactive), @stuartwdouglas (resteasy-reactive) |
Can you please attach a sample project that shows the problem in action? |
@geoand Sure, I will need dome time to prepare it. |
Thanks! |
@Mulgish Does this also happen when you return |
Yes |
@geoand I have created a reproducer at https://github.com/Mulgish/issue-41811-reproducer. |
Thanks a lot! #41824 fixes the issue |
Properly close AsyncFile in Quarkus REST
Fixes: quarkusio#41811 (cherry picked from commit a010cbd)
Fixes: quarkusio#41811 (cherry picked from commit a010cbd)
Describe the bug
AsyncFile is never closed in Resteasy Reactive HTTP server
Expected behavior
AsyncFile should be closed
Actual behavior
AsyncFile is not closed:
How to Reproduce?
AsyncFile
in Resteasy Reactive routeAsyncFIle#close
AsyncFIle#close
has not been called.nfsxxxxxxx
file being created due to open file handle..nfsxxxxxxx
fileReproducer repository
https://github.com/Mulgish/quarkus-issue-41811-reproducer
See README for steps.
Example code
Output of
uname -a
orver
Linux 5.15.146.1-microsoft-standard-WSL2 #1 SMP Thu Jan 11 04:09:03 UTC 2024 x86_64 GNU/Linux
Output of
java -version
openjdk version "21.0.3" 2024-04-16 OpenJDK Runtime Environment (Red_Hat-21.0.3.0.9-1) (build 21.0.3+9) OpenJDK 64-Bit Server VM (Red_Hat-21.0.3.0.9-1) (build 21.0.3+9, mixed mode, sharing)
Quarkus version or git rev
3.12.0
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.9.6 (Red Hat 3.9.6-6) Maven home: /usr/share/maven Java version: 21.0.3, vendor: Red Hat, Inc., runtime: /usr/lib/jvm/java-21-openjdk-21.0.3.0.9-1.fc40.x86_64 Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "5.15.146.1-microsoft-standard-wsl2", arch: "amd64", family: "unix"
Additional information
I have noticed this issue because I was getting .nfsxxxxx files created on an NFS share everytime I would delete a file after streaming it with FIlesystem.open call.
Switching to Filesystem.readFIle has fixed the issue but it is not ideal as I can not stream large files to a client.
The text was updated successfully, but these errors were encountered: