Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 35477 - distcc-2.11.2-r1 can't create pid file due to permissions
Summary: distcc-2.11.2-r1 can't create pid file due to permissions
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Lisa Seelye (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-09 13:56 UTC by Danny
Modified: 2004-01-09 09:34 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Danny 2003-12-09 13:56:20 UTC
When I start distcc (2.11.2-r1) it give an error in the log file siting 
permissions as the problem.  This means runscript always thinks distccd is not 
running.  I can't stop it and if you try to start it, it trys and fails.  
Perhaps distccd is changing user id to distcc before creating its pid file?

Here is a quick ls of the run dir:
ls -la /var/run/distccd
total 0
drwxr-xr-x    2 root     root           60 Dec  7 11:39 ./
drwxrwxrwt    7 root     root          400 Dec  7 12:54 ../
-rw-r--r--    1 root     root            0 Dec  7 11:39 .keep

Reproducible: Always
Steps to Reproduce:
1. /etc/init.d/distccd start
2. grep your logs for distcc (grep distcc /var/log/everything/current)

Actual Results:  
I truncated dcc_setup_daemon_path because its so long

[distccd] (dcc_setup_daemon_path) daemon's PATH is ...
[distccd] (dcc_should_be_inetd) stdin is a tty; assuming --daemon mode
[distccd] (dcc_listen_by_addr) listening on 0.0.0.0:3632
[distccd] (dcc_standalone_server) 1 CPU online on this server
[distccd] (dcc_standalone_server) allowing up to 3 active jobs
[distccd] (dcc_save_pid) ERROR: failed to open pid file: 
/var/run/distccd/distccd.pid: Permission denied
[distccd] (dcc_log_daemon_started) preforking daemon started (2.11.2 
i686-pc-linux-gnu, built Dec  7 2003 11:39:05)

Expected Results:  
It should have created the distccd.pid file.  Also note that in the emerge info 
section below it thinks distcc is disabled, when it is in fact running.

Portage 2.0.49-r15 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r3, 2.4.22)
=================================================================
System uname: 2.4.22 i686 AMD Athlon(tm) processor
Gentoo Base System version 1.4.3.10p1
distcc 2.11.2 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) 
[disabled]
ccache version 2.3 [enabled]
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon-tbird -O3 -pipe -fomit-frame-pointer 
-momit-leaf-frame-pointer"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config 
/usr/kde/3/share/config /var/bind /usr/X11R6/lib/X11/xkb /usr/kde/3.
1/share/config /usr/share/texmf/tex/generic/config/ 
/usr/share/texmf/tex/platex/config/ /usr/share/config"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-march=athlon-tbird -O3 -pipe -fomit-frame-pointer 
-momit-leaf-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs sandbox ccache"
GENTOO_MIRRORS="http://gentoo.oregonstate.edu/ http://sunsite.ualberta.
ca/pub/unix/Linux/gentoo http://www.ibiblio.org/pub/Linux/distributions/gentoo 
http://csociety-ftp.ecn.purdue.edu/pub/gentoo/ ftp://ftp.gtlib.cc.gatech.
edu/pub/gentoo http://cs.ubishops.ca/pub/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="x86 oss encode foomaticdb gif libg++ mad mikmod spell slang tetex guile gpm 
pam motif 3dfx 3dnow aalib alsa apache2 apm arts avi berkdb crypt cups dga 
directfb dvd -esd gdbm -gnome gtk gtk2 imap imlib java jikes jpeg kde leim 
libwww maildir mmx mpeg nas ncurses nls objc oggvorbis opengl pdflib perl png 
python qt quicktime readline samba sdl smooth sse ssl tcltk tcpd tiff truetype 
usb voodoo3 svga wmf X xml xml2 xmms xv zlib"
Comment 1 Danny 2003-12-09 16:07:57 UTC
Just thought I'd add that my comment about "emerge info" saying distcc was disabled is not related to whether or not distccd is running, but if portage is set to use it.  So this isn't a problem as I had guessed and is unrelated to the permissions bug.
Comment 2 Lisa Seelye (RETIRED) gentoo-dev 2003-12-09 16:14:21 UTC
Thank you. I will take a look at this and see what's up.
Comment 3 Lisa Seelye (RETIRED) gentoo-dev 2003-12-31 09:52:10 UTC
Not sure how your installation got fubared, but try:

chown -R distcc:daemon /var/run/distccd
Comment 4 Lisa Seelye (RETIRED) gentoo-dev 2004-01-04 10:09:42 UTC
Does this still cause issues?  Did the chown line in comment 3 help?
Comment 5 Danny 2004-01-04 16:22:15 UTC
Yeah this seems to have fixed the issue, not sure how it's permissions got messed up in the first place.  The ebuild was ~x86 after all, so perhaps I just installed it at the wrong time.
Comment 6 Lisa Seelye (RETIRED) gentoo-dev 2004-01-09 09:34:22 UTC
Seems to work now... Rubber chicken effect, I'm guessing.