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

MacOS breakage: "osxfuse: vnode changed generation" #204

Closed
rfjakob opened this issue Mar 7, 2018 · 3 comments
Closed

MacOS breakage: "osxfuse: vnode changed generation" #204

rfjakob opened this issue Mar 7, 2018 · 3 comments

Comments

@rfjakob
Copy link
Contributor

rfjakob commented Mar 7, 2018

I recenty got a ticket filed against gocryptfs with macos users seeing errors when copying files: rfjakob/gocryptfs#213

I have now managed to get my hands on macos box (high sierra, osxfuse 3.7.1). The extractloop.bash stress test reproduces the issue, both for gocryptfs (just run ./extractloop.bash) and loopback (running ./extractloop.bash -loopback).

The tar extract fails with lots of

Can't create file

errors while we get these osxfuse errors in dmesg:

osxfuse: vnode changed generation
osxfuse: vnode changed generation
osxfuse: vnode changed generation

I was tempted to suggest that osxfuse is just completely broken, but ./extractloop.bash -encfs (running the same tarball extract test against encfs) works fine. So I guess we should be doing something differently on macos. Ideas?

@hanwen
Copy link
Owner

hanwen commented Mar 7, 2018

the generation numbes are generated in a harebrained way,

m.generation++

it might be that osxfuse wants some more constraints on the generation number.

@rfjakob
Copy link
Contributor Author

rfjakob commented Mar 8, 2018

Let's see if the osxfuse people can shed some light on this: macfuse/macfuse#482

@magnusja
Copy link

rfjakob added a commit to rfjakob/go-fuse that referenced this issue Mar 13, 2018
Implement simpleHandleMap that never reuses handle numbers and
uses a simple map to track handle numbers.

This hopefully works around the

	osxfuse: vnode changed generation

errors we are seeing on darwin, while sacrificing
performance.

rfjakob/gocryptfs#213
hanwen#204
macfuse/macfuse#482
rfjakob added a commit to rfjakob/go-fuse that referenced this issue Mar 13, 2018
Implement simpleHandleMap that never reuses handle numbers and
uses a simple map to track handle numbers.

This seems to get rid of the

	osxfuse: vnode changed generation

errors we are seeing on darwin, while sacrificing
some performance.

I have tested simpleHandleMap on darwin and linux,
seems to work fine.

rfjakob/gocryptfs#213
hanwen#204
macfuse/macfuse#482
rfjakob added a commit to rfjakob/go-fuse that referenced this issue Mar 16, 2018
We used to hand out a new generation number even
for already-known handles. This does not seem to
cause problems on Linux, but osxfuse throws errors
to userspace with

	osxfuse: vnode changed generation

showing up in the kernel log.

Introduce a per-handle generation number that stays
constant until the handle is forgotten.

Fixes hanwen#204
See also hanwen#205
rfjakob added a commit to rfjakob/go-fuse that referenced this issue Mar 16, 2018
We used to hand out a new generation number even
for already-known handles. This does not seem to
cause problems on Linux, but osxfuse throws errors
to userspace with

	osxfuse: vnode changed generation

showing up in the kernel log.

Introduce a per-handle generation number that stays
constant until the handle is forgotten.

Tested on Linux and MacOS via gocryptfs.

Fixes hanwen#204
See also hanwen#205
rfjakob added a commit to rfjakob/go-fuse that referenced this issue Mar 16, 2018
We used to hand out a new generation number even
for already-known handles. This does not seem to
cause problems on Linux, but osxfuse throws errors
to userspace with

	osxfuse: vnode changed generation

showing up in the kernel log.

Introduce a per-handle generation number that stays
constant until the handle is forgotten.

Tested on Linux and MacOS via gocryptfs.

Fixes hanwen#204
See also hanwen#205
@hanwen hanwen closed this as completed in a9ddcb8 Mar 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants