Re: RegistryLoader Segmentation fault
Fran Fabrizio wrote: Hello, I'm trying to follow the script in section 214 of the book mod_perl Developer's Cookbook in order to pre-load my Apache::registry scripts using Apache::RegistryLoader I'm getting a seg fault when I attempt to start apache This was the problem I was having last Friday Just wanted to post the results - the upgrade to Perl 561 solved the problem PERL_DEBUG=1 on mod_perl compilation was also very helpful Thanks to everyone for their help! -Fran
RegistryLoader Segmentation fault
Hello, I'm trying to follow the script in section 214 of the book mod_perl Developer's Cookbook in order to pre-load my Apache::registry scripts using Apache::RegistryLoader I'm getting a seg fault when I attempt to start apache My startuppl is as follows: #!/usr/local/bin/perl use lib qw(/usr/local/apache/lib/perl); use Apache::DBI; use Apache::Registry; use Apache::RegistryLoader; use DBI; use DBD::Pg; use strict; use CGI qw(-compile :all); use DirHandle; my $rl = Apache::RegistryLoader-new; my $dh = DirHandle-new(/usr/local/apache/cgi-bin/chimpkit/) or die $!; foreach my $file ($dh-read) { next unless $file =~ m/\pl$/; print STDOUT Pre-loading $file\n; $rl-handler(/cgi-bin/chimpkit/$file,/usr/local/apache/cgi-bin/chimpkit/$file); } 1; When I attempt to start apache, I get the following messages on STDOUT: [root@castle bin]# /apachectl start Pre-loading chimpworkspl Apache::Debug: [level 1] Compiled package Apache::ROOT::cgi_2dbin::chimpkit::chimpworks_2epl for process 27233 at /usr/lib/perl5/site_perl/560/i386-linux/Apache/RegistryLoaderpm line 76 /apachectl: line 171: 27233 Segmentation fault (core dumped) $HTTPD /apachectl start: httpd could not be started [root@castle bin]# Nothing has been written to the error log The format of my $rl-handler() call seems ok to me I perused the archives for a while and tried a couple of things that fixed other people's RegistryLoader problems, to no avail Everything works fine if I comment out the call to handler() except of course now each child has a copy of the compiled code Any thoughts? Thanks, Fran
Re: RegistryLoader Segmentation fault
Hi there, On Fri, 1 Mar 2002, Fran Fabrizio wrote: using Apache::RegistryLoader I'm getting a seg fault when I attempt to start apache Read mod_perl/SUPPORT Did you compile your own Perl, mod_perl and Apache? You might be better off with Perl version 561 instead Are you using DSO? 73, Ged
Re: RegistryLoader Segmentation fault
Ged, using Apache::RegistryLoader I'm getting a seg fault when I attempt to start apache Read mod_perl/SUPPORT Ok I've looked through it I've tried some of the quicker suggestions gdb -core core and gdb httpd core tell me: Core was generated by `/usr/local/apache/bin/httpd' Program terminated with signal 11, Segmentation fault #0 0x80ca6b6 in Perl_gv_init () I'll try some of the more involved stuff here in a moment Did you compile your own Perl, mod_perl and Apache? Yes Perl 560, mod_perl 125, apache 1319 You might be better off with Perl version 561 instead I will upgrade and see what happens Are you using DSO? No Thanks for the pointers thus far! -Fran
Re: RegistryLoader Segmentation fault
whoops, forgot to CC the list, but it seems Ged stepped in with the same info Fran Fabrizio wrote: Hello, I'm trying to follow the script in section 214 of the book mod_perl Developer's Cookbook in order to pre-load my Apache::registry scripts using Apache::RegistryLoader I'm getting a seg fault when I attempt to start apache I've never seen a segfault with RegistryLoader, but there are a few avenues that might help see Recipe 919 for a general introduction into using gbd and getting a backtrace, as well as the SUPPORT document in the mod_perl sources maybe someone else has seen this before and can offer more help --Geoff
Re: RegistryLoader Segmentation fault
see Recipe 919 for a general introduction into using gbd and getting a backtrace, as well as the SUPPORT document in the mod_perl sources Here is the backtrace for now I'm going to try Perl 561 and then try to see what the backtrace looks like with a PERL_DEBUG=1 enabled mod_perl Thanks for the help thus far -Fran (gdb) bt #0 0x80ca6b6 in Perl_gv_init () #1 0x80cb9d5 in Perl_gv_fetchpv () #2 0x80810dd in perl_section_hash_init () #3 0x8081403 in perl_section () #4 0x809aa40 in ap_clear_module_list () #5 0x809b598 in ap_handle_command () #6 0x809b635 in ap_srm_command_loop () #7 0x809ef2a in ap_limit_section () #8 0x809aa40 in ap_clear_module_list () #9 0x809b598 in ap_handle_command () #10 0x809b635 in ap_srm_command_loop () #11 0x809bd52 in ap_process_resource_config () #12 0x80a0cc7 in ap_exists_config_define () #13 0x809aadc in ap_clear_module_list () #14 0x809b598 in ap_handle_command () #15 0x809b635 in ap_srm_command_loop () #16 0x809bd52 in ap_process_resource_config () #17 0x809c695 in ap_read_config () #18 0x80a6e9f in main () #19 0x400a1b65 in __libc_start_main (main=0x80a6bb8 main, argc=1, ubp_av=0xbaf4, init=0x80621d4 _init, fini=0x814a26c _fini, rtld_fini=0x4000df24 _dl_fini, stack_end=0xbaec) at /sysdeps/generic/libc-startc:111