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

[prev] [thread] [next] [Date index for 2004/11/02]

From: Stas Bekman
Subject: Re: [mp2] test server cannot start as non-root user with worker mpm
Date: 23:35 on 02 Nov 2004
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@xxxxxx.xxx 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

(message missing)

Re: [mp2] test server cannot start as non-root user with worker mpm
Stas Bekman 23:35 on 02 Nov 2004

Generated at 11:26 on 21 Dec 2004 by mariachi v0.52