Michael Wallner | 1 Jun 2007 08:48
Picon
Gravatar

Re: Release count-down!

Daniel Stenberg wrote:
> On Thu, 31 May 2007, Michael Wallner wrote:
> 
>> Hm... can I help in any way to get this
>> curl_multi_add_handle/socket_all() thingy sorted out?
> 
> Sure, the same way like before: provide a test sample that repeats the
> problem at least somewhat reliably.

Uhm... is one out of three times reliably enough?  The attached program hangs
sometimes if line 35 is being commented.  The procedure used was:

mike <at> honeybadger:~/cvs/curl/docs/examples$ colorgcc -g `curl-config --cflags --libs`
-Wl,-rpath,/usr/local/lib -levent -o load load.c
mike <at> honeybadger:~/cvs/curl/docs/examples$ ./load 2>/dev/null
Added: 1000, Finished: 1000, Time: 674ms
mike <at> honeybadger:~/cvs/curl/docs/examples$ ./load 2>/dev/null
Added: 1000, Finished: 1000, Time: 756ms
mike <at> honeybadger:~/cvs/curl/docs/examples$ ./load 2>/dev/null
Added: 1000, Finished: 1000, Time: 692ms
mike <at> honeybadger:~/cvs/curl/docs/examples$ colorgcc -g `curl-config --cflags --libs`
-Wl,-rpath,/usr/local/lib -levent -o load load.c
mike <at> honeybadger:~/cvs/curl/docs/examples$ ./load 2>/dev/null
Added: 1000, Finished: 1000, Time: 533ms
mike <at> honeybadger:~/cvs/curl/docs/examples$ ./load 2>/dev/null
Added: 1000, Finished: 1000, Time: 572ms
mike <at> honeybadger:~/cvs/curl/docs/examples$ ./load 2>/dev/null
^C
mike <at> honeybadger:~/cvs/curl/docs/examples$ ./load 2>/dev/null
Added: 1000, Finished: 1000, Time: 549ms
(Continue reading)

Daniel Stenberg | 1 Jun 2007 10:43
Picon
Favicon
Gravatar

Tell us how YOU use curl or libcurl!

Hi

Potential new users of curl and libcurl often look for existing users as a way 
to see if the product seems good and reliable. Existing known companies and 
known products/projects using curl/libcurl help us "sell" curl more. The more 
curl users we get, the more potential developers we get and the more bug fixes 
and feature enhancements we get...

If you work for, run one or know of a company that uses curl/libcurl inhouse 
or in applictions/products, please let us know! Consider replying that info 
privately to me, no need to flood the lists.

This is the list of known companies using (lib)curl:

 	http://curl.haxx.se/docs/companies.html

If you write or use an application that uses curl or libcurl, please let us 
know!

This is the list of curl-using apps:

 	http://curl.haxx.se/docs/programs.html

This is the list of libcurl-using apps:

 	http://curl.haxx.se/libcurl/using/apps.html

This is the list of PHP/CURL-using apps:

 	http://curl.haxx.se/libcurl/php/apps.html
(Continue reading)

Daniel Stenberg | 1 Jun 2007 13:22
Picon
Favicon
Gravatar

Re: Strange "couldn't connect to host" error

On Thu, 31 May 2007, Jonathan Arnold wrote:

>>> We have a routine that gets called every second, goes out to the web, and 
>>> downloads a tiny (about 50 characters) file.

> curl, v7.16.2 Yes, it downloads from the same server.

Ok, but isn't then the same single connection being re-used all the time? What 
is the difference after 30 minutes? (1800 fetches!)

>>> It runs okay for some random time, say 30 minutes, but then returns back a 
>>> "Couldn't connect to host" error.

For how long? I mean does it fail once and work the next attempt again?

--

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html

Jonathan Arnold | 1 Jun 2007 15:28

Re: Strange "couldn't connect to host" error

Andre Guibert de Bruet wrote:
> On May 31, 2007, at 4:44 PM, Jonathan Arnold wrote:
>> Daniel Stenberg wrote:
>>> On Thu, 31 May 2007, Jonathan Arnold wrote:
>>>> We have a routine that gets called every second, goes out to the web,
>>>> and downloads a tiny (about 50 characters) file.
>>> What libcurl version? Does it download this from the same server 
>>> every second?
>>
>> curl, v7.16.2
>>
>> Yes, it downloads from the same server.
>>
>>>> It runs okay for some random time, say 30 minutes, but then returns 
>>>> back a "Couldn't connect to host" error.
>>> That means that the connect() call failed...
>>>> Should I tweak some timeout?
>>> Possibly, yes. You should probably check what happens on the wire 
>>> when this failure occurs to pinpoint exactly what to do.
>>
>> I don't see anything via Wireshark when there is a problem. No packet
>> at all.
> 
> Is the server closing the connection right before the call that is 
> failing? Alternatively, would you happen to be calling curl functions 
> using the same handle from multiple threads without adequate 
> synchronization?

Not that I see in Wireshark.  And the curl handle is local to the dialog
box that is using it.
(Continue reading)

Jonathan Arnold | 1 Jun 2007 15:28

Re: Strange "couldn't connect to host" error

Daniel Stenberg wrote:
> On Thu, 31 May 2007, Jonathan Arnold wrote:
> 
>>>> We have a routine that gets called every second, goes out to the 
>>>> web, and downloads a tiny (about 50 characters) file.
> 
>> curl, v7.16.2 Yes, it downloads from the same server.
> 
> Ok, but isn't then the same single connection being re-used all the 
> time? What is the difference after 30 minutes? (1800 fetches!)

I'm not sure, but I guess so. I call Curl_Init once when the dialog box
gets created, and then the timer uses the same handle to do the http
perform. And it isn't always 30 minutes, just something like that. And
it doesn't happen for everyone. For me (luckily really) and a few select
customers.

>>>> It runs okay for some random time, say 30 minutes, but then returns 
>>>> back a "Couldn't connect to host" error.
> 
> For how long? I mean does it fail once and work the next attempt again?

Not sure what you mean by "how long", but yes, it works again in two differenct
contexts:

1] When we get the error, we do a cleanup and then re-init and it works fine.

2] If I stop it in the debugger after it gets the error, reset the current
instruction back to the first easy_setopt and re-run, it works fine too.

(Continue reading)

Andre Guibert de Bruet | 1 Jun 2007 16:29
Favicon

Re: Tell us how YOU use curl or libcurl!

Daniel,

My employer, Silicon Landmark (http://siliconlandmark.com/ ), uses  
libcurl in a variety of internal and customer projects on MacOS X,  
Linux and FreeBSD.

Cheers,

/*  Andre Guibert de Bruet  * 6f43 6564 7020 656f 2e74 4220 7469 6a20 */
/*   Code poet / Sysadmin   * 636f 656b 2e79 5320 7379 6461 696d 2e6e */
/*   GSM: +1 734 846 8758   * 5520 494e 2058 6c73 7565 6874 002e 0000 */
/* WWW: siliconlandmark.com * C/C++, Java, Perl, PHP, SQL, XHTML, XML */

On Jun 1, 2007, at 4:43 AM, Daniel Stenberg wrote:

> Hi
>
> Potential new users of curl and libcurl often look for existing  
> users as a way to see if the product seems good and reliable.  
> Existing known companies and known products/projects using curl/ 
> libcurl help us "sell" curl more. The more curl users we get, the  
> more potential developers we get and the more bug fixes and feature  
> enhancements we get...
>
> If you work for, run one or know of a company that uses curl/ 
> libcurl inhouse or in applictions/products, please let us know!  
> Consider replying that info privately to me, no need to flood the  
> lists.
>
> This is the list of known companies using (lib)curl:
(Continue reading)

Tom Regner | 1 Jun 2007 17:16
X-Face
Favicon

SFTP create missing directories patch

Hi,

I just implemented that sftp will honour the CURLOPT_FTP_CREATE_MISSING_DIRS 
setting - a feature I need right now;

I'm quite unsure if the way I implemented it will meet with approval on your 
part - I simply await your comments.

The patch was done against lib/ssh.c of the snapshot 
curl-7.16.3-20070601.tar.bz2.

kind regards,
Tom
--

-- 
Tom Regner -- Jabber: tomte <at> tomsdiner.org
http://www.tomsdiner.org
Attachment (sftp_cmds.patch): text/x-diff, 3004 bytes
Daniel Stenberg | 1 Jun 2007 23:03
Picon
Favicon
Gravatar

Re: Release count-down!

On Fri, 1 Jun 2007, Michael Wallner wrote:

> Uhm... is one out of three times reliably enough?  The attached program 
> hangs sometimes if line 35 is being commented.

I committed a fix and now I can't repeat your problem[*]!

[*] = if I don't build a c-ares-using version as then I can get a similar 
problem but I think it is a different one and I'll go after it right now...

--

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html

Robert Olson | 2 Jun 2007 05:36
Picon

libcurl, https transfers, and NAT

Hi --

We've been seeing some strangeness with HTTPS transfers running on  
machines sitting behind NAT routers. If the NAT changes public  
address while a transfer is ongoing, the libcurl app will spin  
forever waiting for the transfer to complete. One behavior I have  
seen is the Apache log showing the web hit timing out after the  
server's timeout, but on the client the socket is still in the  
ESTABLISHED state so  the app thinks all is well.

(I can force this behavior at will by manually forcing my Linux NAT  
router to drop and reestablish the DSL connection, resulting in a new  
public IP address being assigned).

The bludgeon solution that I'm currently trying is to set  
CURLOPT_TIMEOUT; this appears to work, but doesn't directly address  
the problem. It also doesn't address the problem of long transfers  
that could exceed whatever default timeouts we choose. I'm thinking  
about adding a cancel-transfer-if-no-data-received-lately   
functionality, but haven't gotten there yet.

Has anyone else run into this? Any recommendations? Perhaps there are  
NAT settings that need to be tweaked ...

Thanks,
--bob

Paul S | 2 Jun 2007 06:26
Picon
Favicon

SSL routines:SSL3_GET_RECORD:wrong version number

Hi,
Using the code below I get a "SSL routines:SSL3_GET_RECORD:wrong version 
number" error:

"
                Curl.GlobalInit((int)CURLinitFlag.CURL_GLOBAL_ALL);

                Easy easy = new Easy();

                Easy.DebugFunction df = new Easy.DebugFunction(OnDebug);
                easy.SetOpt(CURLoption.CURLOPT_DEBUGFUNCTION, df);
                easy.SetOpt(CURLoption.CURLOPT_VERBOSE, true);

                Easy.WriteFunction wf = new Easy.WriteFunction(OnWriteData);
                easy.SetOpt(CURLoption.CURLOPT_WRITEFUNCTION, wf);

                Easy.SSLContextFunction sf = new 
Easy.SSLContextFunction(OnSSLContext);
                easy.SetOpt(CURLoption.CURLOPT_SSL_CTX_FUNCTION, sf);

                easy.SetOpt(CURLoption.CURLOPT_URL, "ftps://127.0.0.1:221");
                easy.SetOpt(CURLoption.CURLOPT_USERPWD, 
"username:password");
                easy.SetOpt(CURLoption.CURLOPT_FTPSSLAUTH, 
CURLftpAuth.CURLFTPAUTH_TLS);
                easy.SetOpt(CURLoption.CURLOPT_SSLVERSION, 
CURLsslVersion.CURL_SSLVERSION_TLSv1);

This is the error. Any idea what I'm doing wrong? I know the server works 
fine since I can connect with a ftp client.
(Continue reading)


Gmane