FAQ
Reading MP_TRACE messages I noticed that for every modperl_interp_select() call during a request there were two modperl_interp_unselect() calls, one bracketing the _select() call and one from the registered cleanup when the pool was destroyed. The attached patch stopped those crashes. I would call my fix VERY tentative for various reasons including my noobiness and I've added comments near the active ingredient in modperl_interp.c. Inactive ingredients include diffs in the patch which are my adding trace info.

Now I'm chasing a bug which causes a much less frequent crash.

This patch is against the version of mod_perl I checked out some months ago: 1566538 which is in httpd24threading, but having checked the changes to that branch since then I didn't find an obvious conflict.

This is my httpd:

Server version: Apache/2.2.26 (Win32)
Server built: Mar 17 2014 09:15:35
Server's Module Magic Number: 20051115:33
Server loaded: APR 1.4.8, APR-Util 1.5.2
Compiled using: APR 1.4.8, APR-Util 1.5.2
Architecture: 32-bit
Server MPM: WinNT
   threaded: yes (fixed thread count)
     forked: no
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 DYNAMIC_MODULE_LIMIT=128
  -D HTTPD_ROOT="/apache"
  -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
  -D DEFAULT_ERRORLOG="logs/error.log"
  -D AP_TYPES_CONFIG_FILE="conf/mime.types"
  -D SERVER_CONFIG_FILE="conf/httpd.conf"

And my Perl:

Summary of my perl5 (revision 5 version 18 subversion 2) configuration:

   Platform:
     osname=MSWin32, osvers=6.1, archname=MSWin32-x86-multi-thread
     uname=''
     config_args='undef'
     hint=recommended, useposix=true, d_sigaction=undef
     useithreads=define, usemultiplicity=define
     useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
     use64bitint=undef, use64bitall=undef, uselongdouble=undef
     usemymalloc=y, bincompat5005=undef
   Compiler:
     cc='cl', ccflags ='-nologo -GF -W3 -O1 -MD -Zi -DNDEBUG -DWIN32 -D_CONSOLE -
DNO_STRICT -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DPERL_TEXTMO
DE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DUSE_PERLIO',
     optimize='-O1 -MD -Zi -DNDEBUG',
     cppflags='-DWIN32'
     ccversion='15.00.30729.01', gccversion='', gccosandvers=''
     intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
     d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=8
     ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='__int64', lseeksi
ze=8
     alignbytes=8, prototype=define
   Linker and Libraries:
     ld='link', ldflags ='-nologo -nodefaultlib -debug -opt:ref,icf -libpath:"c:
\perl\5.18.2\lib\MSWin32-x86-multi-thread\CORE" -machine:x86 "/manifestdependen
cy:type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' proce
ssorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'"'
     libpth=\lib
     libs=oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.l
ib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.lib ws2_32
.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib comctl32.lib msvcrt.
lib
     perllibs=oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg
32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.lib ws
2_32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib comctl32.lib msv
crt.lib
     libc=msvcrt.lib, so=dll, useshrplib=true, libperl=perl518.lib
     gnulibc_version=''
   Dynamic Linking:
     dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
     cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -debug -opt:ref,icf -
libpath:"c:\perl\5.18.2\lib\MSWin32-x86-multi-thread\CORE" -machine:x86 "/manif
estdependency:type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0
.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'"'



Characteristics of this binary (from libperl):
   Compile-time options: HAS_TIMES HAVE_INTERP_INTERN MULTIPLICITY MYMALLOC
                         PERLIO_LAYERS PERL_DONT_CREATE_GVSV
                         PERL_HASH_FUNC_ONE_AT_A_TIME_HARD
                         PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP
                         PERL_PRESERVE_IVUV PERL_SAWAMPERSAND USE_ITHREADS
                         USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE
                         USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_PERLIO
                         USE_PERL_ATOF
   Built under MSWin32
   Compiled at Mar 12 2014 12:48:53
   %ENV:
     PERL5LIB="c:/cygwin/home/085598/lib;c:/cygwin/home/085598/Perl"
     PERLDOC_PAGER="less -ir"
   @INC:
     c:/cygwin/home/085598/lib
     c:/cygwin/home/085598/Perl
     C:/perl/site/5.18.2/lib/MSWin32-x86-multi-thread
     C:/perl/site/5.18.2/lib
     C:/perl/5.18.2/lib/MSWin32-x86-multi-thread
     C:/perl/5.18.2/lib
     .

Both build with VC 2008

Richard Kandarian
http://www.lanl.gov/cgi-bin/fonelink.pl/085598
My node in the Web: http://www.kandarian.com

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupmodperl @
categoriesmodperl, perl
postedJun 4, '14 at 8:02p
activeJun 4, '14 at 8:02p
posts1
users1
websiteperl.apache.org

1 user in discussion

Kandarian, Richard M: 1 post

People

Translate

site design / logo © 2018 Grokbase