You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by J Matisse Enzer <ma...@matisse.net> on 2005/04/25 20:32:07 UTC

Bus error on Mac OS X 10.3.9 while configuring mod_perl-2.0.0-RC5

Got a "Bus error" while configuring  mod_perl2/1.999.22 
(mod_perl-2.0.0-RC5)
This is on Mac OS X 10.3.9, Perl 5.8.1, with Apache 2.0.52

Here's the complete output:

matisse@g5-imac mod_perl-2.0.0-RC5: perl Makefile.PL 
MP_APXS=/usr/local/apache2/bin/apxs PREFIX=/usr/local
Reading Makefile.PL args from @ARGV
    MP_APXS = /usr/local/apache2/bin/apxs
mod_perl/1.26 installation detected...ok (will install 
mod_perl/1.999.22 into PREFIX=/usr/local, no collision)
Configuring Apache/2.0.52 mod_perl2/1.999.22 Perl/v5.8.1
Checking if your kit is complete...
Looks good
[   info] generating script t/TEST
[   info] generating script ./t/cgi-bin/cookies.pl
Writing Makefile for Apache::Test
Checking for File::Spec...ok
Checking for Cwd...ok
[   info] generating script t/TEST
Checking if your kit is complete...
Looks good
Writing Makefile for ModPerl::Registry
Writing Makefile for APR::Base64
Writing Makefile for APR::Brigade
Writing Makefile for APR::Bucket
Writing Makefile for APR::BucketAlloc
Writing Makefile for APR::BucketType
Writing Makefile for APR::Date
Writing Makefile for APR::Error
Writing Makefile for APR::Finfo
Writing Makefile for APR::IpSubnet
Writing Makefile for APR::OS
Writing Makefile for APR::Pool
Writing Makefile for APR::SockAddr
Writing Makefile for APR::Socket
Writing Makefile for APR::String
Writing Makefile for APR::Table
Writing Makefile for APR::ThreadMutex
Writing Makefile for APR::URI
Writing Makefile for APR::UUID
Writing Makefile for APR::Util
Writing Makefile for APR
Writing Makefile for Apache2::Access
Writing Makefile for Apache2::CmdParms
Writing Makefile for Apache2::Command
Writing Makefile for Apache2::Connection
Writing Makefile for Apache2::Directive
Writing Makefile for Apache2::Filter
Writing Makefile for Apache2::FilterRec
Writing Makefile for Apache2::HookRun
Writing Makefile for Apache2::Log
Writing Makefile for Apache2::MPM
Writing Makefile for Apache2::Module
Writing Makefile for Apache2::Process
Writing Makefile for Apache2::RequestIO
Writing Makefile for Apache2::RequestRec
Writing Makefile for Apache2::RequestUtil
Writing Makefile for Apache2::Response
Writing Makefile for Apache2::ServerRec
Writing Makefile for Apache2::ServerUtil
Writing Makefile for Apache2::SubProcess
Writing Makefile for Apache2::SubRequest
Writing Makefile for Apache2::URI
Writing Makefile for Apache2::Util
Writing Makefile for Apache2
Writing Makefile for ModPerl::Global
Writing Makefile for ModPerl::Util
Writing Makefile for ModPerl
Writing Makefile for ModPerl::WrapXS
Writing Makefile for APR
Writing Makefile for APR::Const
Writing Makefile for APR::PerlIO
Writing Makefile for libaprext
Writing Makefile for APR_build
Writing Makefile for Apache2::Const
Writing Makefile for Apache2_build
Writing Makefile for ModPerl::Const
Writing Makefile for ModPerl
Writing Makefile for ModPerl::XS
Bus error


-------------------------------------------------------
Matisse Enzer <ma...@matisse.net>
http://www.matisse.net/  - http://www.eigenstate.net/
415-225-6703 (work/cellphone)
415-401-8325 (home)


Re: Bus error on Mac OS X 10.3.9 while configuring mod_perl-2.0.0-RC5

Posted by OpenMacNews <Op...@speakeasy.net>.
hi matisse,

> Thanks - I will try the later mod_perl and apache 2.

also, fwiw, my apache2 & perl configs follow; note, in particular, threading ...

APACHE2:
    ./configure \
    --enable-layout=custom --with-port=80 \
    --with-mpm=worker \
    --with-apr=/usr/local/apache2 \
    --with-apr-util=/usr/local/apache2 \
    --enable-mods-shared=all --disable-static \
    --enable-so \
    --disable-auth-digest \
    --disable-suexec \
    --with-z \
    --enable-cgi \
    --enable-dav --enable-dav-fs --enable-dav-lock \
    --enable-ssl --with-ssl=/usr/local/ssl \
    --enable-authn-dbm --enable-authz-dbm \
    --with-berkeley-db=/usr/local/berkeley-db \
    --with-pcre=/usr/local/pcre50/ \
    --enable-proxy \
    --enable-proxy-connect \
    --enable-proxy-ftp \
    --enable-proxy-http \
    --enable-logio \
    --with-imap

    % httpd -l
        Compiled in modules:
          core.c
          worker.c
          http_core.c
          mod_so.c
    % httpd -V
    Server version: Apache/2.1.5-dev
    Server built:   Apr  7 2005 14:57:22
    Server's Module Magic Number: 20050305:0
    Architecture:   32-bit
    Server MPM:     Worker
      threaded:     yes (fixed thread count)
        forked:     yes (variable process count)
    Server compiled with....
     -D APACHE_MPM_DIR="server/mpm/worker"
     -D APR_HAS_MMAP
     -D APR_USE_SYSVSEM_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="/usr/local/apache2"
     -D SUEXEC_BIN="/usr/local/apache2/bin/suexec"
     -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
     -D DEFAULT_ERRORLOG="logs/error_log"
     -D AP_TYPES_CONFIG_FILE="/var/settings/Apache2/mime.types"
     -D SERVER_CONFIG_FILE="/var/settings/Apache2/httpd.conf"


PERL5:
% perl -V
    (revision 5 version 8 subversion 6) configuration:
      Platform:
        osname=darwin, osvers=7.8.0, archname=darwin-thread-multi-2level
        uname='darwin tiedgar.internal.presence-group.net 7.8.0 darwin kernel
        version 7.8.0: wed dec 22 14:26:17 pst 2004;
        root:xnuxnu-517.11.1.obj~1release_ppc power macintosh powerpc '
        config_args='-Dfirstmakefile=GNUmakefile -Dprefix=/usr/local/perl5
        -Dloclibpth=/usr/local/berkeley-db/lib /usr/local/lib /usr/lib
        -Dlocincpth=/usr/local/berkeley-db/include /usr/local/include
        /usr/include -Dldflags=-L/usr/local/berkeley-db/lib -L/usr/local/lib
        -L/usr/lib -Dperllibs=-ldb -lc -lm -dl -Dlibs=-ldb -lc -lm -ldl
        -Dinstallusrbinperl -Duseshrplib -Duseperlio -Duseithreads'
        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 ='-fno-common -DPERL_DARWIN -no-cpp-precomp
        -fno-strict-aliasing -pipe -I/usr/local/berkeley-db/include
        -I/usr/local/include', optimize='-Os',
        cppflags='-no-cpp-precomp -fno-common -DPERL_DARWIN -no-cpp-precomp
        -fno-strict-aliasing -pipe -I/usr/local/berkeley-db/include
        -I/usr/local/include' ccversion='', gccversion='3.3 20030304 (Apple
        Computer, Inc. build 1671)', gccosandvers='' intsize=4, longsize=4,
        ptrsize=4, doublesize=8, byteorder=4321
        d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
        ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
        lseeksize=8 alignbytes=8, prototype=define
      Linker and Libraries:
        ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc', ldflags
        ='-L/usr/local/berkeley-db/lib -L/usr/local/lib -L/usr/lib'
        libpth=/usr/local/berkeley-db/lib /usr/local/lib /usr/lib /lib
        libs=-ldb -lc -lm -ldl
        perllibs=-lc -lm -ldl
        libc=/usr/lib/libc.dylib, so=dylib, useshrplib=true,
        libperl=libperl.dylib gnulibc_version=''
      Dynamic Linking:
        dlsrc=dl_dyld.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
        cccdlflags=' ', lddlflags='-L/usr/local/berkeley-db/lib
        -L/usr/local/lib -L/usr/lib -bundle -undefined dynamic_lookup'

    Characteristics of this binary (from libperl):
      Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES
    PERL_IMPLICIT_CONTEXT
      Built under darwin
      Compiled at Mar 11 2005 21:39:01

> I'm not sure I want to
> ditch the old mp1 installation, since it might be used at some point by
> Apple's installed apache 1.3.x.

fair point.  i never use apple's install, so haven't noticed any issues as yet 
...

g'luck!

richard


Re: Bus error on Mac OS X 10.3.9 while configuring mod_perl-2.0.0-RC5

Posted by OpenMacNews <Op...@speakeasy.net>.
hi matisse,

> Got a "Bus error" while configuring  mod_perl2/1.999.22 (mod_perl-2.0.0-RC5)
> This is on Mac OS X 10.3.9, Perl 5.8.1, with Apache 2.0.52
>
> Here's the complete output:
>
> matisse@g5-imac mod_perl-2.0.0-RC5: perl Makefile.PL
> MP_APXS=/usr/local/apache2/bin/apxs PREFIX=/usr/local
> Reading Makefile.PL args from @ARGV
>     MP_APXS = /usr/local/apache2/bin/apxs
> mod_perl/1.26 installation detected...ok (will install mod_perl/1.999.22 into
> PREFIX=/usr/local, no collision)
> Configuring Apache/2.0.52 mod_perl2/1.999.22 Perl/v5.8.1
... <snip> ...
> Bus error

fyi

just updated to 10.3.9 today, and tried latest mod_perl CVS

    % perl Makefile.PL MP_APXS=/usr/local/apache2/sbin/apxs
        Reading Makefile.PL args from @ARGV
           MP_APXS = /usr/local/apache2/sbin/apxs
        no conflicting prior mod_perl version found - good.
        Configuring Apache/2.1.51 mod_perl2/1.999.23-dev Perl/v5.8.6
        [   info] generating script t/TEST
        [   info] generating script ./t/cgi-bin/cookies.pl
        [   info] generating script t/TEST
        Writing Makefile for Apache::TestItSelf
        Writing Makefile for Apache::Test
        Checking for File::Spec...ok
        Checking for Cwd...ok
        [   info] generating script t/TEST
        Writing Makefile for ModPerl::Registry
        Writing Makefile for APR::Base64
    <snip>
        Writing Makefile for Apache2_build
        Writing Makefile for ModPerl::Const
        Writing Makefile for ModPerl
        Writing Makefile for ModPerl::XS
        Writing Makefile for mod_perl2
        [warning] mod_perl dso library will be built as mod_perl.so
        [warning] You'll need to add the following to httpd.conf:
        [warning]  LoadModule perl_module modules/mod_perl.so

    % make
    % make install

no problems.

differences i note:
    you'd had a PRIOR mod_perl v1.26 install lurking abt
    i'm on Apache/2.1.51
    my perl is Perl/v5.8.6
    my mod_perl2 is a little more recent (1.999.23-dev)

hth!

cheers,

richard


Re: Bus error on Mac OS X 10.3.9 while configuring mod_perl-2.0.0-RC5

Posted by Stas Bekman <st...@stason.org>.
J Matisse Enzer wrote:
> 
> On Apr 25, 2005, at 2:56 PM, Stas Bekman wrote:
> 
>>
>> Looks like a bug in perl. But it's hard to tell.
>>
>> Matisse, please try to run it under the perl debugger to see where  
>> exactly it crashes. that'd be:
>>
>> perl -d Makefile.PL MP_APXS=/usr/local/apache2/bin/apxs  
>> PREFIX=/usr/local
> 
> 
> OK, so i ran it under the debugger, and started stepping through, typing
>    n
> at each debugger prompt, and eventually got bored and decided to let it  
> run so i typed:
>   r
> at the damn thing seemed to work - ran to the end without an error,
> So I did a     make clean     and tried again, and it worked again  
> (under the debugger),
> so I did another  make clean  and ran the configuration without the  
> debugger and it worked.

Heh, your system got scared when it saw that you know how to use the 
debugger :)

> Then
>    make
> worked, and
>    make test
> fails with:
> 
> [Mon Apr 25 15:15:59 2005] [info] base server + 27 vhosts ready to run  
> tests
> .[Mon Apr 25 15:16:00 2005] [error] Insecure directory in $ENV{PATH}  
> while running with -T switch at  
> /usr/local/src/mod_perl/mod_perl-2.0.0-RC5/Apache-Test/lib/Apache/ 
> TestConfig.pm line 1059.\nCompilation failed in require at  
> /usr/local/src/mod_perl/mod_perl-2.0.0-RC5/t/conf/modperl_startup.pl  
> line 17.\n\t...propagated at  
> /usr/local/src/mod_perl/mod_perl-2.0.0-RC5/t/conf/modperl_startup.pl  
> line 18.\nBEGIN failed--compilation aborted at  
> /usr/local/src/mod_perl/mod_perl-2.0.0-RC5/t/conf/modperl_startup.pl  
> line 20.\nCompilation failed in require at (eval 2) line 1.\n
> [Mon Apr 25 15:16:00 2005] [error] Can't load Perl file:  
> /usr/local/src/mod_perl/mod_perl-2.0.0-RC5/t/conf/modperl_startup.pl  
> for server localhost:8529, exiting...

Please take a look at Apache-Test/lib/Apache/TestConfig.pm, it has a 
function that untaints the PATH:

# Temporarily untaint PATH
sub untaint_path {
     my $path = shift;
     ($path) = ( $path =~ /(.*)/ );
     # win32 uses ';' for a path separator, assume others use ':'
     my $sep = WIN32 ? ';' : ':';
     # -T disallows relative and empty directories in the PATH
     return join $sep, grep !/^(\.|$)/, split /$sep/, $path;
}

try to see why it failed to do the job, by dumping the values of $path 
before and after it (at around line 1059).

If you don't figure it out post it here.

May be on Mac you have a different path separator?


-- 
__________________________________________________________________
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

Re: Bus error on Mac OS X 10.3.9 while configuring mod_perl-2.0.0-RC5

Posted by J Matisse Enzer <ma...@matisse.net>.
On Apr 25, 2005, at 2:56 PM, Stas Bekman wrote:
>
> Looks like a bug in perl. But it's hard to tell.
>
> Matisse, please try to run it under the perl debugger to see where  
> exactly it crashes. that'd be:
>
> perl -d Makefile.PL MP_APXS=/usr/local/apache2/bin/apxs  
> PREFIX=/usr/local

OK, so i ran it under the debugger, and started stepping through, typing
    n
at each debugger prompt, and eventually got bored and decided to let it  
run so i typed:
   r
at the damn thing seemed to work - ran to the end without an error,
So I did a     make clean     and tried again, and it worked again  
(under the debugger),
so I did another  make clean  and ran the configuration without the  
debugger and it worked.
Then
    make
worked, and
    make test
fails with:

[Mon Apr 25 15:15:59 2005] [info] base server + 27 vhosts ready to run  
tests
.[Mon Apr 25 15:16:00 2005] [error] Insecure directory in $ENV{PATH}  
while running with -T switch at  
/usr/local/src/mod_perl/mod_perl-2.0.0-RC5/Apache-Test/lib/Apache/ 
TestConfig.pm line 1059.\nCompilation failed in require at  
/usr/local/src/mod_perl/mod_perl-2.0.0-RC5/t/conf/modperl_startup.pl  
line 17.\n\t...propagated at  
/usr/local/src/mod_perl/mod_perl-2.0.0-RC5/t/conf/modperl_startup.pl  
line 18.\nBEGIN failed--compilation aborted at  
/usr/local/src/mod_perl/mod_perl-2.0.0-RC5/t/conf/modperl_startup.pl  
line 20.\nCompilation failed in require at (eval 2) line 1.\n
[Mon Apr 25 15:16:00 2005] [error] Can't load Perl file:  
/usr/local/src/mod_perl/mod_perl-2.0.0-RC5/t/conf/modperl_startup.pl  
for server localhost:8529, exiting...
........................................................................ 
.............................................
waiting 120 seconds for server to start: not ok
[  error] giving up after 121 secs. If you think that your system
is slow or overloaded try again with a longer timeout value.
by setting the environment variable APACHE_TEST_STARTUP_TIMEOUT
to a high value (e.g. 420) and repeat the last command.

[  error] server failed to start! (t/logs/error_log wasn't created,  
start the server in the debug mode)
+--------------------------------------------------------+
| Please file a bug report: http://perl.apache.org/bugs/ |
+--------------------------------------------------------+
make: *** [run_tests] Error 1


-------------------------------------------------------
Matisse Enzer <ma...@matisse.net>
http://www.matisse.net/  - http://www.eigenstate.net/
415-225-6703 (work/cellphone)
415-401-8325 (home)


Re: Bus error on Mac OS X 10.3.9 while configuring mod_perl-2.0.0-RC5

Posted by Stas Bekman <st...@stason.org>.
J Matisse Enzer wrote:
> Got a "Bus error" while configuring  mod_perl2/1.999.22 
> (mod_perl-2.0.0-RC5)
> This is on Mac OS X 10.3.9, Perl 5.8.1, with Apache 2.0.52
> 
> Here's the complete output:
> 
> matisse@g5-imac mod_perl-2.0.0-RC5: perl Makefile.PL MP_APXS=/usr/local/apache2/bin/apxs PREFIX=/usr/local
Reading Makefile.PL args from @ARGV
[...]
> Writing Makefile for ModPerl::Registry
[...]
> Writing Makefile for ModPerl
> Writing Makefile for ModPerl::XS
> Bus error

Looks like a bug in perl. But it's hard to tell.

Matisse, please try to run it under the perl debugger to see where exactly 
it crashes. that'd be:

perl -d Makefile.PL MP_APXS=/usr/local/apache2/bin/apxs PREFIX=/usr/local


-- 
__________________________________________________________________
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