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

Panic: inode 1 is *inode.dirInode, wanted *inode.FileInode" #2753

Open
mihaiav opened this issue Dec 8, 2024 · 4 comments
Open

Panic: inode 1 is *inode.dirInode, wanted *inode.FileInode" #2753

mihaiav opened this issue Dec 8, 2024 · 4 comments

Comments

@mihaiav
Copy link

mihaiav commented Dec 8, 2024

Describe the issue
Please provide a clear description of what you were trying to achieve along with the details of the flags that you passed.

I'm trying to mount a gcs bucket on Google Cloud Run. Sometimes it works but sometimes panics as below:

2024-12-08 23:36:30.489
File system has been successfully mounted.
2024-12-08 23:37:13.447
{"seconds":1733693833,"nanos":448039747},"severity":"ERROR","message":"Panic: inode 1 is *inode.dirInode, wanted *inode.FileInode"} 
2024-12-08 23:37:13.448
{"seconds":1733693833,"nanos":448505546},"severity":"ERROR","message":"goroutine 13071 [running]:\nruntime/debug.Stack()\n\t/usr/local/go/src/runtime/debug/stack.go:26 +0x5e\ngithub.com/googlecloudplatform/gcsfuse/v2/internal/logger.Fatal({0x17a06f1?, 0xc0002981c0?}, {0xc0006fbb78?, 0xc0006fbb4f?, 0xc0006fbba0?})\n\t/go/gcsfuse/internal/logger/logger.go:162 +0x25\ngithub.com/googlecloudplatform/gcsfuse/v2/internal/fs/wrappers.(*errorMapping).handlePanic(0x0?)\n\t/go/gcsfuse/internal/fs/wrappers/error_mapping.go:111 +0x45\npanic({0x1419fe0?, 0xc0009d66d0?})\n\t/usr/local/go/src/runtime/panic.go:785 +0x132\ngithub.com/googlecloudplatform/gcsfuse/v2/internal/fs.(*fileSystem).fileInodeOrDie(0x1aa8570?, 0x1)\n\t/go/gcsfuse/internal/fs/fs.go:1293 +0xcb\ngithub.com/googlecloudplatform/gcsfuse/v2/internal/fs.(*fileSystem).FlushFile(0xc0003fa2d0, {0x1aa8570?, 0xc00081c060?}, 0xc0008861e0)\n\t/go/gcsfuse/internal/fs/fs.go:2502 +0xb6\ngithub.com/googlecloudplatform/gcsfuse/v2/internal/fs/wrappers.(*errorMapping).FlushFile(0xc000a1a7b0, {0x1aa8570?, 0xc00081c060?}, 0x4e856f?)\n\t/go/gcsfuse/internal/fs/wrappers/error_mapping.go:323 +0x63\ngithub.com/googlecloudplatform/gcsfuse/v2/internal/fs/wrappers.(*monitoring).FlushFile.func1({0x1aa8570?, 0xc00081c060?})\n\t/go/gcsfuse/internal/fs/wrappers/monitoring.go:437 +0x36\ngithub.com/googlecloudplatform/gcsfuse/v2/internal/fs/wrappers.(*monitoring).invokeWrapped(0xc0005406e0, {0x1aa8570, 0xc0007f6d20}, {0x17a0fb2, 0x9}, 0xc00007bef0)\n\t/go/gcsfuse/internal/fs/wrappers/monitoring.go:341 +0x18a\ngithub.com/googlecloudplatform/gcsfuse/v2/internal/fs/wrappers.(*monitoring).FlushFile(0xc00070d090?, {0x1aa8570?, 0xc0007f6d20?}, 0xc0008643c0?)\n\t/go/gcsfuse/internal/fs/wrappers/monitoring.go:437 +0x45\ngithub.com/jacobsa/fuse/fuseutil.(*fileSystemServer).handleOp(0xc000540700, 0xc000740820, {0x1aa8570, 0xc0007f6d20}, {0x13e0ae0?, 0xc0008861e0})\n\t/tmp/build_gcsfuse_gopath1880646383/pkg/mod/github.com/jacobsa/[email protected]/fuseutil/file_system.go:217 +0x36e\ncreated by github.com/jacobsa/fuse/fuseutil.(*fileSystemServer).ServeOps in goroutine 75\n\t/tmp/build_gcsfuse_gopath1880646383/pkg/mod/github.com/jacobsa/[email protected]/fuseutil/file_system.go:123 +0x1be\n"}

Additional context
Add any other context about the problem here.

SLO:
We strive to respond to all bug reports within 24 business hours provided the information mentioned above is included.

@mihaiav mihaiav added p2 P2 question Customer Issue: question about how to use tool labels Dec 8, 2024
@ashmeenkaur
Copy link
Collaborator

ashmeenkaur commented Dec 9, 2024

Hello, thanks for reaching out. Could you please share GCSFuse version, OS type and version, and if your bucket is hierarchical namespace enabled?
It will be great if you could also share some concrete steps to reproduce the issue.

@ashmeenkaur ashmeenkaur added pending customer action and removed question Customer Issue: question about how to use tool labels Dec 9, 2024
@mihaiav
Copy link
Author

mihaiav commented Dec 9, 2024

I'm trying to deploy and a wordpress docker installation with the wp-content directory sync/mounted on gcs.
I seem to get this error all the time when wordpress is perhaps trying to read files. At this point I can say it never works(i.e. wordpress hangs as it can't read/write files) so I gave up of using GCSFuse as a solution.
Below is the command I use to mount the directory. I also attached the Dockerfile and docker-entrypoint.sh

gcsfuse --dir-mode 777 --file-mode 777 -o allow_other --key-file /usr/auth.json $my-bucket /var/www/html/wp-content

Dockerfile.txt
docker-entrypoint.sh.txt

@ashmeenkaur ashmeenkaur added p1 P1 and removed p2 P2 labels Dec 9, 2024
@ashmeenkaur
Copy link
Collaborator

I am not able to repro the issue but I am suspecting that the issue is related to unsupported empty object in your bucket. Could you please check if there are any directories with empty names?
Ref: https://github.com/GoogleCloudPlatform/gcsfuse/blob/master/docs/semantics.md#unsupported-object-names

This gcloud command should print any such objects:

gcloud storage ls -r gs://<your bucket name> | grep 'gs:\/\/.*\/\/'

@ankitaluthra1
Copy link
Collaborator

@mihaiav As suggested in last comment, GCSFuse does not support directories with empty names, can you please check if your bucket contains any such directory. In case there are no such directories, Could you please try one run using debug logs ON, this would help us understand the sequence of calls coming to GCSFuse. To turn On debug logs please use --log-severity trace command line parameter while running GCSFuse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants