From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 4D6327A209 for ; Thu, 6 May 2021 20:13:02 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 40AF82373D for ; Thu, 6 May 2021 20:13:02 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 9A95E236ED for ; Thu, 6 May 2021 20:13:00 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 64AF646497 for ; Thu, 6 May 2021 20:13:00 +0200 (CEST) Message-ID: <07c15982-0adb-d3b6-02c3-560969df1779@proxmox.com> Date: Thu, 6 May 2021 20:12:58 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:89.0) Gecko/20100101 Thunderbird/89.0 Content-Language: en-US To: Proxmox Backup Server development discussion , Stefan Reiter References: <20210506152624.12605-1-s.reiter@proxmox.com> <20210506152624.12605-6-s.reiter@proxmox.com> From: Thomas Lamprecht In-Reply-To: <20210506152624.12605-6-s.reiter@proxmox.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.008 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment NICE_REPLY_A -0.001 Looks like a legit reply (A) SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [api.rs] Subject: Re: [pbs-devel] [PATCH proxmox-backup 5/9] file-restore-daemon: work around tokio DuplexStream bug X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 May 2021 18:13:02 -0000 On 06.05.21 17:26, Stefan Reiter wrote: > See this PR for more info: https://github.com/tokio-rs/tokio/pull/3756 > > As a workaround use a pair of connected unix sockets - this obviously > incurs some overhead, albeit not measureable on my machine. Once tokio > includes the fix we can go back to a DuplexStream for performance and > simplicity. > now that it got merged, do we want to cherry-pick this or await inclusion in stable instead of applying this workaround? CC'ing Fabian as our tokio (or better said rust) packaging wizard > Signed-off-by: Stefan Reiter > --- > > Thanks to @Wolfgang for helping debug this! > > src/bin/proxmox_restore_daemon/api.rs | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/src/bin/proxmox_restore_daemon/api.rs b/src/bin/proxmox_restore_daemon/api.rs > index f1d601ce..5aeb69f3 100644 > --- a/src/bin/proxmox_restore_daemon/api.rs > +++ b/src/bin/proxmox_restore_daemon/api.rs > @@ -275,7 +275,11 @@ fn extract( > bail!("file or directory {:?} does not exist", path); > } > > - let (mut writer, reader) = tokio::io::duplex(1024 * 64); > + // FIXME: DuplexStream is currently broken and doesn't wake pending writers on close, i.e. > + // this doesn't drop the WatchdogInhibitor if we encounter an error (client aborts, etc...) > + // see: https://github.com/tokio-rs/tokio/pull/3756 > + // let (mut writer, reader) = tokio::io::duplex(1024 * 64); > + let (mut writer, reader) = tokio::net::UnixStream::pair()?; > > if pxar { > tokio::spawn(async move { >