You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Phil Lobbes <ph...@perkpartners.com> on 2002/08/29 20:59:35 UTC

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

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 ...]