You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apreq-dev@httpd.apache.org by Stas Bekman <st...@stason.org> on 2003/06/04 02:39:27 UTC
Re: libapreq-1.1 SEGV's on AIX
Steven M. Carter wrote:
> On Thu, 2003-05-29 at 22:06, Stas Bekman wrote:
>
>>Steven M. Carter wrote:
>>
>>>On Fri, 30 May 2003, Stas Bekman wrote:
>>>
>>>
>>>
>>>>Steven M. Carter wrote:
>>>>Good work. These are the missing bits. Though they need to be figured
>>>>programmatically. AIX is a mess, because of the symbol map files.
>>>>
>>>>So far in mp2, I have solved this by simply using -Wl,-berok which ignores
>>>>resolving problems at linking time, in hope that everything will get resolved
>>>>at startup time. However your solution is proper. I'm planning to change mp2's
>>>>build to do the same, once I'll have again the courage to go through the aix pain.
>>>>
>>>>You need to post a backtrace from the core file. Without it we have clue where
>>>>the problem is.
>>>
>>>
>>>Sorry about that, I thought about it as I was leaving the office:
>>
>>You need to recompile Apache with CFLAGS="-g" and --without-execstrip so that
>>the arguments will be reported. Otherwise it's hard to see why segfault happens.
>
>
> I'm not sure that I had the right version of gdb or the right core
> file. I made sure that I had all of my ducks in a row and got another
> backtrace:
Well this time the trace is totally different (not in apache domain). This
time you are missing symbols, arguments in Apache::Request and Perl, you have
to rebuild Apache::Request with CFLAGS="-g" and perl with -Doptimize='-g'.
However it's possible that seeing the arguments to:
> (gdb) bt
> #0 0xd0ad39cc in boot_Apache__Request ()
> from
> /.../dce.ccs.ornl.gov/fs/users/u003/scarter/compile/aix_51/libapreq-1.1/
> blib/arch/auto/Apache/Request/Request.so
could be enough. So if rebuilding perl is a trouble, try to rebuild apreq first.
> (gdb) bt
> #0 0xd0ad39cc in boot_Apache__Request ()
> from
> /.../dce.ccs.ornl.gov/fs/users/u003/scarter/compile/aix_51/libapreq-1.1/
> blib/arch/auto/Apache/Request/Request.so
> #1 0xd24d7b90 in Perl_pp_entersub () from
> /opt/www/apache/libexec/libperl.so
> #2 0xd2556448 in Perl_runops_standard ()
> from /opt/www/apache/libexec/libperl.so
> #3 0xd2526cac in S_call_body () from /opt/www/apache/libexec/libperl.so
> #4 0xd2526f00 in Perl_eval_sv () from
> /opt/www/apache/libexec/libperl.so
> #5 0xd2591dc0 in perl_require_module ()
> from /opt/www/apache/libexec/libperl.so
> #6 0xd24ad8a0 in perl_cmd_module () from
> /opt/www/apache/libexec/libperl.so
> #7 0x10018c90 in invoke_cmd (cmd=0x202d42d8, parms=0x2ff22320,
> mconfig=0x202582bc, args=0x2ff202e2 "") at http_config.c:947
> #8 0x1001948c in ap_handle_command (parms=0x2ff22320,
> config=0x20234d14,
> l=0x2ff202c8 "PerlModule Apache::Request") at http_config.c:1080
> #9 0x10019574 in ap_srm_command_loop (parms=0x2ff22320,
> config=0x20234d14)
> at http_config.c:1094
> #10 0x1001a150 in ap_process_resource_config (s=0x2023411c,
> fname=0x20002cc0
> "/dfs/home/scarter/compile/aix_51/libapreq-1.1/t/httpd.conf
> ", p=0x202340f4, ptemp=0x20238134) at http_config.c:1382
> #11 0x1001ae3c in ap_read_config (p=0x202340f4, ptemp=0x20238134,
> confname=0x20002cc0
> "/dfs/home/scarter/compile/aix_51/libapreq-1.1/t/httpd.c
> onf") at http_config.c:1674
> ---Type <return> to continue, or q <return> to quit---
> #12 0x100078dc in main (argc=3, argv=0x2ff225f8) at http_main.c:5531
> #13 0x100001dc in __start ()
>
> Steven.
>
--
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
Re: libapreq-1.1 SEGV's on AIX
Posted by Stas Bekman <st...@stason.org>.
Steven Carter wrote:
> On Wed, 2003-06-04 at 20:57, Stas Bekman wrote:
>
>>Steven Carter wrote:
>>
>>
>>>>>I'm not sure that I had the right version of gdb or the right core
>>>>>file. I made sure that I had all of my ducks in a row and got another
>>>>>backtrace:
>>>>
>>>>Well this time the trace is totally different (not in apache domain). This
>>>>time you are missing symbols, arguments in Apache::Request and Perl, you have
>>>>to rebuild Apache::Request with CFLAGS="-g" and perl with -Doptimize='-g'.
>>>>However it's possible that seeing the arguments to:
>>>>
>>>>
>>>>>(gdb) bt
>>>>>#0 0xd0ad39cc in boot_Apache__Request ()
>>>>> from
>>>>>/.../dce.ccs.ornl.gov/fs/users/u003/scarter/compile/aix_51/libapreq-1.1/
>>>>>blib/arch/auto/Apache/Request/Request.so
>>>>
>>>>could be enough. So if rebuilding perl is a trouble, try to rebuild apreq first.
>>>
>>>
>>>I can re-compile perl as well, but it will take a little longer. I
>>>certainly don't mind, I would like to get this problem solved.
>>
>>May be there is no need for that.
>>
>>
>>>Core was generated by `httpd'.
>>>Program terminated with signal 11, Segmentation fault.
>>>#0 0xd089d9cc in boot_Apache__Request (cv=0x2040e624) at Request.c:887
>>>887 Request.c: A file or directory in the path name does not exist..
>>> in Request.c
>>
>>weird that it can't find the file, it's right under its nose. what your
>>Request.c:887 says?
>>
>>I'm not sure whether we are on the same library version, but mine goes:
>>
>>#line 885 "Request.c"
>>
>> /* End of Initialisation Section */
>>
>> XSRETURN_YES;
>>}
>
>
> My libapreq-1.1/Request/Request.c says:
>
>
> +881 #ifdef __cplusplus
> +882 extern "C"
> +883 #endif
> +884 XS(boot_Apache__Request); /* prototype to pass
> -Wmissing-prototypes */
> +885 XS(boot_Apache__Request)
> +886 {
> +887 dXSARGS;
> +888 char* file = __FILE__;
> +889
> +890 XS_VERSION_BOOTCHECK ;
> +891
>
> What file is it looking for?
Oh, that's quite different from mine. So it fails in dXSARGS;, we are slowly
getting advanced. This expands as:
dSP; dMARK;
dAX; dITEMS
Can you replace:
dXSARGS;
with:
register SV **sp = PL_stack_sp;
register SV **mark = PL_stack_base + POPMARK;
I32 ax = MARK - PL_stack_base + 1;
I32 items = SP - MARK;
in that file (which is the further extension of these 4 macros)
run 'make test' and see where it segfaults now?
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
Re: libapreq-1.1 SEGV's on AIX
Posted by Stas Bekman <st...@stason.org>.
Steven Carter wrote:
>>>I'm not sure that I had the right version of gdb or the right core
>>>file. I made sure that I had all of my ducks in a row and got another
>>>backtrace:
>>
>>Well this time the trace is totally different (not in apache domain). This
>>time you are missing symbols, arguments in Apache::Request and Perl, you have
>>to rebuild Apache::Request with CFLAGS="-g" and perl with -Doptimize='-g'.
>>However it's possible that seeing the arguments to:
>>
>> > (gdb) bt
>> > #0 0xd0ad39cc in boot_Apache__Request ()
>> > from
>> > /.../dce.ccs.ornl.gov/fs/users/u003/scarter/compile/aix_51/libapreq-1.1/
>> > blib/arch/auto/Apache/Request/Request.so
>>
>>could be enough. So if rebuilding perl is a trouble, try to rebuild apreq first.
>
>
> I can re-compile perl as well, but it will take a little longer. I
> certainly don't mind, I would like to get this problem solved.
May be there is no need for that.
> Core was generated by `httpd'.
> Program terminated with signal 11, Segmentation fault.
> #0 0xd089d9cc in boot_Apache__Request (cv=0x2040e624) at Request.c:887
> 887 Request.c: A file or directory in the path name does not exist..
> in Request.c
weird that it can't find the file, it's right under its nose. what your
Request.c:887 says?
I'm not sure whether we are on the same library version, but mine goes:
#line 885 "Request.c"
/* End of Initialisation Section */
XSRETURN_YES;
}
> (gdb) bt
> #0 0xd089d9cc in boot_Apache__Request (cv=0x2040e624) at Request.c:887
> #1 0xd24d7b90 in Perl_pp_entersub () from
> /opt/www/apache/libexec/libperl.so
> #2 0xd2556448 in Perl_runops_standard ()
> from /opt/www/apache/libexec/libperl.so
> #3 0xd2526cac in S_call_body () from /opt/www/apache/libexec/libperl.so
> #4 0xd2526f00 in Perl_eval_sv () from
> /opt/www/apache/libexec/libperl.so
> #5 0xd2591dc0 in perl_require_module ()
> from /opt/www/apache/libexec/libperl.so
> #6 0xd24ad8a0 in perl_cmd_module () from
> /opt/www/apache/libexec/libperl.so
> #7 0x10018c90 in invoke_cmd (cmd=0x202c42d8, parms=0x2ff22520,
> mconfig=0x202582bc, args=0x2ff204e2 "") at http_config.c:947
> #8 0x1001948c in ap_handle_command (parms=0x2ff22520,
> config=0x20234d14,
> l=0x2ff204c8 "PerlModule Apache::Request") at http_config.c:1080
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com