IO error when writing to disk

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

IO error when writing to disk

Jean-Sébastien Bevilacqua
Hello,
Here a small improvement for R.

When you use the function write.table, if the disk is full for example, the
function doesn't return an error and the file is written but truncated.

It can be a source of mistakes because you can then copy the output file
and think everything is ok.

How to reproduce
-------------------------

>> write.csv(1:10000000, 'path')

You must have a path with a small amount of disk available (on linux:
http://souptonuts.sourceforge.net/quota_tutorial.html)

I have joined the patch in this email.
Can you open a bugzilla account for me to keep track of this change.

Thanks,
Jean-Sébastien Bevilacqua

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

patch.diff (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: IO error when writing to disk

Jean-Sébastien Bevilacqua
Hello,
I have sent a mail but I got no answer.

Can you create a bugzilla account for me.

Thanks,
Jean-Sébastien Bevilacqua

2017-03-20 10:24 GMT+01:00 realitix <[hidden email]>:

> Hello,
> Here a small improvement for R.
>
> When you use the function write.table, if the disk is full for example,
> the function doesn't return an error and the file is written but truncated.
>
> It can be a source of mistakes because you can then copy the output file
> and think everything is ok.
>
> How to reproduce
> -------------------------
>
> >> write.csv(1:10000000, 'path')
>
> You must have a path with a small amount of disk available (on linux:
> http://souptonuts.sourceforge.net/quota_tutorial.html)
>
> I have joined the patch in this email.
> Can you open a bugzilla account for me to keep track of this change.
>
> Thanks,
> Jean-Sébastien Bevilacqua
>

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: IO error when writing to disk

Martin Maechler
>>>>> realitix  <[hidden email]>
>>>>>     on Wed, 22 Mar 2017 10:17:54 +0100 writes:

    > Hello,
    > I have sent a mail but I got no answer.

All work here happens on a volunteer basis... and it seems
everybody was busy or not interested.

    > Can you create a bugzilla account for me.

I've done that now.

Note that your prposed patch did contain a bit too many "copy &
paste" repetitions...  which I personally would have liked to be
written differently, using a wrapper (function or macro).

Also, let's assume on Linux, would there be a way to create a
small, say 1 MB, temporary file system as a non-root user?
In that case, we could do all the testing from inside R ..

Best,
Martin Maechler

    > Thanks,
    > Jean-Sébastien Bevilacqua

    > 2017-03-20 10:24 GMT+01:00 realitix <[hidden email]>:

    >> Hello,
    >> Here a small improvement for R.
    >>
    >> When you use the function write.table, if the disk is full for example,
    >> the function doesn't return an error and the file is written but truncated.
    >>
    >> It can be a source of mistakes because you can then copy the output file
    >> and think everything is ok.
    >>
    >> How to reproduce
    >> -------------------------
    >>
    >> >> write.csv(1:10000000, 'path')
    >>
    >> You must have a path with a small amount of disk available (on linux:
    >> http://souptonuts.sourceforge.net/quota_tutorial.html)
    >>
    >> I have joined the patch in this email.
    >> Can you open a bugzilla account for me to keep track of this change.
    >>
    >> Thanks,
    >> Jean-Sébastien Bevilacqua
    >>

    > [[alternative HTML version deleted]]

    > ______________________________________________
    > [hidden email] mailing list
    > https://stat.ethz.ch/mailman/listinfo/r-devel

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel