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

mount_linux: implement hanwen's poll hack for fixing test deadlock #2

Merged
merged 1 commit into from
Mar 20, 2019

Conversation

strib
Copy link

@strib strib commented Mar 20, 2019

The idea for this fix, and most of the code from it, should be credited to hanwen, from commit 4f10e248e of the hanwen/go-fuse repo.

Briefly, on Linux, when the same process that's serving a fuse mountpoint is sending epoll requests to that mountpoint (as is common in tests), the go runtime can deadlock. This works around the issue with a nasty hack that forces the kernel to learn (and cache) the fact that polling is not implemented right after the mount happens, to avoid deadlocks when the test later makes the same request.

Issue: golang/go#21014
Issue: hanwen/go-fuse#165
Issue: bazil#183

The idea for this fix, and most of the code from it, should be
credited to hanwen, from commit 4f10e248e of the hanwen/go-fuse repo.

Briefly, on Linux, when the same process that's serving a fuse
mountpoint is sending epoll requests to that mountpoint (as is common
in tests), the go runtime can deadlock.  This works around the issue
with a nasty hack that forces the kernel to learn (and cache) the fact
that polling is not implemented right after the mount happens, to
avoid deadlocks when the test later makes the same request.

Issue: golang/go#21014
Issue: hanwen/go-fuse#165
Issue: bazil#183
@strib strib merged commit 5a45981 into master Mar 20, 2019
@strib strib deleted the strib/poll-hack branch March 20, 2019 19:19
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

Successfully merging this pull request may close these issues.

2 participants