Skip to content

--trace-time shows incorrect timestamps #15614

Closed
@jethrogb

Description

@jethrogb

I did this

When using the --trace-time option, curl doesn't print the actual time, but some other time:

$ strace -tt -etrace=connect curl --trace-time https://github.com --verbose
10:44:59.048287 * TCP_NODELAY set
10:44:59.174363 connect(5, {sa_family=AF_INET, sin_port=htons(443), sin_addr=inet_addr("140.82.116.4")}, 16) = -1 EINPROGRESS (Operation now in progress)
10:44:59.077392 * Connected to github.com (140.82.116.4) port 443 (#0)
...

I expected the following

The timestamps printed by curl shouldn't be ~100ms off from the ones printed by strace.

curl/libcurl version

curl 7.68.0 (x86_64-pc-linux-gnu) libcurl/7.68.0 OpenSSL/1.1.1f zlib/1.2.11 brotli/1.0.7 libidn2/2.2.0 libpsl/0.21.0 (+libidn2/2.2.0) libssh/0.9.3/openssl/zlib nghttp2/1.40.0 librtmp/2.3
Release-Date: 2020-01-08
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: AsynchDNS brotli GSS-API HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM NTLM_WB PSL SPNEGO SSL TLS-SRP UnixSockets

operating system

Ubuntu 20.04

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions