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

Re: [PATCH] close racecondition with make -j in header_wrappers.py

From: Peter Samuelson <peter_at_p12n.org>
Date: Tue, 29 Jan 2008 14:15:42 -0600

[David Glasser]
> Ah, no wonder it fails for me if I put my swig commands under -j.
> I'm not too familiar with the SWIG generation process, though; can
> another commiter review this? Why would "make" be trying to write
> the same file multiple times anyway? That seems wrong.

From what I can see, it's not that the make process is writing the same
file multiple times: it is that the output files in question are
dependencies of other make targets. If your make is threaded, one
thread might notice a file's existence and decide to build other
targets that depend on it - even if another thread is still writing to
the original file. By writing to a different filename then renaming it
atomically, this won't happen.

...Though this does seem like it would be a common race condition with
all kinds of build processes. Perhaps 'make -j' tries to avoid the
situation, but is thwarted by recursive $(MAKE) invocation, or
something.

-- 
Peter Samuelson | org-tld!p12n!peter | http://p12n.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-01-29 21:15:58 CET

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