You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Joachim Worringen <jo...@dolphinics.com> on 2006/10/20 06:55:19 UTC

svn checkout on NFS fails (missing fsync()?)

[ posted on users list, but got no reply there ]

Using svn 1.3.2 on Linux, svn checkout fails like this:

joachim@optimist-0 $ svn checkout
http://perfbase.tigris.org/svn/perfbase/trunk perfbase --username guest
Authentication realm: <http://perfbase.tigris.org:80> CollabNet
Subversion Repository
Password for 'guest':
svn: REPORT request failed on '/svn/perfbase/!svn/vcc/default'
svn: REPORT of '/svn/perfbase/!svn/vcc/default': 400 Bad Request
(http://perfbase.tigris.org)

I checked with strace and found this sequence being the culprit:

open("perfbase/.svn/tmp/tempfile.tmp", O_RDWR|O_CREAT|O_EXCL, 0666) = 4
[...]
write(4, "<S:update-report send-all=\"true\"
xmlns:S=\"svn:\"><S:src-path>http://perfbase.tigris.org/svn/perfbase/trunk</S:src-path><S:target-revision>109</S:target-revision><S:entry 

rev=\"109\"  start-empty=\"true\"></S:entry></S:update-report>", 227) = 227
fstat(4, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
write(3, "REPORT /svn/perfbase/!svn/vcc/default HTTP/1.1\r\nHost:
perfbase.tigris.org\r\nUser-Agent: SVN/1.3.2 (r19776)
neon/0.24.7\r\nConnection: TE\r\nTE: trailers\r\nContent-Length:
0\r\nContent-Type: text/xml\r\nAccept-Encoding: gzip\r\nAccept-Encoding:
gzip\r\nAuthorization: Basic Z3Vlc3Q6\r\n\r\n", 271) = 271
select(4, [3], NULL, NULL, {3600, 0})   = 1 (in [3], left {3599, 785000})
read(3, "HTTP/1.1 400 Bad Request\r\nDate: Tue, 17 Oct 2006 11:08:38
GMT\r\nServer: Apache\r\nContent-Length: 295\r\nConnection:
close\r\nContent-Type: text/html; charset=iso-8859-1\r\n\r\n<!DOCTYPE
HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n<html><head>\n<title>400 Bad
Request</title>\n</head><body>\n<h1>Bad Request</h1>\n<p>Y"..., 4096) = 461

This means, svn writes to a file (here, 227 bytes) which in my setup is
mounted via NFS, and checks it's size directly afterwards. NFS returns
an outdated size (0 bytes), which then causes the error when used for
'Content-Length' in the REPORT request.

I know that the root cause is the client-side caching of NFS, but
wouldn't an fsync() after the write() help? Or some locking around the
access? IMHO, NFS is so widespread for working copy storage that svn 
should try to work around such problems or at least exit more gracefully.

  Joachim

-- 
Joachim Worringen, Software Architect, Dolphin Interconnect Solutions
phone ++49/(0)228/324 08 17 - http://www.dolphinics.com


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn checkout on NFS fails (missing fsync()?)

Posted by Malcolm Rowe <ma...@farside.org.uk>.
On Fri, Oct 27, 2006 at 05:41:32PM +0200, Joachim Worringen wrote:
> >This seems to be a specific problem in a few NFS clients - fstat() over
> >NFS normally works fine.
> >
> That seems to be the reason, thanks. We run CentOS 4.3 (Kernel 2.6.9-34) 
> on these boxes. Would an upgrade to 4.4 solve the problem? You see, I'm 
> not an expert in this Linux version jungle...
> 

I've no idea, I'm afraid -- you should talk to CentOS.  For reference,
their equivalent bug report appears to be here:

  http://bugs.centos.org/view.php?id=1367

Regards,
Malcolm

Re: svn checkout on NFS fails (missing fsync()?)

Posted by Joachim Worringen <jo...@dolphinics.com>.
Malcolm Rowe wrote:
> On Fri, Oct 20, 2006 at 08:55:19AM +0200, Joachim Worringen wrote:
>> I checked with strace and found this sequence being the culprit:
>>
>> This means, svn writes to a file (here, 227 bytes) which in my setup is
>> mounted via NFS, and checks it's size directly afterwards. NFS returns
>> an outdated size (0 bytes), which then causes the error when used for
>> 'Content-Length' in the REPORT request.
>>
> 
> This seems to be a specific problem in a few NFS clients - fstat() over
> NFS normally works fine.
> 
> For example, RHEL4U4 (but not RHEL4U3) and derived (CentOS, WBEL)
> kernels appear to have this problem, see:
> http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=194088
> 
> If that is the problem you're having, you may find that if you mount the
> filesystem with either the 'sync' or 'noac' mount options, things start
> working.

That seems to be the reason, thanks. We run CentOS 4.3 (Kernel 2.6.9-34) 
on these boxes. Would an upgrade to 4.4 solve the problem? You see, I'm 
not an expert in this Linux version jungle...

  regards, Joachim

-- 
Joachim Worringen, Software Architect, Dolphin Interconnect Solutions
phone ++49/(0)228/324 08 17 - http://www.dolphinics.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn checkout on NFS fails (missing fsync()?)

Posted by Malcolm Rowe <ma...@farside.org.uk>.
On Fri, Oct 20, 2006 at 08:55:19AM +0200, Joachim Worringen wrote:
> I checked with strace and found this sequence being the culprit:
> 
> This means, svn writes to a file (here, 227 bytes) which in my setup is
> mounted via NFS, and checks it's size directly afterwards. NFS returns
> an outdated size (0 bytes), which then causes the error when used for
> 'Content-Length' in the REPORT request.
> 

This seems to be a specific problem in a few NFS clients - fstat() over
NFS normally works fine.

For example, RHEL4U4 (but not RHEL4U3) and derived (CentOS, WBEL)
kernels appear to have this problem, see:
http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=194088

If that is the problem you're having, you may find that if you mount the
filesystem with either the 'sync' or 'noac' mount options, things start
working.

Regards,
Malcolm