linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Fwd: scp bug due to progress indicator when copying from remote to local on Linux
       [not found] <CAH2r5mtQTu1mwh0Zpep71A5oHHYboLv5qD=8n_LeASzmncNx4g@mail.gmail.com>
@ 2019-01-11  6:13 ` Steve French
  0 siblings, 0 replies; only message in thread
From: Steve French @ 2019-01-11  6:13 UTC (permalink / raw)
  To: LKML

---------- Forwarded message ---------
From: Steve French <smfrench@gmail.com>
Date: Fri, Jan 11, 2019 at 12:11 AM
Subject: scp bug due to progress indicator when copying from remote to
local on Linux
To: CIFS <linux-cifs@vger.kernel.org>, linux-fsdevel
<linux-fsdevel@vger.kernel.org>
Cc: CIFS <linux-cifs@vger.kernel.org>, Pavel Shilovsky <piastryyy@gmail.com>


In discussing an interesting problem with scp recently with Pavel, we
found a fairly obvious bug in scp when it is run with a progress
indicator (which is the default when the source file is remote).

scp triggers "SIGALRM" probably from update_progress_meter() in
progressmeter.c when executed with "scp localhost:somelargefile /mnt"
ie with an ssh source path but a local path for the target, as long as
the flush of the large amount of cached data to disk (which seems to
be triggered by the ftruncate call in scp.c) takes more than a few
seconds (which can be common depending on disk or network speed).

It is interesting that this can be avoided easily by running in quiet
mode ("-q") which disables the progress meter in scp, but it seems
very, very broken that scp of a large file can 'fail' when using a
progress meter (unless caching were disabled on the file system) due
to the slight delay in ftruncate due to triggering a flush of a large
amount of cached data to disk sequentially.

Any thoughts of whether scp is actively maintained and best approach
to fix progressmeter.c so it doesn't break on Linux?

--
Thanks,

Steve


-- 
Thanks,

Steve

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-01-11  6:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CAH2r5mtQTu1mwh0Zpep71A5oHHYboLv5qD=8n_LeASzmncNx4g@mail.gmail.com>
2019-01-11  6:13 ` Fwd: scp bug due to progress indicator when copying from remote to local on Linux Steve French

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).