Skip to content
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

ReadDir: input/output error, readAllEntries: fixConflictingNames: weird dirent type pair for name "<filename>": 8, 8 when reading and writing at the same time #2220

Closed
timeyr opened this issue Jul 25, 2024 · 6 comments
Labels
bug Error or flaw in the code with unintended result p2 P2

Comments

@timeyr
Copy link

timeyr commented Jul 25, 2024

When writing at least two files and reading the same directory "simultaneously", sometimes the following error occurs:

readAllEntries: fixConflictingNames: weird dirent type pair for name "<filename>": 8, 8

We are running gcsfuse version 2.0.1-gke.0 as a sidecar container in GKE.

To reproduce it, I have created a small Nodejs script running as a deployment in GKE, and it can reproduce the issue with about 10 % probability when writing 2 files and issuing 10 list directory requests at the same time.

Here is the debug log: debug-gcsfuse-logs.json

I can also share the code and configuration used to create the test environment I've used to reproduce this (requires a GCP account/project of course).

Deployment annotations:

gke-gcsfuse/cpu-limit: "0"
gke-gcsfuse/cpu-request: 100m
gke-gcsfuse/memory-limit: 512M
gke-gcsfuse/memory-request: 256M
gke-gcsfuse/volumes: "true"

Mount options (w/o debugging):

- uid=-1
- gid=-1
- dir-mode=777
- file-mode=666
@timeyr timeyr added p1 P1 question Customer Issue: question about how to use tool labels Jul 25, 2024
@Tulsishah
Copy link
Collaborator

Tulsishah commented Jul 26, 2024

Hi @timeyr ,

This is a known issue. We will let you know once it's fixed. In the meantime, the workaround is to pass create-empty-file as true. ref

@Tulsishah Tulsishah added bug Error or flaw in the code with unintended result and removed question Customer Issue: question about how to use tool labels Jul 26, 2024
@timeyr
Copy link
Author

timeyr commented Jul 26, 2024

Hi @Tulsishah !
This is great news! I will try out the workaround as soon as I have time. Cheers!

@koi8
Copy link

koi8 commented Jul 28, 2024

A bit struggling to apply workaround in GKE cluster:

  1. How to specify custom config file, if I don't know the content of current one? I want to change only one option and not accidentally break something else.
  2. How to mount the configmap, if sidecar container is created by annotations following this guide - https://cloud.google.com/kubernetes-engine/docs/how-to/persistent-volumes/cloud-storage-fuse-csi-driver .
    There is no mentioning of configmaps.

@raj-prince
Copy link
Collaborator

raj-prince commented Jul 29, 2024

@koi8 sorry for the inconvenience!

  1. You can try appending write:create-empty-file:true in the mountOptions. E.g. mountOptions: "uid=-1,gid=-1,dir-mode=777,file-mode=666,write:create-empty-file:true"
  2. Working with the GKE team to provide guide on how to pass gcsfuse-config flags as GKE annotations.

@raj-prince
Copy link
Collaborator

Changing the priority to p2 as fix has been merged and will be available in the next release (tentatively August end).

@kislaykishore
Copy link
Collaborator

The fix is now available in the latest GKE as well (v1.31.1-gke.1678000). Closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Error or flaw in the code with unintended result p2 P2
Projects
None yet
Development

No branches or pull requests

5 participants