Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@mback2k
Copy link
Member

@mback2k mback2k commented May 30, 2020

Change Curl_socket_check to use select-fallback in Curl_poll
instead of implementing it in Curl_socket_check and Curl_poll.

Replaces #5262

@mback2k
Copy link
Member Author

mback2k commented Jun 1, 2020

As you can see from the failing Windows CI builds, this seems to have made visible the root cause of some builds having issues with not timing out while connecting to a non-listening local port, eg. for the proxy tests. I will investigate this and hopefully come up with a fix which can be part of this PR.

@mback2k
Copy link
Member Author

mback2k commented Jun 1, 2020

The problem I identified was that the poll-based socket check did not check the write socket for connection failure with POLLPRI. @bagder please take a look at the new commit.

@mback2k mback2k requested a review from bagder June 2, 2020 08:14
@mback2k
Copy link
Member Author

mback2k commented Jun 2, 2020

My plan is to create a separate PR for 5a2c961 this evening that also re-enables the currently disabled proxy connect tests on AppVeyor which have been disabled due to this issue.

@mback2k mback2k force-pushed the select-reduce-dup branch from 5a2c961 to 5c7131b Compare June 3, 2020 07:06
@mback2k mback2k marked this pull request as ready for review June 3, 2020 07:07
@mback2k mback2k marked this pull request as draft June 6, 2020 07:12
@mback2k mback2k added the feature-window A merge of this requires an open feature window label Jun 6, 2020
@mback2k
Copy link
Member Author

mback2k commented Jun 6, 2020

I still need to investigate the exact circumstances of the underlying issue in #5509 a little bit more first, therefore this PR is back to Draft state and put on hold, because the back and forth between poll and select is relevant for this.

@mback2k mback2k added the on-hold label Jun 6, 2020
Change Curl_socket_check to use select-fallback in Curl_poll
instead of implementing it in Curl_socket_check and Curl_poll.

Replaces curl#5262
Closes curl#5492
@mback2k mback2k force-pushed the select-reduce-dup branch from 5c7131b to 307888d Compare June 6, 2020 19:36
mback2k added a commit to mback2k/curl that referenced this pull request Jun 6, 2020
The select-based socket check correctly checks for connect
failures by adding the write socket also to fds_err.

The poll-based implementation (which internally can itself
fallback to select again) did not previously check for
connect failure by using POLLPRI with the write socket.

This commit makes sure connect failures can be detected
and handled if HAVE_POLL_FINE is defined, eg. on msys2-devel.
Therefore the related disabled tests can be enabled again.

Related to curl#5492
@mback2k
Copy link
Member Author

mback2k commented Jul 21, 2020

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mback2k
Copy link
Member Author

mback2k commented Jul 21, 2020

Closing this since it will be replaced by #5707.

@mback2k mback2k closed this Jul 21, 2020
mback2k added a commit to mback2k/curl that referenced this pull request Aug 1, 2020
This commit changes Curl_socket_check to use POLLPRI to
check for connect failure on the write socket, because
POLLPRI maps to fds_err. This is in line with select(2).

The select-based socket check correctly checks for connect
failures by adding the write socket also to fds_err.

The poll-based implementation (which internally can itself
fallback to select again) did not previously check for
connect failure by using POLLPRI with the write socket.

See the follow up commit to this for more information.

This commit makes sure connect failures can be detected
and handled if HAVE_POLL_FINE is defined, eg. on msys2-devel.

Replaces curl#5509
Related to curl#5492
Part of curl#5707
mback2k added a commit to mback2k/curl that referenced this pull request Aug 1, 2020
Change Curl_socket_check to use select-fallback in Curl_poll
instead of implementing it in Curl_socket_check and Curl_poll.

Replaces curl#5262 and curl#5492
Follow up to curl#5509
Closes curl#5707
mback2k added a commit that referenced this pull request Aug 25, 2020
Change Curl_socket_check to use select-fallback in Curl_poll
instead of implementing it in Curl_socket_check and Curl_poll.

Reviewed-by: Daniel Stenberg
Reviewed-by: Jay Satiro

Replaces #5262 and #5492
Closes #5707
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature-window A merge of this requires an open feature window on-hold tidy-up

Development

Successfully merging this pull request may close these issues.

2 participants