Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build error due to change in ngtcp2 variables #10469

Closed
wants to merge 2 commits into from

Conversation

Karthikdasari0423
Copy link
Contributor

@Karthikdasari0423 Karthikdasari0423 commented Feb 10, 2023

raised PR cause while build curl with ngtcp2 below error is noticed
#10468

hers is the PR to ngtcp2 which is causing issue
ngtcp2/ngtcp2#665

@github-actions github-actions bot added the HTTP/3 h3 or quic related label Feb 10, 2023
@vszakats
Copy link
Member

vszakats commented Feb 10, 2023

NGTCP2_DEFAULT_HANDSHAKE_TIMEOUT has indeed been deleted last week (but still present in the current latest release 0.13.1): ngtcp2/ngtcp2@edc47d5

The reason being: "current value (10 seconds) is arbitrary choice and no good reason behind it"

But, NGTCP2_ERR_HANDSHAKE_TIMEOUT is an error code with a negative value of -246:
https://github.com/ngtcp2/ngtcp2/blob/8a78123df44e50b64211f8981ef152dde52c8943/lib/includes/ngtcp2/ngtcp2.h#L790

This will silence the compiler error, but it doesn't seem like a useful timeout value.

Copy link
Contributor Author

@Karthikdasari0423 Karthikdasari0423 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--handshake-timeout=
Set the QUIC handshake timeout.
Default: 10s

@Karthikdasari0423
Copy link
Contributor Author

NGTCP2_DEFAULT_HANDSHAKE_TIMEOUT has indeed be deleted last week (but still present in the current latest release 0.13.1): ngtcp2/ngtcp2@edc47d5

The reason being: "current value (10 seconds) is arbitrary choice and no good reason behind it"

But, NGTCP2_ERR_HANDSHAKE_TIMEOUT is an error code with a negative value of -246: https://github.com/ngtcp2/ngtcp2/blob/8a78123df44e50b64211f8981ef152dde52c8943/lib/includes/ngtcp2/ngtcp2.h#L790

This will silence the compiler error, but it doesn't seem like a useful timeout value.

Building curl with ngtcp2
https://github.com/curl/curl/blob/master/docs/HTTP3.md
as of this link,ngtcp2 will be always latest one and not released one

@vszakats
Copy link
Member

vszakats commented Feb 10, 2023

I think 10 needs to be multiplied by NGTCP2_SECONDS:

#define NGTCP2_SECONDS ((ngtcp2_duration)1000000000ULL)

This restores the existing arbitrary value.

Is there an existing curl timeout that we could re-use here? Like CURLOPT_CONNECTTIMEOUT_MS?

@vszakats
Copy link
Member

This will become a problem on the next ngtcp2 release either way, so definitely needs to be addressed, ideally before the curl release next week.

@Karthikdasari0423
Copy link
Contributor Author

Karthikdasari0423 commented Feb 10, 2023

I think 10 needs to be multiplied by NGTCP2_SECONDS:

#define NGTCP2_SECONDS ((ngtcp2_duration)1000000000ULL)

This restores the existing arbitrary value.

Is there an existing curl timeout that we could re-use here? Like CURLOPT_CONNECTTIMEOUT_MS?

sorry,i am not sure of this

@bagder
Copy link
Member

bagder commented Feb 10, 2023

@tatsuhiro-t any advice?

@bagder
Copy link
Member

bagder commented Feb 10, 2023

I propose we provide our own version of the removed define for now. I'm not sure if 10 seconds should be fixed like this, but we can work on that later:

#define QUIC_HANDSHAKE_TIMEOUT (10 * NGTCP2_SECONDS)

@vszakats
Copy link
Member

QUIC_HANDSHAKE_TIMEOUT: perhaps this could also be re-used across QUIC backends in the future.

@tatsuhiro-t
Copy link
Contributor

It works. If curl has "connect()" timeout, then it can be used here.
Alternatively, just ommit setting handshake_timeout, then QUIC idle timeout will terminate connection during handshake.

@bagder
Copy link
Member

bagder commented Feb 10, 2023

then QUIC idle timeout will terminate connection during handshake.

Ah, so how long idleness trigger a termination?

@tatsuhiro-t
Copy link
Contributor

#define QUIC_IDLE_TIMEOUT (60*NGTCP2_SECONDS)

t->max_idle_timeout = QUIC_IDLE_TIMEOUT;

60 seconds.

bagder added a commit that referenced this pull request Feb 10, 2023
They were removed upstream.

Reported-by: Karthikdasari0423 on github
Fixes #10469
@bagder
Copy link
Member

bagder commented Feb 10, 2023

While pondering if we should perhaps allow for more than 10 seconds and rather use the idle timeout, I propose #10474 which just restores the 10 second handshake timeout but also fixes another necessary change prompted by upstream changes.

@bagder bagder closed this in 03ce27a Feb 11, 2023
bch pushed a commit to bch/curl that referenced this pull request Jul 19, 2023
They were removed upstream.

Reported-by: Karthikdasari0423 on github
Fixes curl#10469
Closes curl#10474
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
HTTP/3 h3 or quic related
Development

Successfully merging this pull request may close these issues.

None yet

4 participants