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

Fix use of select() instead of poll() #6477

Merged
merged 2 commits into from
Dec 17, 2019

Conversation

mehrdadn
Copy link
Contributor

@mehrdadn mehrdadn commented Dec 13, 2019

Why are these changes needed?

Negative timeout for poll() was not translated to infinite timeout for select().

Related issue number

#631

#6363 (line)

Checks

@AmplabJenkins
Copy link

Can one of the admins verify this patch?

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/19566/
Test FAILed.

@pcmoritz
Copy link
Contributor

Thanks for the fix! Let's also put and ifdef here and keep the poll code for linux and macOS. On linux, select only works for file descriptors <= 1024 which could cause problems, see https://linux-tips.com/t/is-it-possible-to-listen-file-descriptor-greater-than-1024-with-select/45.

- Negative timeout for poll() was not translated to infinite timeout for select()
- Only use select() on Windows, as other systems limit the range of the file descriptors
@mehrdadn mehrdadn force-pushed the arrow-poll-select-timeout-fix branch from 9080b02 to f7fd6ea Compare December 14, 2019 00:51
@mehrdadn
Copy link
Contributor Author

@pcmoritz Oh shoot, thanks for the heads up! I didn't realize it's a bit vector! I thought it's an array of file descriptors (that's how they're implemented in Windows) so I assumed there can't be a problem if there's only a single file descriptor.

I pushed a new patch to switch to poll on non-Windows systems now, hopefully it should take care of that.

@mehrdadn
Copy link
Contributor Author

@pcmoritz I just pushed an identical patch for Redis's ae.c in this PR as well, hope that's fine.

@mehrdadn mehrdadn changed the title Fix Arrow patch Fix use of select() instead of poll() Dec 14, 2019
@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/19592/
Test FAILed.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/19594/
Test FAILed.

@pcmoritz pcmoritz merged commit 9d6e03a into ray-project:master Dec 17, 2019
@mehrdadn mehrdadn deleted the arrow-poll-select-timeout-fix branch December 17, 2019 10:44
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.

None yet

4 participants