[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: attn: ghudson; FSFS and multi-threading on Unix broken?

From: Greg Hudson <ghudson_at_MIT.EDU>
Date: 2005-04-05 17:39:49 CEST

On Tue, 2005-04-05 at 11:27, Mark Phippard wrote:
> I think it is possible that this could effect the OS/400 port, but I am
> not sure how I could tell. OS/400 is Unix-like and supports POSIX, but it
> does not support fork(). svnserve runs multi-threaded and does not spawn
> any additional processes. Would this mean that we would be exposed to
> this sort of error? If so, how would it manifest?

The problem would manifest when two commits happening within the same
process are finalized at the same time. (Finalization begins when the
client has finished transmitting all of its data. At this point, all
the file deltas have already been computed and the transaction has been
auto-merged against the head if necessary. The finalization process is:
grab the write lock, choose a new revision number, marshal the changed
directory data into the new proto-rev file, and move the new rev file
into place.) It's hard to say exactly what would go wrong, but most
likely one of the commits would be obliterated by the other.

> We use fsfs exclusively in the OS/400 port with either svnserve or
> mod_dav_svn for the server. Wouldn't mod_dav_svn also potentially have
> this problem? Apache also runs threaded.

Possibly. In that case, we may be merely getting lucky by virtue of
finalization being quick.

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Apr 5 17:46:50 2005

This is an archived mail posted to the Subversion Dev mailing list.