Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Sep 2004 14:51:11 +0100
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        Vonleigh Simmons <nospam@illusionart.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Apache+mod_ssl + mod_php segfault
Message-ID:  <20040910135111.GA50475@happy-idiot-talk.infracaninophile.co.uk>
In-Reply-To: <535FEA17-02B4-11D9-A03B-000A2791B6EC@illusionart.com>
References:  <535FEA17-02B4-11D9-A03B-000A2791B6EC@illusionart.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--LZvS9be/3tNcYl/X
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Sep 09, 2004 at 04:02:30PM -0700, Vonleigh Simmons wrote:
> 	I sent this already but didn't get any replies. I'm a little=20
> 	desperate because I need to get this working, so if you can suggest=20
> anything at all, I'd really appreciate it. I'm running FreeBSD 5.2-RELEAS=
E,=20
> apache is apache13-modssl, php is the mod_php version. All latest version=
s=20
> (cvsup this morning).
>=20
> 	The problem is that apache segfaults on startup when=20
> loadmodule/addmodule php are in the config file. Originally I fixed the=
=20
> problem by compiling apache without expat. However, after a portupgrade=
=20
> it stopped working again.
>=20
> 	Right now it's working with a major kludge: start up apache with=20
> loadmodule/addmodule commented out, comment them back in and do an=20
> apachectl restart. Somehow this lets apache work without segfaulting.=20
> However, if I do an apachectl graceful/restart, then it segfaults again=
=20
> and won't start up.
>=20
> 	I've tried recompiling apache, recompiling php, getting rid of php=20
> extensions, etc, all to no avail. There is nothing in the logs, it=20
> simply fails to start up. Any help or ideas are greatly appreciated.

This sounds to me very much like you've got the mod_php loadable
object linked against an incompatible version of a shlib which
apach+mod_ssl is also linked to.  At a guess:

    i) I'd finger the OpenSSL libs as a prime suspect: particularly if
       you've also installed OpenSSL from ports.  It's not necessary
       to install OpenSSL from ports as the version in the base system
       is perfectly OK.

   ii) Different threading libraries can have similar bad effects.
       Everything should be compiled using the same threading
       libraries: if necessary, use /etc/libmap.conf to force the
       issue.  (Although I've never heard of that being necessary for
       any variant of apache before now)

The reason your kludge works would be to do with the order of
resolving the required shlibs: something like one shlib resolves all
the required symbols, but the other one is missing some.

Use ldd(1) to investigate what shlibs a binary needs, and check for
conflicts:

    % ldd /usr/local/sbin/httpd=20
    /usr/local/sbin/httpd:
            libz.so.2 =3D> /usr/lib/libz.so.2 (0x280b3000)
            libssl.so.3 =3D> /usr/lib/libssl.so.3 (0x280c1000)
            libcrypto.so.3 =3D> /usr/lib/libcrypto.so.3 (0x280f0000)
            libaprutil-0.so.9 =3D> /usr/local/lib/apache2/libaprutil-0.so.9=
 (0x281ed000)
            libexpat.so.5 =3D> /usr/local/lib/libexpat.so.5 (0x281ff000)
            libiconv.so.3 =3D> /usr/local/lib/libiconv.so.3 (0x2821d000)
            libapr-0.so.9 =3D> /usr/local/lib/apache2/libapr-0.so.9 (0x2830=
b000)
            libm.so.2 =3D> /usr/lib/libm.so.2 (0x28327000)
            libcrypt.so.2 =3D> /usr/lib/libcrypt.so.2 (0x28343000)
            libc.so.4 =3D> /usr/lib/libc.so.4 (0x2835c000)
   =20
    % ldd /usr/local/libexec/apache2/libphp5.so=20
    /usr/local/libexec/apache2/libphp5.so:
            libcrypt.so.2 =3D> /usr/lib/libcrypt.so.2 (0x28266000)
            libm.so.2 =3D> /usr/lib/libm.so.2 (0x2827f000)
            libxml2.so.5 =3D> /usr/local/lib/libxml2.so.5 (0x2829b000)
            libz.so.2 =3D> /usr/lib/libz.so.2 (0x2838e000)
            libiconv.so.3 =3D> /usr/local/lib/libiconv.so.3 (0x2839c000)
   =20
	Cheers,

	Matthew

--=20
Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK

--LZvS9be/3tNcYl/X
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (FreeBSD)

iD8DBQFBQbFPiD657aJF7eIRAg6kAJ0QB+JlFPe1yCHLg2YbS2nz25yjzgCdGSHD
zWwQqMlYAMWulkuhLAwnYys=
=b6ZS
-----END PGP SIGNATURE-----

--LZvS9be/3tNcYl/X--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040910135111.GA50475>