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

openssl: improve error message for SYSCALL during connect #4593

Closed
wants to merge 2 commits into from

Conversation

bagder
Copy link
Member

@bagder bagder commented Nov 14, 2019

Reported-by: Paulo Roberto Tomasi
Bug: https://curl.haxx.se/mail/archive-2019-11/0005.html

@@ -2990,8 +2990,13 @@ static CURLcode ossl_connect_step2(struct connectdata *conn, int sockindex)
const char * const hostname = SSL_IS_PROXY() ?
conn->http_proxy.host.name : conn->host.name;
const long int port = SSL_IS_PROXY() ? conn->port : conn->remote_port;
char extramsg[80]="";
int sockerr = SOCKERRNO;
if(sockerr && detail == SSL_ERROR_SYSCALL)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I modified this slightly to use strerror only if sockerr!=0 because as described in #4624 sockerr may be 0 and we don't want confusing "No error" / "Success" error messages.

Copy link
Member

@jay jay Nov 22, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know what Unchanged files with check annotations github errors are
reference is not a tree: ad73bf5
but it is? should I write github or does anyone know why that

edit: looks like a race condition, will write github

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where do you see that error?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was at the bottom of this page, 3 errors, but then I restarted the job and they disappeared. There's probably a race condition, it cloned the repo and the commit I just added to this branch was not in it so I'm guessing the repo is cached somewhere internally and wasn't updated before the CI started. I wrote github. It's still in beta so I would just restart if you see bad tree errors.

@jay jay force-pushed the bagder/openssl-connect-errormsg branch from ad73bf5 to 13610da Compare November 22, 2019 18:41
@jay jay added the TLS label Nov 22, 2019
@jay jay closed this in 1f4e7dc Nov 23, 2019
@jay jay deleted the bagder/openssl-connect-errormsg branch November 23, 2019 03:57
@lock lock bot locked as resolved and limited conversation to collaborators Feb 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

Successfully merging this pull request may close these issues.

2 participants