Re: [mp2] segfaulting apache in ap_pcw_walk_files_config

[prev] [thread] [next] [Date index for 2005/05/24]

From: Flavio Curti
Subject: Re: [mp2] segfaulting apache in ap_pcw_walk_files_config
Date: 07:22 on 24 May 2005
Hi Philippe & List

(Sorry for not looking in the archives good enough!)

On 5/24/05, Philippe M. Chiasson <gozer@xxxxxxxxx.xxx> wrote:
> Flavio Curti wrote:
> > I have a problem running mod_perl-2.0.0 (and the latest devel snapshot =
too):
> It would be quite helpfull if you could just get me:
> (gdb) print *dconf
> (gdb) print *(dconf->sec_file)
[Switching to Thread -1212529568 (LWP 16147)]
0xb75a86dc in ap_pcw_walk_files_config (pconf=3D0x80c20a8, s=3D0x80c8018,=
=20
    dconf=3D0x80fe4a8, modp=3D0xb75bb500,=20
    dir_cb=3D0xb75a82d0 <modperl_hash_handlers_dir>, data=3D0x0)
    at modperl_pcw.c:67
67=09    ap_conf_vector_t **dirs =3D (ap_conf_vector_t **)dconf->sec_file->=
elts;
(gdb) print *dconf
$1 =3D {d =3D 0x0, d_components =3D 0, opts =3D 31 '\037', opts_add =3D 0 '=
\0',=20
  opts_remove =3D 0 '\0', override =3D 63 '?', ap_default_type =3D 0x0,=20
  satisfy =3D 0x80fe528, ap_auth_type =3D 0x0, ap_auth_name =3D 0x0,=20
  ap_requires =3D 0x0, response_code_strings =3D 0x0, hostname_lookups =3D =
0,=20
  do_rfc1413 =3D -2, content_md5 =3D -2, use_canonical_name =3D 3, d_is_fnm=
atch =3D 0,=20
  add_default_charset =3D 2, add_default_charset_name =3D 0x80a76d7 "iso-88=
59-1",=20
  limit_cpu =3D 0x0, limit_mem =3D 0x0, limit_nproc =3D 0x0, limit_req_body=
 =3D -1,=20
  limit_xml_body =3D -1, server_signature =3D 4294967295, loglevel =3D 2,=
=20
  sec_file =3D 0x0, r =3D 0x80fe628, mime_type =3D 0x0, handler =3D 0x0,=20
  output_filters =3D 0x0, input_filters =3D 0x0, accept_path_info =3D 0,=20
  ct_output_filters =3D 0x3, etag_bits =3D 0, etag_add =3D 0, etag_remove =
=3D 0,=20
  enable_mmap =3D 0, enable_sendfile =3D 0, allow_encoded_slashes =3D 0}
(gdb) print *(dconf->sec_file)
Cannot access memory at address 0x0
(gdb)=20

> > In order to isolate the problem further I changed line 118 of modperl_p=
cw.c from
> >   if (dir_cb) {
> > to
> >   if (dir_cb && 0) {
> > and mod-perl2 started working! So there seems to be a problem with
> > reading configuration files/directories somehow.
> Do you mean that the test suite passed _all_ it's tests or that the serve=
r
> simply started up ? Because that patch would disable quite a few importan=
t
> things.

Well, yeah it simply didn't segfault anymore. From running make test
it seemed that many
tests failed so I didn't bother running it through.
=20
> Can you also try this patch ?
Okay, I applied this patch to the 2.0 Version. Apache no longer
segfaults but 201 out of 229 test scripts fail:
Failed 201/229 test scripts, 12.23% okay. 377/684 subtests failed, 44.88% o=
kay.
Judging from the error_log it's because the apache-childs segfault. I
have attached with gdb to the running test apache, and when accessing
http://localhost:8531/TestUser__rewrite_real the child segfaults:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1212529568 (LWP 23182)]
0xb759acbf in modperl_hook_create_request (r=3D0x959e028) at mod_perl.c:718
718=09    MP_dRCFG;
(gdb) bt
#0  0xb759acbf in modperl_hook_create_request (r=3D0x959e028) at mod_perl.c=
:718
#1  0x0809ad55 in ap_run_create_request ()
#2  0x08092491 in ap_read_request ()
#3  0x0806cb58 in _start ()
#4  0x095980e8 in ?? ()
#5  0x00000003 in ?? ()
#6  0x00000000 in ?? ()
#7  0xb75b3ec0 in modperl_process_connection_handler (c=3D0x0)
    at modperl_hooks.c:17
#8  0x0808da55 in ap_run_process_connection ()
#9  0x08080e94 in ap_graceful_stop_signalled ()
#10 0x08080fe7 in ap_graceful_stop_signalled ()
#11 0x08081279 in ap_graceful_stop_signalled ()
#12 0x08081965 in ap_mpm_run ()
#13 0x08087efd in main ()

If you need anything else just tell me. If a verbose test-report is
needed just tell me which test.

Thank you very much for your help and kind regards

Flavio

--=20
http://no-way.org/~fcu/

(message missing)

Re: [mp2] segfaulting apache in ap_pcw_walk_files_config
Philippe M. Chiasson 06:22 on 24 May 2005

Re: [mp2] segfaulting apache in ap_pcw_walk_files_config
Flavio Curti 07:22 on 24 May 2005

Re: [mp2] segfaulting apache in ap_pcw_walk_files_config
Philippe M. Chiasson 04:52 on 25 May 2005

Re: [mp2] segfaulting apache in ap_pcw_walk_files_config
Philippe M. Chiasson 09:16 on 25 May 2005

Re: [mp2] segfaulting apache in ap_pcw_walk_files_config
Philippe M. Chiasson 09:23 on 26 May 2005

Generated at 20:12 on 05 Jun 2005 by mariachi v0.52