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

Disable compiling with poll() on macOS #393

Merged
merged 1 commit into from
May 11, 2021
Merged

Conversation

sagebind
Copy link
Collaborator

@sagebind sagebind commented May 11, 2021

I've noticed recently that when using the bundled curl version on macOS, very occasionally curl will get "stuck" in the TCP connection phase when using the multi interface. Apparently this is caused by the poll() implementation not behaving quite as the POSIX standard says it should on some macOS versions. (Curl uses poll()/select() to check if a socket has finished connecting without blocking, even if you are not using those functions to poll read/write readiness.)

This originally was a problem just for macOS 10.12, but after a recent update it seems like this regression might have come back in 10.15. It is more reliable to just disable poll() completely on macOS, which the official build configuration does here: https://github.com/curl/curl/blob/1e19eceb50d6d8b9c9b37e2f8e1259b2f311c82a/m4/curl-functions.m4#L4999-L5010

See also curl/curl#1057 when this was originally reported way back in the day.

I've noticed recently that when using the bundled curl version on macOS, very occasionally curl will get "stuck" in the TCP connection phase when using the multi interface. Apparently this is caused by the `poll()` implementation not behaving quite as the POSIX standard says it should on some macOS versions.

This originally was a problem just for macOS 10.12, but after a recent update it seems like this regression might have come back in 10.15. It is better to just disable `poll()` completely on macOS, which the official build configuration does here: https://github.com/curl/curl/blob/1e19eceb50d6d8b9c9b37e2f8e1259b2f311c82a/m4/curl-functions.m4#L4999-L5010

See also curl/curl#1057 when this was originally reported way back in the day.
@alexcrichton alexcrichton merged commit 2dbc1b0 into master May 11, 2021
@alexcrichton alexcrichton deleted the disable-poll-on-macos branch May 11, 2021 14:10
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