You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Cory Omand <Co...@Sun.COM> on 2004/11/02 23:38:36 UTC

[mp2] test server cannot start as non-root user with worker mpm

-------------8<---------- Start Bug Report ------------8<----------
1. Problem Description:

When running 'make test' as a non-root user, apache fails to create the
default AcceptMutex.  All tests fail, and the following is output to the
error_log:

[Tue Nov 02 17:16:22 2004] [emerg] (13)Permission denied: Couldn't
create accept lock
END in modperl_extra.pl, pid=3402
Attempt to free unreferenced scalar: SV 0xdf3062dc at
/opt/csw/share/perl/5.8.2/Test/Harness.pm line 31.
END in modperl_extra.pl, pid=3402
Attempt to free unreferenced scalar: SV 0xdf3062dc at
/opt/csw/share/perl/5.8.2/Test/Harness.pm line 31.

The default AcceptMutex for Apache 2.0.52 is 'fcntl'.  Changing this to
a mutex type that does not require any filesystem permissions, like
'pthread',
allows the tests to start properly:

mod_perl-1.99_17/t/conf/httpd.conf:
<IfModule worker.c>
    StartServers         1
    MinSpareThreads      2
    MaxSpareThreads      2
    ThreadsPerChild      2
    MaxClients           4
    MaxRequestsPerChild  0
    AcceptMutex          pthread  <--- add this
</IfModule>

2. Used Components and their Configuration:

*** mod_perl version 1.9917

*** using
/export/medusa/comand/csw/cpan/mod_perl2/work/i386.d/mod_perl-1.99_17/lib/Apache/BuildConfig.pm

*** Makefile.PL options:
  MP_APR_CONFIG     => /opt/csw/bin/apr-config
  MP_APR_LIB        => aprext
  MP_APXS           => /opt/csw/apache2/sbin/apxs
  MP_COMPAT_1X      => 1
  MP_DEBUG          => 1
  MP_GENERATE_XS    => 1
  MP_INST_APACHE2   => 1
  MP_LIBNAME        => mod_perl
  MP_PROMPT_DEFAULT => 1
  MP_TRACE          => 1
  MP_USE_DSO        => 1


*** /opt/csw/apache2/sbin/httpd -V
Server version: Apache/2.0.52
Server built:   Oct 29 2004 15:08:47
Server's Module Magic Number: 20020903:9
Architecture:   32-bit
Server compiled with....
 -D APACHE_MPM_DIR="server/mpm/worker"
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_FCNTL_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D HTTPD_ROOT="/opt/csw/apache2"
 -D SUEXEC_BIN="/opt/csw/apache2/sbin/suexec"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="etc/mime.types"
 -D SERVER_CONFIG_FILE="etc/httpd.conf"


*** (apr|apu)-config linking info

 -L/opt/csw/apache2/lib -lapr-0 -lsendfile -lrt -lm -lsocket -lnsl
-lresolv  -lpthread -ldl
 -L/opt/csw/apache2/lib -laprutil-0 -lldap -llber -lgdbm -ldb-4.1
-lexpat -liconv



*** /opt/csw/bin/perl -V
Summary of my perl5 (revision 5.0 version 8 subversion 2) configuration:
  Platform:
    osname=solaris, osvers=2.8, archname=i86pc-solaris-thread-multi
    uname='sunos daedal 5.8 generic_117351-03 i86pc i386 i86pc '
    config_args='-Dcc=cc -Dusethreads -Dcf_email=thomas@blastwave.org
-Dperladmin=root@localhost -Dlocincpth=/opt/csw/include
-Dloclibpth=/opt/csw/lib -Duselargefiles -Dprefix=/opt/csw
-Dprivlib=/opt/csw/share/perl/5.8.2 -Darchlib=/opt/csw/lib/perl/5.8.2
-Dvendorprefix=/opt/csw -Dvendorlib=/opt/csw/share/perl/csw
-Dvendorarch=/opt/csw/lib/perl/csw -Dsiteprefix=/usr
-Dsitelib=/opt/csw/share/perl/site_perl
-Dsitearch=/opt/csw/lib/perl/site_perl -Dman1dir=/opt/csw/share/man/man1
-Dman3dir=/opt/csw/share/man/man3 -Dsiteman1dir=/opt/csw/share/man/man1
-Dsiteman3dir=/opt/csw/share/man/man3 -Dman1ext=1 -Dman3ext=3perl -Uafs
-Ud_csh -Uusesfio -Uusenm -des'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=define use5005threads=undef useithreads=define
usemultiplicity=define
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-D_REENTRANT -I/opt/csw/include
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O',
    cppflags='-D_REENTRANT -I/opt/csw/include'
    ccversion='Sun C 5.5 Patch 112761-09 2004/06/08', gccversion='',
gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
    alignbytes=4, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/lib -L/usr/ccs/lib
-L/opt/forte8/SUNWspro/prod/lib -L/opt/csw/lib '
    libpth=/usr/lib /usr/ccs/lib /opt/forte8/SUNWspro/prod/lib
/opt/csw/lib
    libs=-lsocket -lnsl -lgdbm -ldb -ldl -lm -lpthread -lc
    perllibs=-lsocket -lnsl -ldl -lm -lpthread -lc
    libc=, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
    cccdlflags='-KPIC', lddlflags='-G -L/usr/lib -L/usr/ccs/lib
-L/opt/forte8/SUNWspro/prod/lib -L/opt/csw/lib'


Characteristics of this binary (from libperl): 
  Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES
PERL_IMPLICIT_CONTEXT
  Built under solaris
  Compiled at Aug 15 2004 06:32:18
  %ENV:
    PERL_LWP_USE_HTTP_10="1"
  @INC:
    /opt/csw/lib/perl/site_perl
    /opt/csw/share/perl/site_perl
    /opt/csw/share/perl/site_perl
    /opt/csw/lib/perl/csw
    /opt/csw/share/perl/csw
    /opt/csw/share/perl/csw
    /opt/csw/lib/perl/5.8.2
    /opt/csw/share/perl/5.8.2
    .

*** Packages of interest status:

Apache::Request: -
CGI            : 3.00
LWP            : 5.76
mod_perl       : -


3. This is the core dump trace: (if you get a core dump):

  [CORE TRACE COMES HERE]

This report was generated by t/REPORT on Tue Nov  2 22:31:15 2004 GMT.

-------------8<---------- End Bug Report --------------8<----------

Note: Complete the rest of the details and post this bug report to
modperl <at> perl.apache.org. To subscribe to the list send an empty
email to modperl-subscribe@perl.apache.org.

-- 
Cory Omand <Co...@Sun.COM>


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: [mp2] test server cannot start as non-root user with worker mpm

Posted by Stas Bekman <st...@stason.org>.
Stas Bekman wrote:
[...]
>> I've added this into TestConfig.pm, and am testing right now...
>>
>> <IfModule !mpm_winnt.c> <IfModule !mpm_netware.c>
>>     Lockfile @t_logs@/accept.lock
>> </IfModule>
>> </IfModule>
> 
> 
> OK, let us know if that has worked. I hope we can add that for any mpm, 
> and not just netware, since LockFile seems to be a global core option. 
> Am I right?

Not sure, why you didn't followup, Cory, but I've now added a global 
Lockfile directive to A-T, so it should appear in the next release (A-T-1.17).


-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: [mp2] test server cannot start as non-root user with worker mpm

Posted by Stas Bekman <st...@stason.org>.
Cory Omand wrote:
[...]
>>Oh, you mean we were talking about LockFile all this time, which is wrong 
>>when run under non-root user, right? So your global httpd.conf has:
>>
>>LockFile logs/accept.lock
> 
> 
> No, my global httpd.conf doesn't have an active LockFile directive
> (there is one in there, but it's commented out by default).  I think the
> issue is that my server is compiled to store logs in var/log/*_log,
> rather than 'logs/*'.  The path to logs during the test is overridden to
> be 'logs/', relative to the 't' directory, but LockFile (and maybe other
> directives that would write into the log directory) attempts to create
> the lock as 'var/log/accept.lock'.  Obviously this cannot succeed, as
> there is no 'var' directory in there.
> 
> 
>>which is picked by Apache-Test and put into t/conf/httpd.conf? In which 
>>case we should rewrite this setting to point to:
>>
>>LockFile @t_logs@/accept.lock
> 
> 
> I've added this into TestConfig.pm, and am testing right now...
> 
> <IfModule !mpm_winnt.c> 
> <IfModule !mpm_netware.c>
>     Lockfile @t_logs@/accept.lock
> </IfModule>
> </IfModule>

OK, let us know if that has worked. I hope we can add that for any mpm, 
and not just netware, since LockFile seems to be a global core option. Am 
I right?

-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: [mp2] test server cannot start as non-root user with worker mpm

Posted by Cory Omand <Co...@Sun.COM>.
On Tue, 2004-11-02 at 17:43, Stas Bekman wrote:
> Cory Omand wrote:
> > On Tue, 2004-11-02 at 16:19, Stas Bekman wrote:
> > 
> >>Does your global httpd.conf has an AcceptMutex entry which specifies a 
> >>location which is only root accessible? So A-T should probably detect that 
> >>and rewrite the path to something local (e.g. t/logs/acceptmutex)?
> > 
> > 
> > The global httpd.conf file, which is the default file distributed with
> > apache 2.0.52, does not have an AcceptMutex or LockFile entry.  By
> > default 'LockFile' points to 'logs/accept.lock' (per the apache 2.0
> > docs).  My fix to get the mp2 tests to start was to patch the
> > @THREAD_MODULE@ section of 'Apache-Test/lib/Apache/TestConfig.pm' to set
> > 'AcceptMutex pthread'.  That's not going to be a good solution, as there
> > is no guarantee that everyone else has pthread mutexes.
> 
> that's correct.
> 
> >  I'm also not
> > familiar enough with A-T to know if there's a global variable that
> > points to the local logging directory (e.g. where mp2 writes the
> > error_log).
> 
> it's @t_logs@
> 
> >  Assuming that this variable is available as @APACHE_LOGS@,
> > it would be possible to set 'LockFile @APACHE_LOGS@/accept.lock' in the
> > @THREAD_MODULE@ section...
> 
> Oh, you mean we were talking about LockFile all this time, which is wrong 
> when run under non-root user, right? So your global httpd.conf has:
> 
> LockFile logs/accept.lock

No, my global httpd.conf doesn't have an active LockFile directive
(there is one in there, but it's commented out by default).  I think the
issue is that my server is compiled to store logs in var/log/*_log,
rather than 'logs/*'.  The path to logs during the test is overridden to
be 'logs/', relative to the 't' directory, but LockFile (and maybe other
directives that would write into the log directory) attempts to create
the lock as 'var/log/accept.lock'.  Obviously this cannot succeed, as
there is no 'var' directory in there.

> which is picked by Apache-Test and put into t/conf/httpd.conf? In which 
> case we should rewrite this setting to point to:
> 
> LockFile @t_logs@/accept.lock

I've added this into TestConfig.pm, and am testing right now...

<IfModule !mpm_winnt.c> 
<IfModule !mpm_netware.c>
    Lockfile @t_logs@/accept.lock
</IfModule>
</IfModule>


Regards,
Cory.


-- 
Cory Omand <Co...@Sun.COM>


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: [mp2] test server cannot start as non-root user with worker mpm

Posted by Stas Bekman <st...@stason.org>.
Cory Omand wrote:
> On Tue, 2004-11-02 at 16:19, Stas Bekman wrote:
> 
>>Does your global httpd.conf has an AcceptMutex entry which specifies a 
>>location which is only root accessible? So A-T should probably detect that 
>>and rewrite the path to something local (e.g. t/logs/acceptmutex)?
> 
> 
> The global httpd.conf file, which is the default file distributed with
> apache 2.0.52, does not have an AcceptMutex or LockFile entry.  By
> default 'LockFile' points to 'logs/accept.lock' (per the apache 2.0
> docs).  My fix to get the mp2 tests to start was to patch the
> @THREAD_MODULE@ section of 'Apache-Test/lib/Apache/TestConfig.pm' to set
> 'AcceptMutex pthread'.  That's not going to be a good solution, as there
> is no guarantee that everyone else has pthread mutexes.

that's correct.

>  I'm also not
> familiar enough with A-T to know if there's a global variable that
> points to the local logging directory (e.g. where mp2 writes the
> error_log).

it's @t_logs@

>  Assuming that this variable is available as @APACHE_LOGS@,
> it would be possible to set 'LockFile @APACHE_LOGS@/accept.lock' in the
> @THREAD_MODULE@ section...

Oh, you mean we were talking about LockFile all this time, which is wrong 
when run under non-root user, right? So your global httpd.conf has:

LockFile logs/accept.lock

which is picked by Apache-Test and put into t/conf/httpd.conf? In which 
case we should rewrite this setting to point to:

LockFile @t_logs@/accept.lock

but since the server starts from t/, logs/accept.lock should already point 
there. Or does your global httpd.conf has a hardcoded full path to LockFile?


-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: [mp2] test server cannot start as non-root user with worker mpm

Posted by Cory Omand <Co...@Sun.COM>.
On Tue, 2004-11-02 at 16:19, Stas Bekman wrote:
> Does your global httpd.conf has an AcceptMutex entry which specifies a 
> location which is only root accessible? So A-T should probably detect that 
> and rewrite the path to something local (e.g. t/logs/acceptmutex)?

The global httpd.conf file, which is the default file distributed with
apache 2.0.52, does not have an AcceptMutex or LockFile entry.  By
default 'LockFile' points to 'logs/accept.lock' (per the apache 2.0
docs).  My fix to get the mp2 tests to start was to patch the
@THREAD_MODULE@ section of 'Apache-Test/lib/Apache/TestConfig.pm' to set
'AcceptMutex pthread'.  That's not going to be a good solution, as there
is no guarantee that everyone else has pthread mutexes.  I'm also not
familiar enough with A-T to know if there's a global variable that
points to the local logging directory (e.g. where mp2 writes the
error_log).  Assuming that this variable is available as @APACHE_LOGS@,
it would be possible to set 'LockFile @APACHE_LOGS@/accept.lock' in the
@THREAD_MODULE@ section...

Regards,
Cory.


-- 
Cory Omand <Co...@Sun.COM>


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: [mp2] test server cannot start as non-root user with worker mpm

Posted by Stas Bekman <st...@stason.org>.
Cory Omand wrote:
[... explanation snipped ...]
> Does the above clarify where I'm coming from?

Yes, thanks for the explanation, Cory. Now I more or less understand what 
is the problem.

Does your global httpd.conf has an AcceptMutex entry which specifies a 
location which is only root accessible? So A-T should probably detect that 
and rewrite the path to something local (e.g. t/logs/acceptmutex)?

Or do you have a better idea?

-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: [mp2] test server cannot start as non-root user with worker mpm

Posted by Cory Omand <Co...@Sun.COM>.
On Tue, 2004-11-02 at 15:35, Stas Bekman wrote:
> Cory Omand wrote:
> 
> [First of all, don't forget to reply-all, when following up on list's 
> threads. Thanks.]

Sorry -- force of habit.

> >>It has nothing to do with either A-T or mod_perl, A-T just per-uses the 
> >>globally installed httpd.conf for its configuration. So the problem is 
> >>there. Change that file (you can see exactly which one by running t/TEST 
> >>-conf -trace=debug) to do the right thing and everything will work just fine.
> > 
> > 
> > The globally installed configuration on my build system does not change
> > the default AcceptMutex.  If I add 'AcceptMutex pthread', in
> > Apache::TestConfig, then t/conf/httpd.conf will contain this line. 
> > Running TEST -conf as you suggested above does indicate that the global
> > configuration is 'inherited' for the test, and loads all of the
> > appropriate modules...
> > 
> > At any rate, should TestConfig not generate a config which relies only
> > on paths that are writable by the current user?  Shouldn't directives
> > that rely on filesystem access (scoreboards, mutexes, etc) create/access
> > files only under 't' when running configs created by A-T (e.g. setting
> > 'LockFile' for threaded MPMs)?
> 
> But Apache-Test does not add any of those directives!

I'm not sure we're talking about the same thing here...  I am talking
about the httpd.conf that gets generated during 'make test' for mp2
1.99_17.  The module Apache::TestConfig included with mp2 appears to be
generating parts of the file 't/conf/httpd.conf', specifically the block
that starts '<IfModule worker.c>', as my httpd binary is built using the
worker MPM.

> Ideally A-T should have no such special case knowledge since it makes 
> things a way too complicated to maintain and introduces lots of problems.

I understand that A-T itself should not have any knowledge of the system
it's testing -- but the specific implementation of tests for mp2
should...  If it's possible to run the tests for mp2 as a non-root user,
it really makes no sense to assume the non-root user can start up the
default apache configuration, does it?

> It goes along these lines: You should be able to start Apache w/o 
> mod_perl, i.e. your global httpd.conf should be correct. When this works, 
> Apache-Test will use that config file to get the configuration for the 
> modperl (and any other) tests, adding extra things on top.

It is correct, as root is able to start apache 2 without mod_perl.  I
cannot start apache with the global configuration because the default
paths for apache logs, acceptmutex, etc. are not writable by anyone but
root.

> So the solution here is to fix your global httpd.conf and the rest will 
> work. Does that do the trick for you?

Does the above clarify where I'm coming from?

Regards,
Cory.


-- 
Cory Omand <Co...@Sun.COM>


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: [mp2] test server cannot start as non-root user with worker mpm

Posted by Stas Bekman <st...@stason.org>.
Cory Omand wrote:

[First of all, don't forget to reply-all, when following up on list's 
threads. Thanks.]

> On Tue, 2004-11-02 at 14:44, Stas Bekman wrote:
> 
>>Cory Omand wrote:
>>
>>>-------------8<---------- Start Bug Report ------------8<----------
>>>1. Problem Description:
>>>
>>>When running 'make test' as a non-root user, apache fails to create the
>>>default AcceptMutex.  All tests fail, and the following is output to the
>>>error_log:
>>>
>>>[Tue Nov 02 17:16:22 2004] [emerg] (13)Permission denied: Couldn't
>>>create accept lock
>>>END in modperl_extra.pl, pid=3402
>>>Attempt to free unreferenced scalar: SV 0xdf3062dc at
>>>/opt/csw/share/perl/5.8.2/Test/Harness.pm line 31.
>>>END in modperl_extra.pl, pid=3402
>>>Attempt to free unreferenced scalar: SV 0xdf3062dc at
>>>/opt/csw/share/perl/5.8.2/Test/Harness.pm line 31.
>>>
>>>The default AcceptMutex for Apache 2.0.52 is 'fcntl'.  Changing this to
>>>a mutex type that does not require any filesystem permissions, like
>>>'pthread',
>>>allows the tests to start properly:
>>
>>It has nothing to do with either A-T or mod_perl, A-T just per-uses the 
>>globally installed httpd.conf for its configuration. So the problem is 
>>there. Change that file (you can see exactly which one by running t/TEST 
>>-conf -trace=debug) to do the right thing and everything will work just fine.
> 
> 
> The globally installed configuration on my build system does not change
> the default AcceptMutex.  If I add 'AcceptMutex pthread', in
> Apache::TestConfig, then t/conf/httpd.conf will contain this line. 
> Running TEST -conf as you suggested above does indicate that the global
> configuration is 'inherited' for the test, and loads all of the
> appropriate modules...
> 
> At any rate, should TestConfig not generate a config which relies only
> on paths that are writable by the current user?  Shouldn't directives
> that rely on filesystem access (scoreboards, mutexes, etc) create/access
> files only under 't' when running configs created by A-T (e.g. setting
> 'LockFile' for threaded MPMs)?

But Apache-Test does not add any of those directives!

Ideally A-T should have no such special case knowledge since it makes 
things a way too complicated to maintain and introduces lots of problems.

It goes along these lines: You should be able to start Apache w/o 
mod_perl, i.e. your global httpd.conf should be correct. When this works, 
Apache-Test will use that config file to get the configuration for the 
modperl (and any other) tests, adding extra things on top.

So the solution here is to fix your global httpd.conf and the rest will 
work. Does that do the trick for you?


-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: [mp2] test server cannot start as non-root user with worker mpm

Posted by Stas Bekman <st...@stason.org>.
Cory Omand wrote:
> -------------8<---------- Start Bug Report ------------8<----------
> 1. Problem Description:
> 
> When running 'make test' as a non-root user, apache fails to create the
> default AcceptMutex.  All tests fail, and the following is output to the
> error_log:
> 
> [Tue Nov 02 17:16:22 2004] [emerg] (13)Permission denied: Couldn't
> create accept lock
> END in modperl_extra.pl, pid=3402
> Attempt to free unreferenced scalar: SV 0xdf3062dc at
> /opt/csw/share/perl/5.8.2/Test/Harness.pm line 31.
> END in modperl_extra.pl, pid=3402
> Attempt to free unreferenced scalar: SV 0xdf3062dc at
> /opt/csw/share/perl/5.8.2/Test/Harness.pm line 31.
> 
> The default AcceptMutex for Apache 2.0.52 is 'fcntl'.  Changing this to
> a mutex type that does not require any filesystem permissions, like
> 'pthread',
> allows the tests to start properly:

It has nothing to do with either A-T or mod_perl, A-T just per-uses the 
globally installed httpd.conf for its configuration. So the problem is 
there. Change that file (you can see exactly which one by running t/TEST 
-conf -trace=debug) to do the right thing and everything will work just fine.

Please let us know if that was indeed the case.


-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html