mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2026-04-25 05:16:00 +03:00
[GH-ISSUE #2354] Readdir fails for SSE-C and prefix mount #1159
Labels
No labels
bug
bug
dataloss
duplicate
enhancement
feature request
help wanted
invalid
need info
performance
pull-request
question
question
testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/s3fs-fuse#1159
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jstastny on GitHub (Oct 18, 2023).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/2354
When using SSE-C with prefix mount on the latest
master(commit2871975), the readdir is not listing items I create inside of the mounted directory.Repro steps:
AWSSSECKEYS=vgXEublG7JJkhfRSZT1Ze3lefY2d7j3i s3fs -f -d -o bucket=my-bucket:/honza-testing-sse,complement_stat,allow_other,uid=0,gid=100,use_cache=/tmp/s3fs-cache,del_cache,ensure_diskfree=10000,curldbg,use_sse=custom /mnt/s3touch /mnt/s3/aaa(the object correctly gets created in S3, including SSE-C)ls /mnt/s3I investigated the HTTP calls and think this is caused by the incorrect path in the retry of the HEAD request (my understanding is that the retry is intentional, because the first request happens without SSE-C headers and the retry callback contains the SSE-C headers, based on this comment).
The problem is that the path gets broken in the second attempt and the prefix (
/honza-testing-ssein my case) is repeated twice there. Here are the snippets from the logs (I've changed the bucket name and removed the boring parts like SSL bundle resolution):First
HEADrequest -- correct path, but missing SSE-C headersSecond
HEADrequest -- incorrect path (see the/honza-testing-sse/honza-testing-sse/), but SSE-C is presentI tested the same workflow without using the mount prefix and everything worked just fine.
Additional Information
Version of s3fs being used (
s3fs --version)V1.93
2871975Version of fuse being used (
pkg-config --modversion fuse,rpm -qi fuseordpkg -s fuse)6.9.9-5ubuntu3
Kernel information (
uname -r)7.15.0-1037-aws (running in Docker container in Ubuntu image)
GNU/Linux Distribution, if applicable (
cat /etc/os-release)How to run s3fs, if applicable
[x] command line
[] /etc/fstab
@jstastny commented on GitHub (Oct 18, 2023):
I have prepared an extremely naive fix (which likely breaks many other things).
Having debugged this for some time, I believe that the problem is that that retry instance of
S3fsCurltakes thes3fscurl->GetPath()from the previous instance, but thepathin the previous instance already has themount_prefixprepended byget_realpath().@ggtakec commented on GitHub (Feb 5, 2024):
@jstastny
I looked into this bug you detected.
Your fix was mostly correct, but it was needed a little more modification.
So, I created a PR as #2406 to fix this.
I have manually checked the HEAD request retries and confirmed that it works, but I would appreciate it if you could confirm this if possible.
@jstastny commented on GitHub (Feb 5, 2024):
@ggtakec -- thanks a lot for looking into this.
@chudyandrej -- could you test #2406 in Deepnote?