Re: HTTP/3 server push: handling of lost PUSH_PROMISE

Mikkel Fahnøe Jørgensen <mikkelfj@gmail.com> Tue, 27 July 2021 10:05 UTC

Return-Path: <mikkelfj@gmail.com>
X-Original-To: quic@ietfa.amsl.com
Delivered-To: quic@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 5C82A3A1DE5 for <quic@ietfa.amsl.com>; Tue, 27 Jul 2021 03:05:48 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.097
X-Spam-Level:
X-Spam-Status: No, score=-2.097 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.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 ECiRLGc5GruX for <quic@ietfa.amsl.com>; Tue, 27 Jul 2021 03:05:43 -0700 (PDT)
Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 052773A1DE4 for <quic@ietf.org>; Tue, 27 Jul 2021 03:05:42 -0700 (PDT)
Received: by mail-wm1-x335.google.com with SMTP id e25-20020a05600c4b99b0290253418ba0fbso1929751wmp.1 for <quic@ietf.org>; Tue, 27 Jul 2021 03:05:42 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=BTLV3AZlK26b4ON4MO1y44Wrmm9bpi3Mrh9XKZ56k8w=; b=To1GiGQumtltS+F8ehNusrkfFU8S5mrUS+1TPVP0WyQQjBhC23/VuvdBQIELxxlbvu QKLeNNQeRShtJwIkgYeYArL6ZQG5c8f2RaL4SJ+YHpoupI8wvnJtK/gPSO3oOI7iPh2m +nEpAnRvqBeYMLQwZ4tQLHIS9HfO62gxuP9gyqcmblEuo4CPa1uZNs5kXzzojsat6ERC XA3739BqSTqsZ9DRE2+1PcxIOd3gfpPfDj3YrO1GsfZwB4pz0BvHTaaFIAg9YXIIxGgz ElIlBh/3WCflZQj2zr+a4DSgb6ZQwMz7+/rRLtqQlZCzmYrrWzPOJHcO8dLbE08zaaq0 f5Zg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=BTLV3AZlK26b4ON4MO1y44Wrmm9bpi3Mrh9XKZ56k8w=; b=Edu6eVmDa3gi2ZYBDtghF71OcxObjPszbLa3wPw1h+/XGt4UAA7hw56Lq1wzqq9gHZ DsJU1az1e+IkDOXFthzaoV1GUsOqCwCv8kX8kvljRts+ct1C6Bs7Ahsyt/ZYiFwz0zrU 7HcgnQCC5QvgJvXIfY0jjmwdEmh1hYnGcJ7oeVAxbnUM6k3j/FzSyIDaN9VHmkBK1KJz 2/d2O3xcFbxtaDI9QtmiBMzF9ktQkiPJDk4b3XPlUgxV+ta2hkmXaJxyAyoq7MQ33teo ViLg5KkyQEiR+q69KttmigUM2b3Ey8lgMELfT/UFT6y/ibiHtsEtPHVC9bx7RV90wWEu Y5gQ==
X-Gm-Message-State: AOAM531Ws9njywWNTmYhu7pjEm7u6woyIDlcFGIZcnovV1EDEJX2SKEM v6CsuhKNnNW+b5LigNAXFEo=
X-Google-Smtp-Source: ABdhPJxIQqiAk/9UkPiCsuLcrekQGnTgQC7/q2W8PR+8G9+qsBDnTIz4o5ZU8o0tR/OvkP3fYAB28g==
X-Received: by 2002:a05:600c:b59:: with SMTP id k25mr3284576wmr.51.1627380339334; Tue, 27 Jul 2021 03:05:39 -0700 (PDT)
Received: from [192.168.50.192] ([87.72.40.193]) by smtp.gmail.com with ESMTPSA id h15sm2527122wrq.88.2021.07.27.03.05.38 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Jul 2021 03:05:38 -0700 (PDT)
From: Mikkel Fahnøe Jørgensen <mikkelfj@gmail.com>
Message-Id: <7BACA321-0A01-4771-B482-DDDC6E6E2306@gmail.com>
Content-Type: multipart/alternative; boundary="Apple-Mail=_956FF8AF-CEA3-42E2-985A-240D74A8BD35"
Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\))
Subject: Re: HTTP/3 server push: handling of lost PUSH_PROMISE
Date: Tue, 27 Jul 2021 12:05:37 +0200
In-Reply-To: <CAPyZ6=+he3A0y_PtdDmUcG0vSgczPMqOwKLLY37ZUACpAz46kw@mail.gmail.com>
Cc: IETF QUIC WG <quic@ietf.org>
To: Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>
References: <CAPyZ6=+tCHNGYq0Za38-pju23_d_2wwXbWMgCbJK_Ou8mH3aKQ@mail.gmail.com> <72de8a9e-9f93-4bdc-8c2a-3f359beb94ac@www.fastmail.com> <CAPyZ6=+he3A0y_PtdDmUcG0vSgczPMqOwKLLY37ZUACpAz46kw@mail.gmail.com>
X-Mailer: Apple Mail (2.3608.120.23.2.4)
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/OQJqAPDlR9oYGNt8A8vSbHo8ors>
X-BeenThere: quic@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Main mailing list of the IETF QUIC working group <quic.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/quic>, <mailto:quic-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/quic/>
List-Post: <mailto:quic@ietf.org>
List-Help: <mailto:quic-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/quic>, <mailto:quic-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 27 Jul 2021 10:05:49 -0000

To me it sounds like an API detail between the transport layer and the application protocol layer that could differ between implementations without affecting the protocol specification of QUIC transport or HTTP/3.

Speaking generally and not HTTP/3 specific:

If the application requests transport to send stop sending, the application doesn’t directly control the transport, it merely asks the transport to work on its behalf. Thus aborting receive side stream might take an API form such as:

1) ignore all further data on this stream including buffered and transit data
2) ask the peer to not send more data, but give me whatever is still buffered and in transit.

Of course this might be several different API calls working together to reach those effects.

Mikkel

> On 27 Jul 2021, at 10.55, Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> wrote:
> 
> Hi,
> 
> On Tue, Jul 27, 2021 at 3:31 PM Martin Thomson <mt@lowentropy.net <mailto:mt@lowentropy.net>> wrote:
> This is a case where QUIC processing something doesn't imply HTTP/3 processing something.  QUIC read the data and "processed" it.  HTTP/3 decided not to handle it deliberately, and the PUSH_PROMISE fell between the cracks.
> 
> One "solution" is to insist that endpoints attempt to process streams for this stuff if they decide to discard responses.  This is like how in HTTP/2 you still have to update the HPACK table after resetting a stream.  It's awkward, but I think that it would work if data is available.  I don't think that there is any case in which data is unavailable to the client but the server doesn't receive STOP_SENDING.
> 
> 
> It is indeed awkward that QUIC stack has to pass stream data all the way to the end of the stream (or sees RESET_STREAM or closed) to HTTP/3 client even after it requested stopping reading.  And the HTTP/3 client has to process it just for PUSH_PROMISE.  Does any implementation do this?
> 
> Sending STOP_SENDING alone is not enough.  As I wrote in the previous post, by the time STOP_SENDING is received by the HTTP/3 server, it has finished processing the pushed stream and forgets it.  I imagine that if QUIC stack provides BSD socket-like interface and HTTP/3 server writes all data and can clear the memory without waiting for an acknowledgement.
> 
> Best regards,
> Tatsuhiro Tsujikawa
>  
> On Tue, Jul 27, 2021, at 13:01, Tatsuhiro Tsujikawa wrote:
> > Hi,
> > 
> > It looks like in certain conditions, client is unable to process pushed
> > stream and leaves it in unprocessable state indefinitely.
> > 
> > Consider that client opens bidi stream and server sends PUSH_PROMISE
> > and completes the response body which is very short (just a single packet
> > or two).  For some reason, client has decided to stop reading
> > response, but FIN is seen (data recvd state), and does not send
> > STOP_SENDING because it is not required (RFC mentions that it has a
> > little value to send STOP_SENDING in data recvd state and
> > unnecessary).  Client discards all stream data without handing it over
> > to application, so PUSH_PROMISE is not processed.  Client does not
> > know the push ID.  Because STOP_SENDING is not sent, server has no signal
> > which indicates PUSH_PROMISE is not processed, and opens a pushed
> > stream.  Client receives pushed stream, but unable to find the
> > corresponding PUSH_PROMISE.  It holds pushed stream until it sees
> > PUSH_PROMISE, but it never come.  This causes the pushed stream to be held by
> > client indefinitely.
> > 
> > Even if client sends STOP_SENDING to the bidi stream, it might not
> > work if server finishes sending stream data and a pushed stream and
> > forgets them before receiving STOP_SENDING.
> > 
> > Best regards,
> > Tatsuhiro Tsujikawa
>