Re: [mp-1.99_05] segfault modperl_pcw.c:52 ap_pcw_walk_files_config dconf-sec_file is NULL

2002-08-29 Thread Phil Lobbes

Hi Doug,

You asked:

 which one is NULL dconf or dconf-sec_file?  if dconf-sec_file
 should never be NULL.  i'm not sure if it is possible for dconf
 itself to be NULL.  do you have some example configuration that
 causes the problem?

Well, dconf was NOT NULL, but sec_file was NULL:

(gdb) print *dconf
$6 = {d = 0x0, d_components = 0, opts = 31 '\037', opts_add = 0 '\000',
  opts_remove = 0 '\000', override = 63 '?', ap_default_type = 0x0,
  satisfy = 2, ap_auth_type = 0x0, ap_auth_name = 0x0, ap_requires = 0x0,
  response_code_strings = 0x0, hostname_lookups = 0, do_rfc1413 = -2,
  content_md5 = -2, use_canonical_name = 3, d_is_fnmatch = 0,
  add_default_charset = 2, add_default_charset_name = 0x4000c848 iso-8859-1,
  limit_cpu = 0x0, limit_mem = 0x0, limit_req_body = -4294967296,
  limit_xml_body = 0, server_signature = 1074161768, loglevel = 0,
  sec_file = 0x0, r = 0x0, mime_type = 0x0, handler = 0x0,
  output_filters = 0x3 , input_filters = 0x0, accept_path_info = 0,
  ct_output_filters = 0x0, etag_bits = 0, etag_add = 2, etag_remove = 0,
  enable_mmap = 1073910448}

How did this happen, you ask?  I was just running 'make test'...

I've got to say that for some reason I've had nothing but trouble with
HP... is the recommended path to use gcc or to use HP's ansic compiler
or ?  I wish I knew...

I've got a custom perl module built on top of a threaded library that
seems to choke under apache 1, mod_perl and it seems to be related to
signals (from my best guesses).  I'm out on a mini vacation right now
but I'll provide details next week.

If you have any recommendations for things to try please let me know
I'm willing to try any combination:

* apache 1 or 2
* perl 5.6.1 or 5.8.0

Phil

Stack trace For your reference...

gdb /opt/apache2/2.0.40_debug/bin/httpd -core  ... (wd: 
~/sw/src/apache/mod_perl-1.99_05)
where
#0  0xda26ffa8 in ap_pcw_walk_files_config (pconf=0x400292b0, s=0x4002c020,
dconf=0x400667f0, modp=0x7f68b7e8,
dir_cb=0x7f685122 modperl_hash_handlers_dir, data=0x0)
at modperl_pcw.c:52
#1  0xda2703ec in ap_pcw_walk_config (pconf=0x400292b0, s=0x4002c020,
modp=0x7f68b7e8, data=0x0, dir_cb=0x7f685122 modperl_hash_handlers_dir,
srv_cb=0x7f68512a modperl_hash_handlers_srv) at modperl_pcw.c:106
#2  0xda26f514 in modperl_mgv_hash_handlers (p=0x400292b0, s=0x4002c020)
at modperl_mgv.c:470
#3  0xda259948 in modperl_hook_post_config (pconf=0x400292b0, plog=0x40061470,
ptemp=0x40063480, s=0x4002c020) at mod_perl.c:415
#4  0x60874 in ap_run_post_config (pconf=0x400292b0, plog=0x40061470,
ptemp=0x40063480, s=0x4002c020) at config.c:130
#5  0x67cd0 in main (argc=6, argv=0x7f7f05a4) at main.c:592


  Hi,
  
  I just recently joined the mail list and did a quick check but didn't
  seen any report of this problem:
  
  Versions: perl-5.6.1   (non-threaded)
apache-2.0.40(mpm-prefork)
mod_perl-1.99_05
  OS:   HPUX 11
  Compiler: gcc version 3.2 20020708 (experimental)
  
  I don't know the code well enough to know what data/values are
  expected to be found in dconf, but here is a possible work around
  (most likely less than ideal solution) in the affected portion of C
  code (src/modules/perl/modperl_pcw.c):
  
  +if( (! dconf) || (! dconf-sec_file) )
  +return;
  ap_conf_vector_t **dirs = (ap_conf_vector_t **)dconf-sec_file-elts;
[ ... question/text moved to top ...]



[mp-1.99_05] segfault modperl_pcw.c:52 ap_pcw_walk_files_config dconf-sec_file is NULL

2002-08-27 Thread Phil Lobbes

Hi,

I just recently joined the mail list and did a quick check but didn't
seen any report of this problem:

Versions: perl-5.6.1   (non-threaded)
  apache-2.0.40(mpm-prefork)
  mod_perl-1.99_05
OS:   HPUX 11
Compiler: gcc version 3.2 20020708 (experimental)

I don't know the code well enough to know what data/values are
expected to be found in dconf, but here is a possible work around
(most likely less than ideal solution) in the affected portion of C
code (src/modules/perl/modperl_pcw.c):

+if( (! dconf) || (! dconf-sec_file) )
+return;
ap_conf_vector_t **dirs = (ap_conf_vector_t **)dconf-sec_file-elts;

However after doing that, I get problems in other places... back to
the drawing board I guess.

For your reference, here is how I built mod_perl:

  /opt/perl/bin/perl Makefile.PL MP_INST_APACHE2=1 \
MP_AP_PREFIX=/opt/apache2/2.0.40_debug \
MP_DEBUG=1 MP_TRACE=1

gdb /opt/apache2/2.0.40_debug/bin/httpd -core  ... (wd: 
~/sw/src/apache/mod_perl-1.99_05)
where
#0  0xda26ffa8 in ap_pcw_walk_files_config (pconf=0x400292b0, s=0x4002c020,
dconf=0x400667f0, modp=0x7f68b7e8,
dir_cb=0x7f685122 modperl_hash_handlers_dir, data=0x0)
at modperl_pcw.c:52
#1  0xda2703ec in ap_pcw_walk_config (pconf=0x400292b0, s=0x4002c020,
modp=0x7f68b7e8, data=0x0, dir_cb=0x7f685122 modperl_hash_handlers_dir,
srv_cb=0x7f68512a modperl_hash_handlers_srv) at modperl_pcw.c:106
#2  0xda26f514 in modperl_mgv_hash_handlers (p=0x400292b0, s=0x4002c020)
at modperl_mgv.c:470
#3  0xda259948 in modperl_hook_post_config (pconf=0x400292b0, plog=0x40061470,
ptemp=0x40063480, s=0x4002c020) at mod_perl.c:415
#4  0x60874 in ap_run_post_config (pconf=0x400292b0, plog=0x40061470,
ptemp=0x40063480, s=0x4002c020) at config.c:130
#5  0x67cd0 in main (argc=6, argv=0x7f7f05a4) at main.c:592
(gdb) print *pconf
$5 = {parent = 0x400272a0, child = 0x400cfcc8, sibling = 0x0,
  ref = 0x4005f468, cleanups = 0x400a2578, allocator = 0x400231f0,
  subprocesses = 0x0, abort_fn = 0, user_data = 0x0, tag = 0x4000a6b0 pconf,
  active = 0x400a1b40, self = 0x40029298,
  self_first_avail = 0x400292e8 @\002\222\260}
(gdb) print *dconf
$6 = {d = 0x0, d_components = 0, opts = 31 '\037', opts_add = 0 '\000',
  opts_remove = 0 '\000', override = 63 '?', ap_default_type = 0x0,
  satisfy = 2, ap_auth_type = 0x0, ap_auth_name = 0x0, ap_requires = 0x0,
  response_code_strings = 0x0, hostname_lookups = 0, do_rfc1413 = -2,
  content_md5 = -2, use_canonical_name = 3, d_is_fnmatch = 0,
  add_default_charset = 2, add_default_charset_name = 0x4000c848 iso-8859-1,
  limit_cpu = 0x0, limit_mem = 0x0, limit_req_body = -4294967296,
  limit_xml_body = 0, server_signature = 1074161768, loglevel = 0,
  sec_file = 0x0, r = 0x0, mime_type = 0x0, handler = 0x0,
  output_filters = 0x3 , input_filters = 0x0, accept_path_info = 0,
  ct_output_filters = 0x0, etag_bits = 0, etag_add = 2, etag_remove = 0,
  enable_mmap = 1073910448}
(gdb)


Perl version info (perl -V):

[apr/include] perk@hpmx5(2203) /opt/perl/bin/perl -V
Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
  Platform:
osname=hpux, osvers=11.00, archname=PA-RISC2.0
uname='hp-ux hpmx5 b.11.00 a 9000800 1534710528 two-user license '
config_args='-Dcf_by=Openwave [EMAIL PROTECTED] -Dcc=gcc 
-Dprefix=/opt/perl -Uusethreads -Ubincompat5005 -Uinstallusrbinperl -Uusemymalloc 
-Duselargefiles -A prepend:libswanted=cl pthread $a  -A ccflags=-fPIC 
-D_POSIX_C_SOURCE=199506L -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Doptimize=-g -de'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
useperlio=undef d_sfio=undef uselargefiles=undef usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
  Compiler:
cc='gcc', ccflags ='-D_HPUX_SOURCE -L/lib/pa1.1 -DUINT32_MAX_BROKEN -fPIC 
-D_POSIX_C_SOURCE=199506L -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DDEBUGGING 
-fno-strict-aliasing -I/usr/local/include',
optimize='-g',
cppflags='-D_HPUX_SOURCE -L/lib/pa1.1 -DUINT32_MAX_BROKEN -fPIC 
-D_POSIX_C_SOURCE=199506L -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DDEBUGGING 
-fno-strict-aliasing -I/usr/local/include'
ccversion='', gccversion='3.2 20020708 (experimental)', gccosandvers='hpux11.00'
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=8, usemymalloc=n, prototype=define
  Linker and Libraries:
ld='ld', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib
libs=-lcl -lpthread -lnsl -lnm -lndbm -lmalloc -ldld -lm -lc -lndir -lcrypt -lsec
perllibs=-lcl -lpthread -lnsl -lnm -lmalloc -ldld -lm -lc -lndir -lcrypt -lsec
libc=/lib/libc.sl, so=sl, useshrplib=false, libperl=libperl.a
  Dynamic