all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Proxmox Backup Server development discussion
	<pbs-devel@lists.proxmox.com>,
	Stefan Reiter <s.reiter@proxmox.com>
Subject: Re: [pbs-devel] [PATCH proxmox-backup 5/9] file-restore-daemon: work around tokio DuplexStream bug
Date: Thu, 6 May 2021 20:12:58 +0200	[thread overview]
Message-ID: <07c15982-0adb-d3b6-02c3-560969df1779@proxmox.com> (raw)
In-Reply-To: <20210506152624.12605-6-s.reiter@proxmox.com>

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 <s.reiter@proxmox.com>
> ---
> 
> 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 {
> 





  reply	other threads:[~2021-05-06 18:13 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-06 15:26 [pbs-devel] [PATCH 0/9] Debug mode and smaller fixes for single file restore Stefan Reiter
2021-05-06 15:26 ` [pbs-devel] [PATCH proxmox-backup 1/9] file-restore: add debug mode with serial access Stefan Reiter
2021-05-06 15:26 ` [pbs-devel] [PATCH proxmox-backup 2/9] file-restore: try to kill VM when stale Stefan Reiter
2021-05-07  7:04   ` [pbs-devel] applied: " Thomas Lamprecht
2021-05-06 15:26 ` [pbs-devel] [PATCH proxmox-backup 3/9] file-restore: add more RAM for VMs with many drives or debug Stefan Reiter
2021-05-07  7:04   ` [pbs-devel] applied: " Thomas Lamprecht
2021-05-06 15:26 ` [pbs-devel] [PATCH proxmox-backup 4/9] file-restore: support more drives Stefan Reiter
2021-05-07  7:04   ` [pbs-devel] applied: " Thomas Lamprecht
2021-05-06 15:26 ` [pbs-devel] [PATCH proxmox-backup 5/9] file-restore-daemon: work around tokio DuplexStream bug Stefan Reiter
2021-05-06 18:12   ` Thomas Lamprecht [this message]
2021-05-07  7:26     ` Fabian Grünbichler
2021-05-06 15:26 ` [pbs-devel] [PATCH proxmox-backup 6/9] file-restore-daemon: watchdog: add inhibit for long downloads Stefan Reiter
2021-05-06 15:26 ` [pbs-devel] [PATCH proxmox-backup 7/9] file-restore-daemon: limit concurrent download calls Stefan Reiter
2021-05-06 15:26 ` [pbs-devel] [PATCH proxmox-backup-restore-image 8/9] kernel: power off on panic Stefan Reiter
2021-05-06 15:26 ` [pbs-devel] [PATCH proxmox-backup-restore-image 9/9] add debug initramfs as seperate package Stefan Reiter
2021-05-06 18:07   ` Thomas Lamprecht
2021-05-25 11:50 ` [pbs-devel] applied-series: [PATCH 0/9] Debug mode and smaller fixes for single file restore Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=07c15982-0adb-d3b6-02c3-560969df1779@proxmox.com \
    --to=t.lamprecht@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    --cc=s.reiter@proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal