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

curl:some errors #1286

Closed
lhw828 opened this issue Feb 18, 2019 · 1 comment
Closed

curl:some errors #1286

lhw828 opened this issue Feb 18, 2019 · 1 comment

Comments

@lhw828
Copy link
Contributor

lhw828 commented Feb 18, 2019

Downloading source file curl-7.64.0.tar.bz2 for module curl
--2019-02-19 01:10:13-- https://curl.haxx.se/download/curl-7.64.0.tar.bz2
Resolving curl.haxx.se... 151.101.230.49, 2a04:4e42:1a::561
Connecting to curl.haxx.se|151.101.230.49|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3012077 (2.9M) [application/x-bzip2]
Saving to: '/tmp/curl-7.64.0.tar.bz2'

/tmp/curl-7.64.0.ta 100%[===================>] 2.87M 41.4KB/s in 2m 17s

2019-02-19 01:12:32 (21.5 KB/s) - '/tmp/curl-7.64.0.tar.bz2' saved [3012077/3012077]

Building curl version 7.64.0
patching file lib/url.c
Hunk #1 FAILED at 964.
1 out of 2 hunks FAILED -- saving rejects to file lib/url.c.rej
can't find file to patch at input line 56
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:

|From 4015fae044ce52a639c9358e22a9e948f287c89f Mon Sep 17 00:00:00 2001
|Message-Id: 4015fae044ce52a639c9358e22a9e948f287c89f.1550326608.git.jan.steffens@gmail.com
|From: Jay Satiro raysatiro@yahoo.com
|Date: Mon, 11 Feb 2019 23:00:00 -0500
|Subject: [PATCH] connection_check: restore original conn->data after the check
|
|- Save the original conn->data before it's changed to the specified
| data transfer for the connection check and then restore it afterwards.
|
|This is a follow-up to 38d8e1b 2019-02-11.
|
|History:
|
|It was discovered a month ago that before checking whether to extract a
|dead connection that that connection should be associated with a "live"
|transfer for the check (ie original conn->data ignored and set to the
|passed in data). A fix was landed in 54b201b which did that and also
|cleared conn->data after the check. The original conn->data was not
|restored, so presumably it was thought that a valid conn->data was no
|longer needed.
|
|Several days later it was discovered that a valid conn->data was needed
|after the check and follow-up fix was landed in bbae24c which partially
|reverted the original fix and attempted to limit the scope of when
|conn->data was changed to only when pruning dead connections. In that
|case conn->data was not cleared and the original conn->data not
|restored.
|
|A month later it was discovered that the original fix was somewhat
|correct; a "live" transfer is needed for the check in all cases
|because original conn->data could be null which could cause a bad deref
|at arbitrary points in the check. A fix was landed in 38d8e1b which
|expanded the scope to all cases. conn->data was not cleared and the
|original conn->data not restored.
|
|A day later it was discovered that not restoring the original conn->data
|may lead to busy loops in applications that use the event interface, and
|given this observation it's a pretty safe assumption that there is some
|code path that still needs the original conn->data. This commit is the
|follow-up fix for that, it restores the original conn->data after the
|connection check.
|
|Assisted-by: tholin@users.noreply.github.com
|Reported-by: tholin@users.noreply.github.com
|
|Fixes curl/curl#3542

Closes #3559
lib/url.c
1 file changed, 2 insertions(+), 1 deletion(-)

|
|diff --git a/lib/url.c b/lib/url.c
|index bc47685db..46c8fb5fb 100644
|--- a/lib/url.c
|+++ b/lib/url.c

No file to patch. Skipping patch.
2 out of 2 hunks ignored
ERROR: Failed to apply connection_check-restore-original-conn-data-after-th.patch for curl

@florin65
Copy link
Member

Removed the first patch as it is uneeded now.

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

No branches or pull requests

2 participants