Re: Bug#447153: /usr/bin/scp: Fails to notice write errors

This is a discussion on Re: Bug#447153: /usr/bin/scp: Fails to notice write errors within the OpenSSH Development forums, part of the Networking and Network Related category; On 13/11/2007, Colin Watson <cjwatson@debian.org> wrote: > On Tue, Nov 13, 2007 at 12:...


Go Back   Usenet Forums > Networking and Network Related > OpenSSH Development

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 11-13-2007
Michal Suchanek
 
Posts: n/a
Default Re: Bug#447153: /usr/bin/scp: Fails to notice write errors

On 13/11/2007, Colin Watson <cjwatson@debian.org> wrote:
> On Tue, Nov 13, 2007 at 12:02:25AM +0100, Peter Stuge wrote:
> > On Mon, Nov 12, 2007 at 06:33:54PM +0000, Colin Watson wrote:
> > > To openssh-unix-dev: does anyone think this is worth a workaround?

> >
> > Gut feeling is that it should be fixed wherever the problem is.

>
> Yeah, that's why I sent my mail to the CIFS list as well. Kernels won't
> get upgraded instantly even if it gets fixed right away though, so
> OpenSSH might want to regard it as a portability fix ...
>
> > > The ftruncate seems rather unnecessary if we've already written out
> > > the required number of bytes anyway.

> >
> > Not neccessarily, we may be overwriting a larger file with the same
> > name.

>
> Indeed; see the other part of this thread.
>


I tried a few experiments, and I was not able to reproduce the problem

a) against a Windows XP share
which points in the direction of Samba server or Samba <-> Samba incompatibility

b) in my favourite scripting language because it puts a sync before the truncate
This could be used in scp as well, it is minimal change to the code:

open: Success
write: Success
ftruncate: Success
close: Success

open: Success
write: Success
fsync: No space left on device
ftruncate: No space left on device
close: No space left on device

Duplication voodoo also works:

open: Success
write: Success
dup: Success
close dup: No space left on device
ftruncate: No space left on device
close: No space left on device

Thanks

Michal
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@mindrot.org
https://lists.mindrot.org/mailman/li...enssh-unix-dev
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 06:31 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0