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

TestFilePersistence and TestMultipleDirs fuse tests fail #2214

Closed
jbenet opened this issue Jan 17, 2016 · 7 comments
Closed

TestFilePersistence and TestMultipleDirs fuse tests fail #2214

jbenet opened this issue Jan 17, 2016 · 7 comments

Comments

@jbenet
Copy link
Member

jbenet commented Jan 17, 2016

Moving ipfs/ipfs#153.

@thelinuxkid said:

https://travis-ci.org/thelinuxkid/go-ipfs/jobs/102976905#L252
https://travis-ci.org/thelinuxkid/go-ipfs/jobs/102976905#L255

@thelinuxkid
Copy link
Contributor

For TestFilePersistence, reading the file right after writing alleviates the problem most of the time. But, that could be completely unrelated or just chance. Maybe someone with more fuse experience like @whyrusleeping or @tv42 can enlighten.

    data := writeFile(t, 127, mnt.Dir+fname)

    b, e := ioutil.ReadFile(mnt.Dir + fname)
    if e != nil {
        t.Fatal(e)
    }
    for _, _ = range b {
    }

    mnt.Close()

@tv42
Copy link
Contributor

tv42 commented Jan 19, 2016

Sounds like the Lookup doesn't find that file, regardless of whatever earlier success was reported for the file write. FUSE debug log might be useful to confirm that. Sounds like a bug in IPFS directory data structure management.

@thelinuxkid
Copy link
Contributor

The nodes aren't being closed correctly, therefore, the data is not always written to the datastore when unmounting. The solution involves using https://godoc.org/bazil.org/fuse/fs#HandleFlusher and https://godoc.org/bazil.org/fuse/fs#HandleReleaser instead of Forget, https://github.com/ipfs/go-ipfs/blob/master/fuse/ipns/ipns_unix.go#L216, and Close, , https://github.com/ipfs/go-ipfs/blob/master/fuse/ipns/ipns_unix.go#L204. Thanks @tv42 for the insight. I am out of town until next Friday and probably won't be able to put too much work into this until then.

@chriscool
Copy link
Contributor

@thelinuxkid has something be done about this?

@thelinuxkid
Copy link
Contributor

This issue is no longer showing up.

@chriscool
Copy link
Contributor

Closing following @thelinuxkid's comment above.

@chriscool
Copy link
Contributor

Really closing now :-)

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

4 participants