[distcc] A bug in distcc?

Martin Pool mbp at sourcefrog.net
Sat Sep 20 23:37:10 GMT 2003

On Sat, 20 Sep 2003 13:21:04 -0400
Lisa Seelye <lisa at gentoo.org> wrote:

> I've seen some very weird behavior while integrating distcc with
> Portage.
> We've made a patch to Portage[1] to extend the way that Portage works
> with distcc.  In a nutshell, the patch provides DISTCC_DIR envvar and
> also creates the directory for use by distcc for state and lock files
> and chown's portage:portage them.

Why do you make the directories setuid?  Does that even do anything?

> The bug comes into play when Distcc tries to write the lock files:
> distcc[8182] (dcc_open_lockfile) ERROR: failed to creat
> /var/tmp/portage/.distcc/lock/cpu_localhost_0: Permission denied
> distcc[8182] (dcc_lock_one) ERROR: failed to lock

> But, the lock file _was_ created; and the monitors work.

Are you *sure* the lock file was created by the distcc process?
(i.e., can you delete the lockfile, run distcc, and then show that it
has been created?)  That seems extremely unlikely.  Perhaps they were
created by some other process?

What uid does distcc run as when run by portage?  What are the
permissions on the lock files and all their parent directories?

My guess would be that one of those files is owned by root.

> I emerged distcc as a test and the log is online at my website[2].


More information about the distcc mailing list