Re: Segmentation Fault with mod_php and mod_perl
Doug and Stas, I try to compile PHP with largefile support with no luck so I follow Doug's advice and rebuild mod_perl with PERL_USELARGEFILES=0. This solves the problem. Thanks a lot for helping me out! Alex From: Doug MacEachern [EMAIL PROTECTED] To: Alex Lee [EMAIL PROTECTED] CC: [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: Re: Segmentation Fault with mod_php and mod_perl Date: Wed, 28 Aug 2002 19:09:07 -0700 (PDT) On Wed, 28 Aug 2002, Alex Lee wrote: Stas, I am sorry, I got too excited when I saw the segmentation fault. Here is the output of 'bt': Program received signal SIGSEGV, Segmentation fault. 0x75a10 in php_xbithack_handler (r=0x927840) at mod_php4.c:778 778 if (!(r-finfo.st_mode S_IXUSR)) { 99.99% sure this is largefiles related, as somebody else mentioned. you need to make sure php was compiled with the same flags as httpd. that is, if you built php before mod_perl, you need to recompile php so it uses the largefile flags. or.. rebuilt modperl/httpd with Makefile.PL PERL_USELARGEFILES=0 _ Chat with friends online, try MSN Messenger: http://messenger.msn.com
Re: Segmentation Fault with mod_php and mod_perl
Stas, I am sorry, I got too excited when I saw the segmentation fault. Here is the output of 'bt': Program received signal SIGSEGV, Segmentation fault. 0x75a10 in php_xbithack_handler (r=0x927840) at mod_php4.c:778 778 if (!(r-finfo.st_mode S_IXUSR)) { (gdb) bt #0 0x75a10 in php_xbithack_handler (r=0x927840) at mod_php4.c:778 #1 0x17aeb0 in ap_invoke_handler () #2 0x199a28 in process_request_internal () #3 0x199aac in ap_process_request () #4 0x18c948 in child_main () #5 0x18cbdc in make_child () #6 0x18cdf8 in startup_children () #7 0x18d82c in standalone_main () #8 0x18e488 in main () Thanks for offering to help! Alex From: Stas Bekman [EMAIL PROTECTED] To: Alex Lee [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: Re: Segmentation Fault with mod_php and mod_perl Date: Wed, 28 Aug 2002 11:00:42 +0800 Alex Lee wrote: This is what I got from core backtrace: gdb /usr/local/src/apache/current/src/httpd [...] Program received signal SIGSEGV, Segmentation fault. 0x75a10 in php_xbithack_handler (r=0x927840) at mod_php4.c:778 778if (!(r-finfo.st_mode S_IXUSR)) { please finish reading the section explaining how to get the backtrace. You've got only the first frame. You need to execute 'bt' or 'where' to get it all. Are you going to say this is a PHP bug? :-) But how come if I only activate PHP module, it works fine. Something affects a datastructure which PHP uses and segfaults in it. But get first the whole backtrace. _ Chat with friends online, try MSN Messenger: http://messenger.msn.com
Re: Segmentation Fault with mod_php and mod_perl
On Wed, 28 Aug 2002, Alex Lee wrote: Stas, I am sorry, I got too excited when I saw the segmentation fault. Here is the output of 'bt': Program received signal SIGSEGV, Segmentation fault. 0x75a10 in php_xbithack_handler (r=0x927840) at mod_php4.c:778 778 if (!(r-finfo.st_mode S_IXUSR)) { 99.99% sure this is largefiles related, as somebody else mentioned. you need to make sure php was compiled with the same flags as httpd. that is, if you built php before mod_perl, you need to recompile php so it uses the largefile flags. or.. rebuilt modperl/httpd with Makefile.PL PERL_USELARGEFILES=0
Re: Segmentation Fault with mod_php and mod_perl
On Monday, 2002-08-26 at 10:43:57 -0700, Alex Lee wrote: There seems to be conflict between mod_php 4.2.2 and mod_perl 1.27 running with Apache 1.3.26 on Solaris 8 platform(FreeBSD with the same configuration seems to work fine). Please help! Or if you know of a working combination of Apache/mod_perl/mod_php on Solaris 8, let me know.. I had that a while ago. It is probably a problem with largefile support. Statically linking both mod_perl and mod_php worked for me, same versions you have. But I have to admit the version somebody else compiled crashed like your statically linked apache. The way I do it, and it is possible this avoids the problem is to first do apache+mod_perl, sans mod_php. If this tests OK, I make install mod_php, and do mod_perl again. The first step may leave some traces mod_php picks up. HTH, Lupe Christoph -- | [EMAIL PROTECTED] | http://www.lupe-christoph.de/ | | Big Misunderstandings #6398: The Titanic was not supposed to be| | unsinkable. The designer had a speech impediment. He said: I have | | thith great unthinkable conthept ... |
Re: Segmentation Fault with mod_php and mod_perl
Hi Stas, This is what I got from core backtrace: gdb /usr/local/src/apache/current/src/httpd GNU gdb 5.0 Copyright 2000 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type show copying to see the conditions. There is absolutely no warranty for GDB. Type show warranty for details. This GDB was configured as sparc-sun-solaris2.8... (gdb) run -X -f `pwd`/t/conf/httpd.conf -d `pwd`/t Starting program: /usr/local/src/apache/current/src/httpd -X -f `pwd`/t/conf/httpd.conf -d `pwd`/t [New LWP 1] [New LWP 2] [New LWP 3] [New LWP 4] Program received signal SIGSEGV, Segmentation fault. 0x75a10 in php_xbithack_handler (r=0x927840) at mod_php4.c:778 778 if (!(r-finfo.st_mode S_IXUSR)) { Are you going to say this is a PHP bug? :-) But how come if I only activate PHP module, it works fine. Alex From: Stas Bekman [EMAIL PROTECTED] To: Alex Lee [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: Re: Segmentation Fault with mod_php and mod_perl Date: Tue, 27 Aug 2002 11:54:38 +0800 Alex Lee wrote: There seems to be conflict between mod_php 4.2.2 and mod_perl 1.27 running with Apache 1.3.26 on Solaris 8 platform(FreeBSD with the same configuration seems to work fine). [...] Segmentation Fault (11) [...] running with truss ./httpd -X produce: Sending the core backtrace should help more that the output of truss. See http://perl.apache.org/docs/1.0/guide/help.html#How_to_Report_Problems __ Stas BekmanJAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide --- http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com _ Send and receive Hotmail on your mobile device: http://mobile.msn.com
Re: Segmentation Fault with mod_php and mod_perl
Alex Lee wrote: This is what I got from core backtrace: gdb /usr/local/src/apache/current/src/httpd [...] Program received signal SIGSEGV, Segmentation fault. 0x75a10 in php_xbithack_handler (r=0x927840) at mod_php4.c:778 778if (!(r-finfo.st_mode S_IXUSR)) { please finish reading the section explaining how to get the backtrace. You've got only the first frame. You need to execute 'bt' or 'where' to get it all. Are you going to say this is a PHP bug? :-) But how come if I only activate PHP module, it works fine. Something affects a datastructure which PHP uses and segfaults in it. But get first the whole backtrace. Alex From: Stas Bekman [EMAIL PROTECTED] To: Alex Lee [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: Re: Segmentation Fault with mod_php and mod_perl Date: Tue, 27 Aug 2002 11:54:38 +0800 Alex Lee wrote: There seems to be conflict between mod_php 4.2.2 and mod_perl 1.27 running with Apache 1.3.26 on Solaris 8 platform(FreeBSD with the same configuration seems to work fine). [...] Segmentation Fault (11) [...] running with truss ./httpd -X produce: Sending the core backtrace should help more that the output of truss. See http://perl.apache.org/docs/1.0/guide/help.html#How_to_Report_Problems __ Stas BekmanJAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide --- http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com _ Send and receive Hotmail on your mobile device: http://mobile.msn.com -- __ Stas BekmanJAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide --- http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
Segmentation Fault with mod_php and mod_perl
There seems to be conflict between mod_php 4.2.2 and mod_perl 1.27 running with Apache 1.3.26 on Solaris 8 platform(FreeBSD with the same configuration seems to work fine). The Apache configuration as follows: CC=gcc \ CFLAGS= -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 \ ./configure \ --with-layout=Apache \ --prefix=/usr/apache \ --enable-module=info \ --enable-module=proxy \ --enable-module=usertrack \ --enable-module=rewrite \ --enable-module=speling \ --activate-module=src/modules/perl/libperl.a \ --activate-module=src/modules/php4/libphp4.a \ --disable-rule=EXPAT \ $ will cause Apache to Segmentation fault: [Wed Aug 21 11:59:47 2002] [notice] child pid 17907 exit signal Segmentation Fault (11) when accessing the default page(index.html). But the CGI script runs fine, so does server-status and server-info. If I take out the activate-module line for either mod_perl or mod_php, the problem disapper. BTW, the mod_perl make test runs fine. running with truss ./httpd -X produce: : lwp_cond_wait(0xFEFE5550, 0xFEFE5560, 0xFEFDEDB8) (sleeping...) lwp_cond_wait(0xFEFE5550, 0xFEFE5560, 0xFEFDEDB8) (sleeping...) door_return(0x, 0, 0x, 0) (sleeping...) accept(16, 0xFFBEF798, 0xFFBEF7BC, 1)= 5 fcntl(19, F_SETLKW64, 0x00301C60)= 0 sigaction(SIGUSR1, 0xFFBEF5D0, 0xFFBEF6D0) = 0 getsockname(5, 0xFFBEF7A8, 0xFFBEF7BC, 1)= 0 setsockopt(5, 6, 1, 0xFFBEF70C, 4, 1)= 0 alarm(300) = 0 read(5, G E T / H T T P / 1.., 4096) = 404 sigaction(SIGUSR1, 0xFFBED4C0, 0xFFBED5C0) = 0 time() = 1029956894 alarm(300) = 300 alarm(0) = 300 stat64(/usr/apache/htdocs, 0x00425108) = 0 sigaction(SIGALRM, 0x, 0xFFBEF490) = 0 stat64(/usr/apache/htdocs/index.html, 0x0044A108) = 0 stat64(/usr/apache/htdocs/index.html, 0x00425EC0) = 0 Incurred fault #6, FLTBOUNDS %pc = 0x00073554 siginfo: SIGSEGV SEGV_MAPERR addr=0x0060 Received signal #11, SIGSEGV [default] siginfo: SIGSEGV SEGV_MAPERR addr=0x0060 *** process killed *** Please help! Or if you know of a working combination of Apache/mod_perl/mod_php on Solaris 8, let me know.. Thanks! Alex _ Send and receive Hotmail on your mobile device: http://mobile.msn.com
Re: Segmentation Fault with mod_php and mod_perl
On Monday 26 August 2002 10:43 am, Alex Lee wrote: I ran into this on a RH7 box. I compiled mod_perl into apache and compiled PHP as a DSO with APXS. Worked for me, but YMMV. There seems to be conflict between mod_php 4.2.2 and mod_perl 1.27 running with Apache 1.3.26 on Solaris 8 platform(FreeBSD with the same configuration seems to work fine). The Apache configuration as follows: CC=gcc \ CFLAGS= -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 \ ./configure \ --with-layout=Apache \ --prefix=/usr/apache \ --enable-module=info \ --enable-module=proxy \ --enable-module=usertrack \ --enable-module=rewrite \ --enable-module=speling \ --activate-module=src/modules/perl/libperl.a \ --activate-module=src/modules/php4/libphp4.a \ --disable-rule=EXPAT \ $ will cause Apache to Segmentation fault: [Wed Aug 21 11:59:47 2002] [notice] child pid 17907 exit signal Segmentation Fault (11) when accessing the default page(index.html). But the CGI script runs fine, so does server-status and server-info. If I take out the activate-module line for either mod_perl or mod_php, the problem disapper. BTW, the mod_perl make test runs fine. running with truss ./httpd -X produce: lwp_cond_wait(0xFEFE5550, 0xFEFE5560, 0xFEFDEDB8) (sleeping...) lwp_cond_wait(0xFEFE5550, 0xFEFE5560, 0xFEFDEDB8) (sleeping...) door_return(0x, 0, 0x, 0) (sleeping...) accept(16, 0xFFBEF798, 0xFFBEF7BC, 1) = 5 fcntl(19, F_SETLKW64, 0x00301C60) = 0 sigaction(SIGUSR1, 0xFFBEF5D0, 0xFFBEF6D0) = 0 getsockname(5, 0xFFBEF7A8, 0xFFBEF7BC, 1) = 0 setsockopt(5, 6, 1, 0xFFBEF70C, 4, 1) = 0 alarm(300) = 0 read(5, G E T / H T T P / 1.., 4096)= 404 sigaction(SIGUSR1, 0xFFBED4C0, 0xFFBED5C0) = 0 time() = 1029956894 alarm(300) = 300 alarm(0) = 300 stat64(/usr/apache/htdocs, 0x00425108) = 0 sigaction(SIGALRM, 0x, 0xFFBEF490) = 0 stat64(/usr/apache/htdocs/index.html, 0x0044A108) = 0 stat64(/usr/apache/htdocs/index.html, 0x00425EC0) = 0 Incurred fault #6, FLTBOUNDS %pc = 0x00073554 siginfo: SIGSEGV SEGV_MAPERR addr=0x0060 Received signal #11, SIGSEGV [default] siginfo: SIGSEGV SEGV_MAPERR addr=0x0060 *** process killed *** Please help! Or if you know of a working combination of Apache/mod_perl/mod_php on Solaris 8, let me know.. Thanks! Alex _ Send and receive Hotmail on your mobile device: http://mobile.msn.com
Re: Segmentation Fault with mod_php and mod_perl
Hmm. That's what I did in the first place and I can't even get Apache to compile in that case. It kept complaining about mod_proxy can't resolve some external symbols, if I remember correctly. So I thought maybe you can't do both DSO and static at the same time. After I changed both to static linked, it compiled fine. But then keep getting segmentation fault when accessing the default page. The strange thing is that perl CGI programs run fine. Alex From: C. David Wilde [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: Alex Lee [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: Re: Segmentation Fault with mod_php and mod_perl Date: Mon, 26 Aug 2002 12:54:04 -0700 On Monday 26 August 2002 10:43 am, Alex Lee wrote: I ran into this on a RH7 box. I compiled mod_perl into apache and compiled PHP as a DSO with APXS. Worked for me, but YMMV. There seems to be conflict between mod_php 4.2.2 and mod_perl 1.27 running with Apache 1.3.26 on Solaris 8 platform(FreeBSD with the same configuration seems to work fine). The Apache configuration as follows: CC=gcc \ CFLAGS= -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 \ ./configure \ --with-layout=Apache \ --prefix=/usr/apache \ --enable-module=info \ --enable-module=proxy \ --enable-module=usertrack \ --enable-module=rewrite \ --enable-module=speling \ --activate-module=src/modules/perl/libperl.a \ --activate-module=src/modules/php4/libphp4.a \ --disable-rule=EXPAT \ $@ will cause Apache to Segmentation fault: [Wed Aug 21 11:59:47 2002] [notice] child pid 17907 exit signal Segmentation Fault (11) when accessing the default page(index.html). But the CGI script runs fine, so does server-status and server-info. If I take out the activate-module line for either mod_perl or mod_php, the problem disapper. BTW, the mod_perl make test runs fine. running with truss ./httpd -X produce: lwp_cond_wait(0xFEFE5550, 0xFEFE5560, 0xFEFDEDB8) (sleeping...) lwp_cond_wait(0xFEFE5550, 0xFEFE5560, 0xFEFDEDB8) (sleeping...) door_return(0x, 0, 0x, 0) (sleeping...) accept(16, 0xFFBEF798, 0xFFBEF7BC, 1)= 5 fcntl(19, F_SETLKW64, 0x00301C60)= 0 sigaction(SIGUSR1, 0xFFBEF5D0, 0xFFBEF6D0) = 0 getsockname(5, 0xFFBEF7A8, 0xFFBEF7BC, 1)= 0 setsockopt(5, 6, 1, 0xFFBEF70C, 4, 1)= 0 alarm(300) = 0 read(5, G E T / H T T P / 1.., 4096) = 404 sigaction(SIGUSR1, 0xFFBED4C0, 0xFFBED5C0) = 0 time() = 1029956894 alarm(300) = 300 alarm(0) = 300 stat64(/usr/apache/htdocs, 0x00425108) = 0 sigaction(SIGALRM, 0x, 0xFFBEF490) = 0 stat64(/usr/apache/htdocs/index.html, 0x0044A108) = 0 stat64(/usr/apache/htdocs/index.html, 0x00425EC0) = 0 Incurred fault #6, FLTBOUNDS %pc = 0x00073554 siginfo: SIGSEGV SEGV_MAPERR addr=0x0060 Received signal #11, SIGSEGV [default] siginfo: SIGSEGV SEGV_MAPERR addr=0x0060 *** process killed *** Please help! Or if you know of a working combination of Apache/mod_perl/mod_php on Solaris 8, let me know.. Thanks! Alex _ Send and receive Hotmail on your mobile device: http://mobile.msn.com _ Join the worlds largest e-mail service with MSN Hotmail. http://www.hotmail.com
Re: Segmentation Fault with mod_php and mod_perl
Alex Lee wrote: There seems to be conflict between mod_php 4.2.2 and mod_perl 1.27 running with Apache 1.3.26 on Solaris 8 platform(FreeBSD with the same configuration seems to work fine). [...] Segmentation Fault (11) [...] running with truss ./httpd -X produce: Sending the core backtrace should help more that the output of truss. See http://perl.apache.org/docs/1.0/guide/help.html#How_to_Report_Problems __ Stas BekmanJAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide --- http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com