Re: libcurl ignore timeout on sftp disconnect
Date: Tue, 26 May 2020 11:02:09 -0700
Yes, I can confirm that when reverting that commit, the timeout is
triggered by curl. As far as I can tell, with valgrind
I couldn't see any memory leaks from libssh2 in this case, but I just ran
it a couple of times so I wouldn't fully trust my
small test to conclude that the memory leak is not there anymore.
Are you planning on reverting that commit in libcurl?
On Fri, May 22, 2020 at 2:37 PM Daniel Stenberg <daniel_at_haxx.se> wrote:
> On Wed, 20 May 2020, Estanislau Augé-Pujadas via curl-library wrote:
>
> > I have been using curl to upload files with sftp, and I have encountered
> an
> > unexpected behaviour related to timeouts and disconnects. When setting
> > CURLOPT_TIMEOUT_MS to some value, and the network disconnects during a
> file
> > upload, libcurl does not timeout the operation.
> >
> > I found a commit on Github that indicates that this behaviour is
> actually
> > intentional to address a problem that could leak to memory leaks for
> libssh2
> >
> https://github.com/curl/curl/commit/f31760e63b4e9ef1eb25f8f211390f8239388515
>
> Yeah, when I'm looking at it now it seems like the wrong fix (that I made
> and
> pushed). If libssh2 does indeed leak that memory, the fix should be done
> in
> libssh2. We should not just ignore a timeout request from a user.
>
> If you revert that change, does the timeout work properly? Does libssh2
> (still) leak memory if you do?
>
> --
>
> / daniel.haxx.se | Commercial curl support up to 24x7 is available!
> | Private help, bug fixes, support, ports, new features
> | https://www.wolfssl.com/contact/
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2020-05-26