Bug 464862
Summary: | curl deadlocks on multiple redirections | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | David Woodhouse <dwmw2> |
Component: | curl | Assignee: | Kamil Dudka <kdudka> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 10 | CC: | jnovy, kdudka |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2009-05-17 19:01:56 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 501138 |
Description
David Woodhouse
2008-09-30 21:51:51 UTC
I tried curl_easy_cleanup() and starting a new request, but still saw the deadlock. So I tried the workaround below, and now get something stranger: Will connect to https://vpntest/ Got redirect to https://vpntest/+webvpn+/index.html Will connect to https://vpntest/+webvpn+/index.html Curl error: Problem with the SSL CA cert (path? access rights?) again: if (curl_global_init(CURL_GLOBAL_SSL)) { fprintf(stderr, "Curl initialisation failed\n"); exit(1); } curl = curl_easy_init(); curl_easy_setopt(curl, CURLOPT_URL, url_buf); curl_easy_setopt(curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, curl_err); curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, &curl_write_cb); curl_easy_setopt(curl, CURLOPT_WRITEDATA, &resp); curl_easy_setopt(curl, CURLOPT_COOKIEFILE, ""); /* FIXME: We'll want to teach cURL about using the TPM for this */ if (cert) curl_easy_setopt(curl, CURLOPT_SSLCERT, cert); headers = curl_slist_append(NULL, "X-Transcend-Version: 1"); curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers); curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 0); printf("Will connect to %s\n", url_buf); if (curl_easy_perform(curl)) { fprintf(stderr, "Curl error: %s\n", curl_err); curl_easy_cleanup(curl); curl_global_cleanup(); curl = NULL; return -EINVAL; } newurl = NULL; if (curl_easy_getinfo(curl, CURLINFO_REDIRECT_URL, &newurl)) printf("get redirect url failed\n"); if (newurl) { printf("Got redirect to %s\n", newurl); strncpy(url_buf, newurl, sizeof(url_buf)-1); curl_easy_cleanup(curl); curl_global_cleanup(); goto again; } curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &respcode); This bug appears to have been reported against 'rawhide' during the Fedora 10 development cycle. Changing version to '10'. More information and reason for this action is here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component. Looking at the backtrace it seems like already resolved NSS locking issue. Is the bug still present in up to date Fedora 10 (with curl-7.19.4-5.fc10)? I can confirm that the error reported in comment #1 is gone. I can no longer attempt to reproduce the different error reported in comment #2 because my VPN client no longer uses curl. (It was necessary to use a SSL certificate from a Trusted Platform Module, and curl doesn't offer that functionality -- or even the possibility to talk HTTP of read/write functions provided by the app. So I ended up writing my own HTTP code. I'd love to ditch that :) (In reply to comment #5) > I can confirm that the error reported in comment #1 is gone. I can no longer > attempt to reproduce the different error reported in comment #2 because my VPN > client no longer uses curl. Thanks for the summary! The problem with ca bundle path should be resolved as well. FYI there is now opened a tracking bug 501138 for bugs caused by migration to NSS. |