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

Investigate and enable epoll under manylinux for Python binary distributions #13949

Closed
mehrdada opened this issue Jan 8, 2018 · 7 comments · Fixed by #14052
Closed

Investigate and enable epoll under manylinux for Python binary distributions #13949

mehrdada opened this issue Jan 8, 2018 · 7 comments · Fixed by #14052
Assignees

Comments

@mehrdada
Copy link
Member

mehrdada commented Jan 8, 2018

Per @jonparrot, manylinux1 should support epoll. The possibility of compiling epoll to Python binary packages should be re-evaluated:

epoll was introduced in glibc 2.3.2, manylinux1 supports glibc <= 2.5 so it should be possible to enable epoll without breaking manylinux1 compatibility.

@mehrdada
Copy link
Member Author

mehrdada commented Jan 8, 2018

As tried in #13951, epoll_create1 which is the syscall used by gRPC is unavailable under manylinux1

@mehrdada mehrdada closed this as completed Jan 8, 2018
@mehrdada mehrdada self-assigned this Jan 8, 2018
@kpayson64
Copy link
Contributor

Can we use epoll_create instead?

@mehrdada
Copy link
Member Author

@kpayson64 I believe that would be a fundamental change: epoll_create has different semantics and does not support the flag we pass to epoll_create1, so even if possible to make epoll_create work, it would require substantial changes to the polling engine, and we might as well fork it into another polling engine specific to Python.

@kpayson64
Copy link
Contributor

int epfd = epoll_create1(EPOLL_CLOEXEC);

It looks like the only flag we pass is EPOLL_CLOEXEC? We should be able to replicate that exact behavior with an additional call to fcntl(FD_CLOEXEC)

@mehrdada
Copy link
Member Author

Yes as far as I know that is the only flag we pass to it. If there is a way to duplicate that exactly it should work, but I am not well-versed on the semantics of the flag.

@mehrdada
Copy link
Member Author

@nicolasnoble Is there a catch to replacing epoll_create1 with epoll_create immediately followed by fcntl? Can their non-atomicity be a problem?

@mehrdada mehrdada reopened this Jan 16, 2018
@mehrdada
Copy link
Member Author

Summary of the offline discussion with @nicolasnoble: we should ifdef on libc version and use epoll_create followed by setting the flag.

@lock lock bot locked as resolved and limited conversation to collaborators Sep 30, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants