Re: CVS commit: src/sys/kern

2009-12-16 Thread David Laight
On Wed, Dec 16, 2009 at 12:31:21AM -0500, Michael wrote:
 
 
 To generate a diff of this commit:
 cvs rdiff -u -r1.124 -r1.125 src/sys/kern/sys_pipe.c
 
 
 This causes spurious aborts with tar and gzip
 For example tar tzf pkgsrc/distfiles/mysql-4.1.22.tar.gz aborts  
 halfway through but works fine with revision 1.124

I think that is all down to one of the relevant processes not liking
a partial return from a blocking write().

I commented out that bit, but have a better fix in mind.
(In particular one that doesn't use ERESTART unless one thread closes
an fd while other threads are doing io on that fd.)

David

-- 
David Laight: da...@l8s.co.uk


Re: CVS commit: src/sys/kern

2009-12-16 Thread David Laight
On Wed, Dec 16, 2009 at 06:24:04AM +, David Holland wrote:
 On Tue, Dec 15, 2009 at 06:35:18PM +, David Laight wrote:
   Modified Files:
  src/sys/kern: sys_pipe.c
   
   Log Message:
   Don't ERESTART write() calls for now.
   I suspect some programs don't allow for the partial transfer.
 
 More likely, the pipe is stuttering and repeating itself. Once data's
 been transferred, you *have* to succeed and return the amount
 transferred; otherwise anything that tries again (whether the
 application or transparently by syscall restart) is going to send the
 same data over again.

The code to handle that is in the sys_read()/sys_write() path.
In the same place that EINTR gets converted to 'success' if
any bytes have been transferred.

David

-- 
David Laight: da...@l8s.co.uk