Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Unknown FUSE opcode (39) #142

Open
vi opened this issue Dec 3, 2019 · 8 comments
Open

Unknown FUSE opcode (39) #142

vi opened this issue Dec 3, 2019 · 8 comments

Comments

@vi
Copy link

vi commented Dec 3, 2019

ioctl(TCGETS) on a file opened from a filesystem implemented with fuse-rc causes filesystem to be unmounted:

[2019-12-03T13:26:05Z ERROR fuse::request] Unknown FUSE opcode (39)
[2019-12-03T13:26:05Z INFO  fuse::session] Unmounted /tmp/m

Such ioctl is issued e.g. by git gui on file .git/HEAD for some reason.

Using Linux kernel version 4.19.85.

@mbilker
Copy link

mbilker commented Dec 10, 2019

I also got this error when doing dd if=<file_in_fuse_mount> skip=<some_offset> of=/dev/null.

@mbilker
Copy link

mbilker commented Dec 10, 2019

After checking the source code, that opcode is behind a feature flag:

fuse-rs/fuse-abi/src/lib.rs

Lines 275 to 276 in 42e29d9

#[cfg(feature = "abi-7-11")]
FUSE_IOCTL = 39,

@zargony
Copy link
Owner

zargony commented Dec 11, 2019

Interesting. The kernel driver shouldn't send requests with this opcode at all since we're requesting ABI 7.8 in the FUSE_INIT reply.

@mbilker
Copy link

mbilker commented Dec 11, 2019

I am running Fedora 31 with Linux 5.3.12-300.fc31.x86_64 on the computer with my FUSE server program. According to the upstream Linux kernel source, there is no check against the server's ABI version when sending the IOCTL request [0].

[0] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/fs/fuse/file.c?h=v5.3.12#n2665

@vi
Copy link
Author

vi commented Dec 11, 2019

Can it just safely ignore (ENOSYS) all unknown opcodes with only a warning instead of error?

@ashkitten
Copy link

i'm also seeing this issue trying to open files with audacity. it's particularly frustrating that the filesystem immediately unmounts and i can't do anything about it, fuse-rs should handle this more gracefully.

@mbilker
Copy link

mbilker commented Feb 14, 2020

This looks like it might be easier to implement on the modernize branch. I got around this issue by defining the rest of the opcodes and basic parsing for them, but returns ENOSYS on opcodes that are not implemented.

@delehef
Copy link

delehef commented Apr 16, 2020

Hi all,

Until it's implemented in an actually decent fashion, you might use my quick'n dirty fork that I patched for this problem. Basically, it just replies a simple ENOSYS to any unknown request instead of Err-ing.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants