Re: segfault in DSO mod_perl 1.23 (perl 5.6.0) with apache-1.3.12
Michael Poole wrote: In hopes that this would fix the APXS build, I tried rebuilding with that, but whenever the httpd tried to load the php3 or perl module, it would die in pthread_mutex_lock. This was slightly odd, since php3 would load fine when httpd was statically linked against mod_perl. For the time being, I'll just roll back to using static mod_perl and dynamic mod_ssl and php3. No, that's what you would expect. The problem is being caused because perl amd mod_perl are being built to be largefile aware, whereas by default Apache is not. By following Doug's instructions to let mod_perl build httpd you are building it with the same flags needed to make perl/modperl largefile aware, so Apache too ends up being largefile aware and all the bits then are in sync. If you use APXS you are building Apache seperately and with the standard config, i.e. not largefile aware, so it breaks. If you want to use APXS you have to build Apache to be largefile aware yourself. On Solaris at least the way to do this is to set CFLAGS='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64' in your environment before invoking the Apache configure. -- Alan Burlison
Re: segfault in DSO mod_perl 1.23 (perl 5.6.0) with apache-1.3.12
can you see if this patch fixes the problem? make sure you let mod_perl build httpd and pass USE_APACI=1 to Makefile.PL --- Makefile.PL 2000/04/21 06:24:27 1.158 +++ Makefile.PL 2000/04/27 22:45:30 1.160 @@ -186,7 +186,7 @@ $PERL_DEBUG = ""; $PERL_DESTRUCT_LEVEL = ""; $PERL_STATIC_EXTS = ""; -$PERL_EXTRA_CFLAGS = ""; +$PERL_EXTRA_CFLAGS = $] = 5.006 ? $Config{ccflags} : ""; $SSLCacheServerPort = 8539; $SSL_BASE = ""; $Port = $ENV{HTTP_PORT} || 8529;
Re: segfault in DSO mod_perl 1.23 (perl 5.6.0) with apache-1.3.12
Doug MacEachern [EMAIL PROTECTED] writes: perl Makefile.PL USE_APXS=1 WITH_APXS=/usr/local/sbin/apxs EVERYTHING=1 probably a long shot, but any difference if you build with USE_DSO=1 instead of USE_APXS ? My apologies for taking so long to reply -- it's been a busy week. From a clean apache_1.3.12 and mod_perl-1.23 tree, running: perl Makefile.PL APACHE_SRC=../apache_1.3.12/src DO_HTTPD=1 \ USE_APACI=1 USE_DSO=1 EVERYTHING=1 make make test results in almost all of the tests failing. When I try to start the server manually (using the same parameters as 'make test' gives it), it gets SIGSEGV while parsing the httpd config files. A backtrace from gdb shows: (gdb) bt #0 _dl_debug_state () at dl-debug.c:56 #1 0x4000a3eb in _dl_catch_error (errstring=0xbfffc034, operate=0x40148d20 dl_open_worker, args=0xbfffc038) at dl-error.c:141 #2 0x401490cd in _dl_open ( file=0x866cc20 "/usr/local/lib/perl5/5.6.0/i686-linux-thread-multi-64all/auto/IO/IO.so", mode=1, caller=0xbfffc034) at dl-open.c:232 #3 0x4006a063 in dlopen_doit (a=0xbfffc148) at dlopen.c:41 #4 0x4000a3eb in _dl_catch_error (errstring=0x4006bd00, operate=0x4006a038 dlopen_doit, args=0xbfffc148) at dl-error.c:141 #5 0x4006a549 in _dlerror_run (operate=0x4006a038 dlopen_doit, args=0xbfffc148) at dlerror.c:125 #6 0x4006a023 in __dlopen_check ( file=0x866cc20 "/usr/local/lib/perl5/5.6.0/i686-linux-thread-multi-64all/auto/IO/IO.so", mode=1) at dlopen.c:53 #7 0x401b09e9 in XS_DynaLoader_dl_load_file () from /usr/local/stow/apache/1.3.12/src/mod_perl-1.23/t/../../apache_1.3.12/src/modules/perl/libperl.so [... much Perl internals elided ...] #54 0x40171257 in perl_cmd_require () from /usr/local/stow/apache/1.3.12/src/mod_perl-1.23/t/../../apache_1.3.12/src/modules/perl/libperl.so #55 0x806b67e in invoke_cmd () #56 0x806bb01 in ap_handle_command () #57 0x806bb9d in ap_srm_command_loop () #58 0x806bff4 in ap_process_resource_config () #59 0x806c8f8 in ap_read_config () #60 0x8076570 in standalone_main () #61 0x8076e9c in main () #62 0x400841eb in __libc_start_main (main=0x8076b04 main, argc=6, argv=0xbc54, init=0x804e3cc _init, fini=0x8093b64 _fini, rtld_fini=0x4000a610 _dl_fini, stack_end=0xbc4c) at ../sysdeps/generic/libc-start.c:90 and t/logs/error_log contains: [notice] END block called for startup.pl [notice] Destruction-DESTROY called for $global_object (I'm not sure if that's an error or just diagnostics; it looks like the latter. If the SEGV is unrelated to it, I could continue hunting down the error given hints on what to look for. But not all is lost -- see my reply to your other email.) Michael
Re: segfault in DSO mod_perl 1.23 (perl 5.6.0) with apache-1.3.12
Doug MacEachern [EMAIL PROTECTED] writes: can you see if this patch fixes the problem? make sure you let mod_perl build httpd and pass USE_APACI=1 to Makefile.PL --- Makefile.PL 2000/04/21 06:24:27 1.158 +++ Makefile.PL 2000/04/27 22:45:30 1.160 @@ -186,7 +186,7 @@ $PERL_DEBUG = ""; $PERL_DESTRUCT_LEVEL = ""; $PERL_STATIC_EXTS = ""; -$PERL_EXTRA_CFLAGS = ""; +$PERL_EXTRA_CFLAGS = $] = 5.006 ? $Config{ccflags} : ""; $SSLCacheServerPort = 8539; $SSL_BASE = ""; $Port = $ENV{HTTP_PORT} || 8529; Yes. Using the same Makefile.PL invocation that failed before (see my previous email), this passes "make test." I haven't tried running it in my full pseudo-production environment because that also uses mod_ssl, but the test suite checks out okay. In hopes that this would fix the APXS build, I tried rebuilding with that, but whenever the httpd tried to load the php3 or perl module, it would die in pthread_mutex_lock. This was slightly odd, since php3 would load fine when httpd was statically linked against mod_perl. For the time being, I'll just roll back to using static mod_perl and dynamic mod_ssl and php3. Michael
Re: segfault in DSO mod_perl 1.23 (perl 5.6.0) with apache-1.3.12
Doug MacEachern [EMAIL PROTECTED] writes: On 22 Apr 2000, Michael Poole wrote: I get a segfault on the first page access to Apache (it's just a request for / on the server). Backtrace: ... That line of mod_perl.c is "dPPDIR;" However, r-per_dir_config is NULL, so the get_module_config() call there ends up dereferencing a NULL pointer to generate the SEGV. that's stange. what options did you give mod_perl's Makefile.PL? did mod_perl's 'make test' pass? what request is the server handling when this happens? perl Makefile.PL USE_APXS=1 WITH_APXS=/usr/local/sbin/apxs EVERYTHING=1 'make test' refused to run since it was using APXS The server was handling "GET / HTTP/1.0" at the time (the first request made to the server). My "solution" to this point (suggested by Dave Mee) is to just use APACI to link mod_perl statically into Apache. It's worked perfectly so far, although it is a bit kludgy. Michael
Re: segfault in DSO mod_perl 1.23 (perl 5.6.0) with apache-1.3.12
perl Makefile.PL USE_APXS=1 WITH_APXS=/usr/local/sbin/apxs EVERYTHING=1 probably a long shot, but any difference if you build with USE_DSO=1 instead of USE_APXS ?