You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Alessandro Forghieri <Al...@think3.com> on 2002/04/12 16:33:42 UTC

Several problems for mod_perl2 in compatibility mode (Win32)

Greetings.

mmmm... I sent this to the users list, then I "remembered" about dev,
and thought it probably beloged here. So - sorry for the duplicate.

This is relative to several problems on Win32/NTSP6/AP build 630.
Short executive report: nothing seems to work :-)

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


I have tried these with both the released mod_perl *AND* the latest CVS
snapshot (no difference in either). The report was generated with the
snapshot, but symptoms
are identical for the released version.

While building:
      if MP_DEBUG is set to 1:
	Complaints of 
	Filter.obj : error LNK2001: unresolved external symbol
_MP_debug_level
        ..\..\..\blib\arch/Apache2\auto\Apache\Filter\Filter.dll : \
	   fatal error LNK1120: 1 unresolved externals
	 If MP_DEBUG is defined on Win32.
 
While Testing:
      
	  D:\Perl\bin\perl.exe -Iblib\arch/Apache2 -Iblib\lib/Apache2
t/TEST -clean
	  D:\Perl\bin\perl.exe -Iblib\arch/Apache2 -Iblib\lib/Apache2
t/TEST
	  D:\Apache2/bin/Apache.exe  -d D:/builds/modperl-2.0/t \
	     -f D:/builds/modperl-2.0/t/conf/httpd.conf -DAPACHE2
-DPERL_USEITHREADS
	  using Apache/2.0.35 (winnt MPM)

	  waiting for server to start: ok (waited 1 secs)
	  server localhost:8529 started
	  server localhost:8530 listening (TestDirective::perlmodule)
	  server localhost:8531 listening (TestDirective::perlrequire)
	  server localhost:8532 listening (TestProtocol::echo)
	  server localhost:8533 listening (TestProtocol::echo_filter)
	  server localhost:8534 listening (TestProtocol::eliza)
	  server localhost:8535 listening (TestFilter::input_msg)
	  *** : cannot build c-modules without apxs

	  the server is down, giving up after 61 secs
	  !!! : failed to start server! (please examine D:t\logs\error_log)
	  NMAKE : fatal error U1077: 'D:\Perl\bin\perl.exe' : return code
'0x1'
	  Stop.
(apache keeps running afterwards)

Trying to actually use mod_perl in compatibility mode nothing appears to
work 
(see detailed configuration below).
I tested scripts/application that run fine under Apache 1, mod_perl 1.26,
Apache::Registry 
or straight CGI.

Scripts using CGI.pm return either:

o) an empty body (Apache::Registry)

o) a perl error - [Fri Apr 12 14:05:33 2002] [error] PerlRun: `Can't call
method "args" on an undefined 
                   value at D:/Perl/lib/CGI.pm line 433.' (Apache::PerlRun)
   The offending line contains a reference to Apache->request->args.

o) a stack overflow that crashes apache (complex app, under either registry
or perlrun)

(but since I cannot compile a debug version - see above - I can only see
what appears 
 to be a deep recursion somewhere in mod_perl.)



Not using CGI I can only get an empty body viz.:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html;
charset=iso-8859-1"></HEAD>
<BODY><XMP></XMP></BODY></HTML>

This happens on elementary, "Hello world" type of scripts under either
PerRun
or Registry.

Configuration:

PerlModule Apache2
PerlModule Apache::compat

PerlRequire "conf/startup.pl"

<Location /webteam/perl/bin/>
    Options +ExecCGI
    SetHandler modperl
    PerlResponseHandler Apache::Registry
    PerlOptions +ParseHeaders
    PerlOptions +SetupEnv
    allow from all
</Location>

startup.pl:

$ENV{MOD_PERL} or die "not running under mod_perl!";
use Apache2 ();
use Apache::compat ();
use Apache::Registry ();
use Apache::PerlRun ();
use Carp ();
use CGI ();
CGI->compile(':all');
use CGI::Carp;
1;


2. Used Components and their Configuration:

*** using lib/Apache/BuildConfig.pm
*** Makefile.PL options:
  MP_AP_PREFIX    => D:\Apache2
  MP_DEBUG        => 
  MP_GENERATE_XS  => 1
  MP_INST_APACHE2 => 1
  MP_LIBNAME      => mod_perl
  MP_USE_DSO      => 1


*** D:\Apache2/bin/Apache.exe -V
Server version: Apache/2.0.35
Server built:   Apr 12 2002 09:31:06
Server's Module Magic Number: 20020329:0
Architecture:   32-bit
Server compiled with....
 -D APACHE_MPM_DIR="server/mpm/winnt"
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D HTTPD_ROOT="/apache"
 -D SUEXEC_BIN="/apache/bin/suexec"
 -D DEFAULT_ERRORLOG="logs/error.log"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"


*** D:\Perl\bin\perl.exe -V
Summary of my perl5 (revision 5 version 6 subversion 1) configuration:
  Platform:
    osname=MSWin32, osvers=4.0, archname=MSWin32-x86-multi-thread
    uname=''
    config_args='undef'
    hint=recommended, useposix=true, d_sigaction=undef
    usethreads=undef use5005threads=undef useithreads=define
usemultiplicity=define
    useperlio=undef d_sfio=undef uselargefiles=undef usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
  Compiler:
    cc='cl', ccflags ='-nologo -O1 -MD -DNDEBUG -DWIN32 -D_CONSOLE
-DNO_STRICT -DHAVE_DES_FCRYPT  -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS
-DPERL_MSVCRT_READFIX',
    optimize='-O1 -MD -DNDEBUG',
    cppflags='-DWIN32'
    ccversion='', gccversion='', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=10
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=4
    alignbytes=8, usemymalloc=n, prototype=define
  Linker and Libraries:
    ld='link', ldflags ='-nologo -nodefaultlib -release
-libpath:"D:\Perl\lib\CORE"  -machine:x86'
    libpth="D:\Perl\lib\CORE"
    libs=  oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib  netapi32.lib
uuid.lib wsock32.lib mpr.lib winmm.lib  version.lib odbc32.lib odbccp32.lib
msvcrt.lib
    perllibs=  oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib  netapi32.lib
uuid.lib wsock32.lib mpr.lib winmm.lib  version.lib odbc32.lib odbccp32.lib
msvcrt.lib
    libc=msvcrt.lib, so=dll, useshrplib=yes, libperl=perl56.lib
  Dynamic Linking:
    dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -release
-libpath:"D:\Perl\lib\CORE"  -machine:x86'


Characteristics of this binary (from libperl): 
  Compile-time options: MULTIPLICITY USE_ITHREADS PERL_IMPLICIT_CONTEXT
PERL_IMPLICIT_SYS
  Locally applied patches:
  	ActivePerl Build 630
  Built under MSWin32
  Compiled at Oct 31 2001 20:29:41
  %ENV:
    PERL_LWP_USE_HTTP_10="1"
  @INC:
    D:/Perl/lib
    D:/Perl/site/lib
    .


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 Fri Apr 12 11:57:24 2002 GMT.

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

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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: Several problems for mod_perl2 in compatibility mode (Win32)

Posted by Doug MacEachern <do...@covalent.net>.
On Fri, 12 Apr 2002, Alessandro Forghieri wrote:
 
> While building:
>       if MP_DEBUG is set to 1:

MP_DEBUG=1 doesn't work properly on win32 yet.  but to get debug symbols, 
if you build perl with debug flags on, modperl will get built with the 
same flags.  so you get filename/line info in stacktraces, etc.  building 
apache in debug mode is done with 'nmake /f Makefile.win _apached' and 
'nmake /f Makefile.win installd'

> o) a perl error - [Fri Apr 12 14:05:33 2002] [error] PerlRun: `Can't call
> method "args" on an undefined 
>                    value at D:/Perl/lib/CGI.pm line 433.' (Apache::PerlRun)
>    The offending line contains a reference to Apache->request->args.

you need to add to httpd.conf:
PerlOptions +GlobalRequest

for any location that is using CGI.pm

as for things that are crashing the server, if you can put together simple 
examples to reproduce, i'll take a look.  i know that the tests aren't 
working well on win32, but haven't had a chance to debug yet.




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org