[quicwg/base-drafts] assertion in GetPtoTimeAndSpace of recovery draft (#3910)
Kazu Yamamoto <notifications@github.com> Wed, 15 July 2020 07:51 UTC
Return-Path: <noreply@github.com>
X-Original-To: quic-issues@ietfa.amsl.com
Delivered-To: quic-issues@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 66A883A08A2 for <quic-issues@ietfa.amsl.com>; Wed, 15 Jul 2020 00:51:04 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.1
X-Spam-Level:
X-Spam-Status: No, score=-3.1 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_IMAGE_ONLY_32=0.001, HTML_MESSAGE=0.001, MAILING_LIST_MULTI=-1, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=github.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qlPppR0cR7at for <quic-issues@ietfa.amsl.com>; Wed, 15 Jul 2020 00:51:02 -0700 (PDT)
Received: from out-27.smtp.github.com (out-27.smtp.github.com [192.30.252.210]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id B3D7C3A0893 for <quic-issues@ietf.org>; Wed, 15 Jul 2020 00:51:02 -0700 (PDT)
Received: from github-lowworker-56fcc46.va3-iad.github.net (github-lowworker-56fcc46.va3-iad.github.net [10.48.102.32]) by smtp.github.com (Postfix) with ESMTP id F2DC2E16B9 for <quic-issues@ietf.org>; Wed, 15 Jul 2020 00:51:01 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=github.com; s=pf2014; t=1594799461; bh=7aUblsS/i6kyBFCkmd7gUVMIf9r6Xf2PfqUtpQF908I=; h=Date:From:Reply-To:To:Cc:Subject:List-ID:List-Archive:List-Post: List-Unsubscribe:From; b=BwjMhE2NqYYYAWJJOOh0yGz/4MUbJlanHHa29JKud+ZeBK7pl4BHWIJ3QjTPMmsuC dUL5nJF+5omgjQ7m0x/90KwysQ9Q25C8w2k4FLuEtXr4O/+4E6kd8gjdSwGIZIoriC 9tyOm9fCyRT1BeIg6LWyQYRsUqXJ/KFoihmD4WOQ=
Date: Wed, 15 Jul 2020 00:51:01 -0700
From: Kazu Yamamoto <notifications@github.com>
Reply-To: quicwg/base-drafts <reply+AFTOJK7OZ4XYUUKQ7PDWIZF5DKLGLEVBNHHCOKZNOY@reply.github.com>
To: quicwg/base-drafts <base-drafts@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
Message-ID: <quicwg/base-drafts/issues/3910@github.com>
Subject: [quicwg/base-drafts] assertion in GetPtoTimeAndSpace of recovery draft (#3910)
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="--==_mimepart_5f0eb565e30a8_75203fb55b0cd96015497b"; charset="UTF-8"
Content-Transfer-Encoding: 7bit
Precedence: list
X-GitHub-Sender: kazu-yamamoto
X-GitHub-Recipient: quic-issues
X-GitHub-Reason: subscribed
X-Auto-Response-Suppress: All
X-GitHub-Recipient-Address: quic-issues@ietf.org
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic-issues/ah695j_yZPQBTj4PkZdlvZY5Yxc>
X-BeenThere: quic-issues@ietf.org
X-Mailman-Version: 2.1.29
List-Id: Notification list for GitHub issues related to the QUIC WG <quic-issues.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/quic-issues>, <mailto:quic-issues-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/quic-issues/>
List-Post: <mailto:quic-issues@ietf.org>
List-Help: <mailto:quic-issues-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/quic-issues>, <mailto:quic-issues-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 15 Jul 2020 07:51:04 -0000
`assertion` in `GetPtoTimeAndSpace` fails in many times.
`GetPtoTimeAndSpace` is as follows:
```
GetPtoTimeAndSpace():
duration = (smoothed_rtt + max(4 * rttvar, kGranularity))
* (2 ^ pto_count)
// Arm PTO from now when there are no inflight packets.
if (no in-flight packets):
assert(!PeerCompletedAddressValidation())
if (has handshake keys):
return (now() + duration), Handshake
else:
return (now() + duration), Initial
pto_timeout = infinite
pto_space = Initial
...
```
It is called from two places.
In the first place, `GetPtoTimeAndSpace()` is called when
- ack-eliciting packets in flight (roughly, `bytes_in_flight <= 0`)
- *OR* `!PeerCompletedAddressValidation()`
```
SetLossDetectionTimer():
...
if (no ack-eliciting packets in flight &&
PeerCompletedAddressValidation()):
// There is nothing to detect lost, so no timer is set.
// However, the client needs to arm the timer if the
// server might be blocked by the anti-amplification limit.
loss_detection_timer.cancel()
return
// Determine which PN space to arm PTO for.
timeout, _ = GetPtoTimeAndSpace()
```
Int the second place, `GetPtoTimeAndSpace()` is called when
- `bytes_in_flight > 0`
```
OnLossDetectionTimeout():
if (bytes_in_flight > 0):
// PTO. Send new data if available, else retransmit old data.
// If neither is available, send a single PING frame.
_, pn_space = GetPtoTimeAndSpace()
SendOneOrTwoAckElicitingPackets(pn_space)
```
So, it is not guaranteed that the following stands always:
- `bytes_in_flight <= 0`
- *AND* `!PeerCompletedAddressValidation()`
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/3910
- [quicwg/base-drafts] assertion in GetPtoTimeAndSp… Kazu Yamamoto
- Re: [quicwg/base-drafts] assertion in GetPtoTimeA… ianswett
- Re: [quicwg/base-drafts] assertion in GetPtoTimeA… Kazu Yamamoto
- Re: [quicwg/base-drafts] assertion in GetPtoTimeA… Kazu Yamamoto