-
Notifications
You must be signed in to change notification settings - Fork 997
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
bad file descriptor
when rapidly appending and writeback_cache
is enabled
#5315
Comments
Hi @aeblyve, for your use case, we recommend using only writeback. The simplified data flow is: userspace -> kernel -> FUSE (default: write-through) -> JuiceFS -> object storage. If you change the FUSE IO mode to writeback_cache, the kernel will first cache the requests in the page cache and then flush pages to the underlying layer at unpredictable intervals. The IO requests received by JuiceFS might become random writes, which is why this mode is not recommended. Additionally, we will look into your issue to see if it can be reproduced and investigate the specific problem. |
@jiefenghuang
|
hi @frostwind, we fixed this issue in the main branch, but it wasn’t merged into the release branch earlier. It has been resolved in #5369. |
@jiefenghuang To confirm, it is now possible to use I understand you don't recommend it either way for this use case, but we have other use cases that could benefit from this option. |
v1.2.0-1.2.2 cannot use |
What happened:
I ran R code which rapidly appended data to a .csv file, but I got errors about a bad file descriptor when I call for
warnings
:The file is not correctly written, it is missing substantial pieces that should be there. It seems random, like a race condition, how many pieces are missing.
What you expected to happen:
The data should be appended (even if it takes some time).
How to reproduce it (as minimally and precisely as possible):
This bash simulation worked to get the same (or very similar) behavior on our mount:
Anything else we need to know?
The issue consistently disappeared when we removed
writeback_cache
from the mount options.writeback
still works.Here is a sample
.accesslog
from when the bug with the R code was happening. Notice thebad file descriptor
onread
.Environment:
juicefs --version
) or Hadoop Java SDK version:juicefs version 1.2.1+2024-08-30.cd871d1
AWS EC2 instance.
cat /etc/os-release
):uname -a
):Amazon S3.
Redis on Amazon EC2, self maintained. Version 6.2.7
Amazon EC2 IP networking, and networking to Amazon S3.
Systemd mount options at the time of failure looked like this:
The text was updated successfully, but these errors were encountered: