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

This is a discussion on Bug#447153: /usr/bin/scp: Fails to notice write errors - Debian ; 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. > The ftruncate seems rather unnecessary ...

+ Reply to Thread
Results 1 to 3 of 3

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

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

    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.


    > 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.


    //Peter



    --
    To UNSUBSCRIBE, email to debian-bugs-dist-REQUEST@lists.debian.org
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

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

    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.

    --
    Colin Watson [cjwatson@debian.org]



    --
    To UNSUBSCRIBE, email to debian-bugs-dist-REQUEST@lists.debian.org
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

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

    On 13/11/2007, Colin Watson 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



    --
    To UNSUBSCRIBE, email to debian-bugs-dist-REQUEST@lists.debian.org
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

+ Reply to Thread