Re: [Rd] [New Patch] Fix disk corruption when writing

2017-07-10 Thread Duncan Murdoch
On 10/07/2017 9:00 AM, Serguei Sokol wrote: Le 10/07/2017 à 13:13, Duncan Murdoch a écrit : On 10/07/2017 5:34 AM, Serguei Sokol wrote: Le 10/07/2017 à 11:19, Duncan Murdoch a écrit : On 10/07/2017 4:54 AM, Serguei Sokol wrote: Le 08/07/2017 à 00:54, Duncan Murdoch a écrit : I have now commi

Re: [Rd] [New Patch] Fix disk corruption when writing

2017-07-10 Thread Serguei Sokol
Le 10/07/2017 à 13:13, Duncan Murdoch a écrit : On 10/07/2017 5:34 AM, Serguei Sokol wrote: Le 10/07/2017 à 11:19, Duncan Murdoch a écrit : On 10/07/2017 4:54 AM, Serguei Sokol wrote: Le 08/07/2017 à 00:54, Duncan Murdoch a écrit : I have now committed changes to R-devel (rev 72898) that seem

Re: [Rd] [New Patch] Fix disk corruption when writing

2017-07-10 Thread Duncan Murdoch
On 10/07/2017 5:34 AM, Serguei Sokol wrote: Le 10/07/2017 à 11:19, Duncan Murdoch a écrit : On 10/07/2017 4:54 AM, Serguei Sokol wrote: Le 08/07/2017 à 00:54, Duncan Murdoch a écrit : I have now committed changes to R-devel (rev 72898) that seem to catch large and small errors. They only giv

Re: [Rd] [New Patch] Fix disk corruption when writing

2017-07-10 Thread Serguei Sokol
Le 10/07/2017 à 11:19, Duncan Murdoch a écrit : On 10/07/2017 4:54 AM, Serguei Sokol wrote: Le 08/07/2017 à 00:54, Duncan Murdoch a écrit : I have now committed changes to R-devel (rev 72898) that seem to catch large and small errors. They only give a warning if the error happens when the con

Re: [Rd] [New Patch] Fix disk corruption when writing

2017-07-10 Thread Duncan Murdoch
On 10/07/2017 4:54 AM, Serguei Sokol wrote: Le 08/07/2017 à 00:54, Duncan Murdoch a écrit : I have now committed changes to R-devel (rev 72898) that seem to catch large and small errors. They only give a warning if the error happens when the connection is closed, because that can happen asynch

Re: [Rd] [New Patch] Fix disk corruption when writing

2017-07-10 Thread Serguei Sokol
Le 08/07/2017 à 00:54, Duncan Murdoch a écrit : I have now committed changes to R-devel (rev 72898) that seem to catch large and small errors. They only give a warning if the error happens when the connection is closed, because that can happen asynchronously For this asynchronous behavior, woul

Re: [Rd] [New Patch] Fix disk corruption when writing

2017-07-07 Thread Duncan Murdoch
I have now committed changes to R-devel (rev 72898) that seem to catch large and small errors. They only give a warning if the error happens when the connection is closed, because that can happen asynchronously: I didn't want to mess up some later unrelated computation that triggered garbage c

Re: [Rd] [New Patch] Fix disk corruption when writing

2017-07-07 Thread Duncan Murdoch
On 07/07/2017 11:13 AM, Serguei Sokol wrote: Le 07/07/2017 à 16:52, Duncan Murdoch a écrit : On 07/07/2017 9:54 AM, Serguei Sokol wrote: Le 07/07/2017 à 01:09, Duncan Murdoch a écrit : On 06/07/2017 6:44 PM, Sokol Serguei wrote: Duncan Murdoch has written at Thu, 6 Jul 2017 13:58:10 -0400 O

Re: [Rd] [New Patch] Fix disk corruption when writing

2017-07-07 Thread Serguei Sokol
Le 07/07/2017 à 16:52, Duncan Murdoch a écrit : On 07/07/2017 9:54 AM, Serguei Sokol wrote: Le 07/07/2017 à 01:09, Duncan Murdoch a écrit : On 06/07/2017 6:44 PM, Sokol Serguei wrote: Duncan Murdoch has written at Thu, 6 Jul 2017 13:58:10 -0400 On 06/07/2017 5:21 AM, Serguei Sokol wrote: I

Re: [Rd] [New Patch] Fix disk corruption when writing

2017-07-07 Thread Duncan Murdoch
On 07/07/2017 9:54 AM, Serguei Sokol wrote: Le 07/07/2017 à 01:09, Duncan Murdoch a écrit : On 06/07/2017 6:44 PM, Sokol Serguei wrote: Duncan Murdoch has written at Thu, 6 Jul 2017 13:58:10 -0400 On 06/07/2017 5:21 AM, Serguei Sokol wrote: I propose the following patch against the current R

Re: [Rd] [New Patch] Fix disk corruption when writing

2017-07-07 Thread Serguei Sokol
Le 07/07/2017 à 01:09, Duncan Murdoch a écrit : On 06/07/2017 6:44 PM, Sokol Serguei wrote: Duncan Murdoch has written at Thu, 6 Jul 2017 13:58:10 -0400 On 06/07/2017 5:21 AM, Serguei Sokol wrote: I propose the following patch against the current R-devel/src/main/connection.c (cf. attached fi

Re: [Rd] [New Patch] Fix disk corruption when writing

2017-07-06 Thread Duncan Murdoch
On 06/07/2017 6:44 PM, Sokol Serguei wrote: Duncan Murdoch has written at Thu, 6 Jul 2017 13:58:10 -0400 On 06/07/2017 5:21 AM, Serguei Sokol wrote: I propose the following patch against the current R-devel/src/main/connection.c (cf. attached file). It gives (on my linux box): > fc=file("/dev

Re: [Rd] [New Patch] Fix disk corruption when writing

2017-07-06 Thread Sokol Serguei
Duncan Murdoch has written at Thu, 6 Jul 2017 13:58:10 -0400 On 06/07/2017 5:21 AM, Serguei Sokol wrote: I propose the following patch against the current R-devel/src/main/connection.c (cf. attached file). It gives (on my linux box): > fc=file("/dev/full", "w") > write.csv("a", file=fc) Erro

Re: [Rd] [New Patch] Fix disk corruption when writing

2017-07-06 Thread Duncan Murdoch
On 06/07/2017 5:21 AM, Serguei Sokol wrote: I propose the following patch against the current R-devel/src/main/connection.c (cf. attached file). It gives (on my linux box): > fc=file("/dev/full", "w") > write.csv("a", file=fc) Error in writeLines(paste(col.names, collapse = sep), file, sep = e

Re: [Rd] [New Patch] Fix disk corruption when writing

2017-07-06 Thread Serguei Sokol
I propose the following patch against the current R-devel/src/main/connection.c (cf. attached file). It gives (on my linux box): > fc=file("/dev/full", "w") > write.csv("a", file=fc) Error in writeLines(paste(col.names, collapse = sep), file, sep = eol) : system call failure on writing > close(

Re: [Rd] [New Patch] Fix disk corruption when writing

2017-07-05 Thread Serguei Sokol
Le 05/07/2017 à 14:46, Serguei Sokol a écrit : Le 05/07/2017 à 13:09, Duncan Murdoch a écrit : On 05/07/2017 5:26 AM, January W. wrote: I tried the newest patch, but it does not seem to work for me (on Linux). Despite the check in Rconn_printf, the write.csv happily writes to /dev/full and does

Re: [Rd] [New Patch] Fix disk corruption when writing

2017-07-05 Thread Serguei Sokol
Le 05/07/2017 à 13:09, Duncan Murdoch a écrit : On 05/07/2017 5:26 AM, January W. wrote: I tried the newest patch, but it does not seem to work for me (on Linux). Despite the check in Rconn_printf, the write.csv happily writes to /dev/full and does not report an error. When I added a printf("%d\

Re: [Rd] [New Patch] Fix disk corruption when writing

2017-07-05 Thread January W.
OK, this does indeed seem to be the case. It is interesting that it works on MacOS, though. I think that given that errors on flushing the cache cannot be caught, the behavior is inadvertently unpredictable. best, j. On 5 July 2017 at 13:09, Duncan Murdoch wrote: > On 05/07/2017 5:26 AM, Jan

Re: [Rd] [New Patch] Fix disk corruption when writing

2017-07-05 Thread Duncan Murdoch
On 05/07/2017 5:26 AM, January W. wrote: I tried the newest patch, but it does not seem to work for me (on Linux). Despite the check in Rconn_printf, the write.csv happily writes to /dev/full and does not report an error. When I added a printf("%d\n", res); to the Rconn_printf() definition, I see

Re: [Rd] [New Patch] Fix disk corruption when writing

2017-07-05 Thread January W.
I tried the newest patch, but it does not seem to work for me (on Linux). Despite the check in Rconn_printf, the write.csv happily writes to /dev/full and does not report an error. When I added a printf("%d\n", res); to the Rconn_printf() definition, I see only positive values returned by the vfpri

Re: [Rd] [New Patch] Fix disk corruption when writing

2017-07-04 Thread Duncan Murdoch
On 04/07/2017 11:50 AM, Jean-Sébastien Bevilacqua wrote: Hello, You can find here a patch to fix disk corruption. When your disk is full, the write function exit without error but the file is truncated. https://bugs.r-project.org/bugzilla/show_bug.cgi?id=17243 Thanks. I didn't see that when i