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

Two questions about the method 'readdir' and server crash #24

Closed
smallcham opened this issue Apr 16, 2020 · 2 comments
Closed

Two questions about the method 'readdir' and server crash #24

smallcham opened this issue Apr 16, 2020 · 2 comments

Comments

@smallcham
Copy link

smallcham commented Apr 16, 2020

i'm writing a fs it's base on a netdisc, now i have two problems, I hope you can take some time to answer:
the first is when call readdir method, i ll request netdisc to read file list, but always lose some file in display, around 23, the total is 37. i printed filename before call method 'pyfuse3.readdir_reply' , the file list is complete, but in terminal is always lose some files, i don't know what happend, maybe i usage is wrong, there is my code snippet:

async def readdir(self, fh, start_id, token):
        if start_id == -1:
            return
        else:
            f = FileMgr.get_from_fs_id(fh)
        files = self.fs.dir_cache('/' if not f else f.path, pyfuse3.ROOT_INODE if not f else f.fs_id)
        for file in files:
            pyfuse3.readdir_reply(token, file.filename_bytes, await self.getattr(file.fs_id, None), -1)

another question is when i mounted fs for nearly ten minutes , the server was always crash,this is error log

"Cannot convert coroutine to pyfuse3.EntryAttributes
2020-04-16 17:08:46.687 MainThread: [pyfuse3] Calling fuse_session_destroy
2020-04-16 17:08:46.687 MainThread: [pyfuse3] Calling fuse_session_unmount"

don't have enough error info , i can't tace back to the point of error.

last, the pyfuse is a very useful lib, thankyou.

@smallcham smallcham changed the title two question about the method 'readdir' and server crash Two question about the method 'readdir' and server crash Apr 16, 2020
@smallcham smallcham changed the title Two question about the method 'readdir' and server crash Two questions about the method 'readdir' and server crash Apr 16, 2020
@Nikratio
Copy link
Contributor

Thanks for your interest in pyfuse3! As far as I can tell, this is a question about how to use fuse rather than a bug report. Could you please send your question to the FUSE mailing list (https://lists.sourceforge.net/lists/listinfo/fuse-devel), instead of using the issue tracker? I'd like to reserve use of the latter to actually track issues and not use it for discussion.

Thanks!

@Nikratio
Copy link
Contributor

...as for your question, the problem is most likely that you don't check the return value of readdir_reply(), cf http://www.rath.org/pyfuse3-docs/fuse_api.html#pyfuse3.readdir_reply

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

2 participants