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

404'ing directory breaks httpdirfs #95

Open
Tracked by #89
chrysn opened this issue Oct 3, 2021 · 0 comments
Open
Tracked by #89

404'ing directory breaks httpdirfs #95

chrysn opened this issue Oct 3, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@chrysn
Copy link
Contributor

chrysn commented Oct 3, 2021

When accessing a directory that is not there (say, because the index.html was faulty, or simply because the directory is just being deleted), httpdirfs breaks badly. To reproduce:

$ mkdir original
$ echo '<a href="foo/">foo!</a>' > origina/index.html
$ python3 -m http.server --directory original 8234
(keep running)
$ mkdir mounted
$ httpdirfs -d http://localhost:8234 mounted
(keep running)
$ ls mounted
total 0
drwxr-xr-x 1 chrysn chrysn     0 Jan  1  1970 .
drwxrwxrwt 1 root   root   28700 Oct  3 14:59 ..
drwxr-xr-x 1 chrysn chrysn     0 Jan  1  1970 foo
$ ls mounted/foo
total 0
$ ls mounted/foo
(hangs indefinitely)

Once one process hangs, any other access to not previously cached content hangs too. (In the minimal example, there's nothing else to access; observed that in the more complex real scenario). As usual with fuse, once processes hang like that they can not be killed with even the most deadly signals, and need to wait for httpdirfs to be killed.

The best behavior would probably be to return ENOENT on the access if that's still an option, or behave as regular file systems behave when the directory a process has already entered is removed. (But anything really that does not make processes using the filesystem hang would be an improvement).

@fangfufu fangfufu added the bug Something isn't working label Oct 3, 2021
@fangfufu fangfufu mentioned this issue Apr 30, 2022
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants