Open bishnu1184 opened 3 months ago
That sounds like a bug.
Do you have more details about the setup and how you are doing the writes so I can try to reproduce?
On Thu, 29 Aug 2024 at 15:26, bishnu1184 @.***> wrote:
Hi Ronnie,
We are using libnfs version 5.0.1.0. In one of our testing we observed an issue with nfs_pwrite() api. When we have insufficient disk space on NFS share we still attempt to write then mfs_pwrite() api get hang. Ex. Assume available space is only 2MB and we are uploading a file of size 7MB size, and we are doing write in 1MB chunk size, then after second write call third write call hangs and API doesn't return or throw any error.
Is it a known issue or is there anything we can do differently without getting hang ?
Thanks, Bishnu
— Reply to this email directly, view it on GitHub https://github.com/sahlberg/libnfs/issues/493, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADY3EFYA6Q4LMMBIXMV65TZT2WJ3AVCNFSM6AAAAABNJUDWJ2VHI2DSMVQWIX3LMV43ASLTON2WKOZSGQ4TGNBYGMYTKMY . You are receiving this because you are subscribed to this thread.Message ID: @.***>
I can certainly try to explain more details if that will help you in reproducing the issue.
So, in above case expectation was API should return failure as disk space is exhausted and should not get hang, but it is getting hang.
Please let me know if you need any other information.
Thanks, Bishnu
I can not reproduce on current master. If the write RPC call fails with -ENOSPC then this is correctly retruned to the application as an error to the nfs_pwrite() call.
I updated nfs-cp.c to print the RPC layer error as well when nfs_pwrite() fails :
$ rm -f /mnt2/fail;sudo ./utils/nfs-cp 10M nfs://127.0.0.1/mnt2/fail Failed to write to dest file pwrite call failed with "NFS: Write failed with NFS3ERR_NOSPC(-28)"
Please switch to current master, it contains zero-copy read support which will have a big impact on read-intensive applications. There is an API change in current master compared to earlier versions but this is documented in README.
can be used to check for whether the new API is available or if it is the old api.
Hi Ronnie,
We are using libnfs version 5.0.1.0. In one of our testing we observed an issue with nfs_pwrite() api. When we have insufficient disk space on NFS share we still attempt to write then mfs_pwrite() api get hang. Ex. Assume available space is only 2MB and we are uploading a file of size 7MB size, and we are doing write in 1MB chunk size, then after second write call third write call hangs and API doesn't return or throw any error.
Is it a known issue or is there anything we can do differently without getting hang ?
Thanks, Bishnu