Skip to content

Hangs on easy cleanup when aborted by callback #6333

@Togtja

Description

@Togtja

I did this

Using CURLOPT_XFERINFODATA and CURLOPT_XFERINFOFUNCTION that send in a struct with an abort bool.
Where the function essentially has this:

    if (meta->abort) {
        return 1;
    }

The download is an sftp/ftp download

During the perform step it return CURLE_ABORTED_BY_CALLBACK

And then it goes to clean up, and it hangs there for about 2 minutes.
curl_easy_cleanup(curl);

I expected the following

That the cleanup would take a very short time, as it happens for most returns.

curl/libcurl version

curl 7.74.0 (Linux) libcurl/7.74.0 OpenSSL/1.1.1g zlib/1.2.11 libssh2/1.9.0_DEV
Release-Date: 2020-12-09
Protocols: dict file ftp ftps gopher http https imap imaps mqtt pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS HTTPS-proxy IPv6 Largefile NTLM SSL UnixSockets

I also tried this on 7.73, and same behaviour.

EDIT: Downloaded source-code.zip, instead of 7.74.0.zip, but fix that
EDIT 2: Forgot it ran it on my arm emulator, so fixed the versioning

operating system

Custom OS made using buildroot
Linux Togtja 4.20.0-OS_NAME #1 SMP PREEMPT Wed Dec 16 12:52:46 CET 2020 armv7l GNU/Linux

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions