Skip to content

ephiperfifo.c example #5485

Closed
Closed
@therealhirudo

Description

@therealhirudo

I did this

Ran the example, passed URL to the fifo

I expected the following

Whenever the last transfer finishes, I'd expect to see
"last transfer done, kill timeout"
and the mainloop waits for the next fifo call, without timer events

What I saw

Sometimes the message above is missing, and the mainloop keeps calling the timer after the last transfer is done.

curl/libcurl version

curl 7.66.0 (x86_64-redhat-linux-gnu) libcurl/7.66.0 OpenSSL/1.1.1d-fips zlib/1.2.11 brotli/1.0.7 libidn2/2.2.0 libpsl/0.21.0 (+libidn2/2.2.0) libssh/0.9.0/openssl/zlib nghttp2/1.39.2
Release-Date: 2019-09-11
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: AsynchDNS brotli GSS-API HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz Metalink NTLM NTLM_WB PSL SPNEGO SSL TLS-SRP UnixSockets

operating system

Linux fc31 5.3.7-301.fc31.x86_64 #1 SMP Mon Oct 21 19:18:58 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Extra info:

In the good case, the end of the sequence is generally:
REMAINING: 1
Progress: http://www.example.com (62/62)
socket callback: s=6 e=0x54a1e20 what=REMOVE
multi_timer_cb: Setting timeout to -1 ms
REMAINING: 0
DONE: http://www.example.com => (0)
last transfer done, kill timeout

In the "bad" case, it's:
REMAINING: 1
socket callback: s=6 e=0x5482b60 what=REMOVE
Progress: http://www.example.com (62/62)
REMAINING: 0
DONE: http://www.leahnim.org => (0)
REMAINING: 0
REMAINING: 0
...

Call chain in the good case seems to be:
curl_multi_socket_action(real socket)-> { write_callback ; socket_callback remove action } -> timer_callback -1

In the bad case:
curl_multi_socket_action(TIMEOUT) -> {write_callback ; socket_callback remove action }

i.e. the timer callback isn't called.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions