php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16801 httpd segementation fault at statup
Submitted: 2002-04-24 13:43 UTC Modified: 2002-06-27 22:31 UTC
Votes:8
Avg. Score:5.0 ± 0.0
Reproduced:7 of 7 (100.0%)
Same Version:6 (85.7%)
Same OS:4 (57.1%)
From: alexandre dot ghisoli at ycom dot ch Assigned: yohgaki (profile)
Status: Not a bug Package: Apache related
PHP Version: 4.2.0 OS: Linux 2.4.18
Private report: No CVE-ID: None
 [2002-04-24 13:43 UTC] alexandre dot ghisoli at ycom dot ch
I started with the new PHP 4.2.0
I use the same build script (protopkg on Slackware) to build
4.1.2 and 4.2.0.

Then, 4.2.0 make a seg fault at startup, I dont know exactly
where.



There is the configure part :

./configure  \
                --prefix=/usr/local	\
		--with-config-file-path=/usr/local/etc/apache	\
		--with-apxs=/usr/local/apache/sbin/apxs	\
		--enable-discard-path	\
		--disable-debug		\
		--enable-track-vars	\
		--enable-trans-sid	\
		--enable-memory-limit	\
		--enable-versioning	\
		--with-openssl		\
		--enable-calendar	\
		--with-bz2		\
		--with-ftp		\
		--with-gd=/usr		\
		--enable-gd-native-ttf	\
		--with-gmp 		\
		--with-xml=shared 	\
		--enable-socket		\
		--with-regex=php	\
		--enable-sysvsem	\
                --enable-sysvshm	\
		--with-ldap		\
		--with-pgsql		\
		--with-mysql		\
		--with-db2		\
		--with-db3		\
		--with-mm		\
		--with-snmp=/usr/local	\
		--with-gettext=/usr	\
		--with-zlib=/usr	\
		--with-imap-ssl=/usr/local	\
		--with-jpeg-dir=/usr/lib	\
                --with-png-dir=/usr/lib		\
                --with-xpm-dir=/usr/X11R6	\
                --with-freetype-dir=/usr/X11R6	\
                --with-ldap=/usr/local		\
                --enable-locale			\
		--with-mcrypt=/usr/local/lib	\
                i686-pc-linux-gnu



The GDB Backtrace :(gdb) run -X
Starting program: /usr/local/apache/sbin/httpd -X

Program received signal SIGSEGV, Segmentation fault.
strcmp (p1=0x0, p2=0x0) at ../sysdeps/generic/strcmp.c:38
38      ../sysdeps/generic/strcmp.c: No such file or directory.
(gdb) bt
#0  strcmp (p1=0x0, p2=0x0) at ../sysdeps/generic/strcmp.c:38
#1  0x4058e2e0 in OBJ_NAME_new_index () from
/usr/local/pgsql/lib/libpq.so.2
Cannot access memory at address 0x1


It seems to be PostgreSQL related, but the same configure
script on same machine for 4.1.2 is okay.

Thanx
     --Alexandre


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-04-24 13:46 UTC] alexandre dot ghisoli at ycom dot ch
Ah, Potgresql is :

postgres@evo-147:...DATABASES/postgresql% psql -V
psql (PostgreSQL) 7.2b3

Regards
 [2002-04-24 14:54 UTC] derick@php.net
Assigning to Yasuo.

Derick
 [2002-04-24 17:33 UTC] yohgaki@php.net
Could you add --enable-debug in your configure option (w/o any compiler optimization option) and take backtrace again?

Could you paste short & complete script reproduces this segfault?


 [2002-04-25 03:33 UTC] alexandre dot ghisoli at ycom dot ch
OOps, 

The module as been compiled with --enable-debug for the
backtrace.

So, this segfault appear at startup !
When I do a apachectl start, it crashes !

If I remove the AddModule directive in httpd.conf, it's
working, apache starts, but I cannot use php, heh.
 [2002-04-25 11:22 UTC] j dot richter at wallstreet-develop dot de
It seems to be an openssl problem. I have the same problem, but without openssl it works ( but I don't know why :-( )

Regards : Janko
 [2002-04-29 07:06 UTC] vincent at yoric dot net
i am using redhat6.2 with kernel 2.2.19

segfault appear at startup too. here's my configure script which i used for 4.1.2 and 4.0.6

./configure --with-mysql --enable-track-vars=yes --enable-bcmath=yes \
--enable-memory-limit=yes --with-imap=../imap-2001a --enable-debug=no \
--with-apxs --with-config-file-path=/etc/httpd --enable-sockets \
--with-openssl --with-pdflib=/usr/local --with-zlib-dir=/usr --with-zlib=/usr \
--with-gd=/usr --enable-gd-native-tt --with-ttf=/usr \
--with-png-dir=/usr --with-tiff-dir=/usr --with-jpeg-dir=/usr
 [2002-04-30 02:28 UTC] yohgaki@php.net
Alexandre,

What happens if you remove SSL option from libpq?
It sounds like you have SSL support in your libpq.

 [2002-05-06 09:24 UTC] alexandre dot ghisoli at ycom dot ch
Hi yohgaki, 

Yes, I've SSL enable in Postgres, and this is the same version that use for PHP.

After some search, it seems to be db3 related, conflict between the Glibc version and a fresh one (Berckley-sleepycat) that I use on somes systems (for Squid).

But, I dont know why 4.1.2 can safely link, and 4.2.0 don't ....


Can close this bug for me :-)

Thanks for your time.

       --Alexandre
 [2002-06-27 22:31 UTC] sniper@php.net
Closed per user request.

 [2002-10-06 22:56 UTC] sierra2 at webrausch dot de
Confirmed.
I encountered exactly the same bug. I'm using Apache+PHP+PostgreSQL and tried upgrading openssl. PHP was compiled with "--with-openssl --with-pgsql" as well, and the PostgreSQL I was using was built with the ssl option before.

Tracked down the problem to not having rebuilt PostgreSQL with the new openssl version as well before using it with PHP and Apache, thus probably creating a version conflict of openssl in the resulting apache binary. I wonder why the build didn't fail ?

However, I now rebuilt PostgreSQL first, afterwards PHP and apache, everything works fine now.

Had to do a 'make clean' in PHP before recompiling, otherwise it wouldn't use the new PostgreSQL build.
cu, Andre
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 02 02:01:28 2024 UTC