Bug 66317

Summary: Apache+PHP core dumps after upgrading to 5.2.1 p5
Product: Ports & Packages Reporter: storozhilov <storozhilov>
Component: Individual Port(s)Assignee: Alex Dupre <ale>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description storozhilov 2004-05-06 08:30:26 UTC
After upgrading from 5.2.1 p4 to 5.2.1 p5 Apache 1.3.29 (compiled from sources) + PHP 4.3.6 as DSO (compiled from sources) core dumps at startup occueres.

Apache configure params:
./configure --enable-module=so --enable-module=rewrite
PHP configure params:
./configure --with-apxs=/usr/local/apache/bin/apxs --with-pgsql=/usr/local/pgsql

Problem appeares only on 5.2.1 p5. On earler versions everything works fine. If PHP compiled without PostgreSQL support Apache starts good. It was tested on two FreeBSD boxes.

$ ldd -a /usr/local/apache/bin/httpd
/usr/local/apache/bin/httpd:
        libcrypt.so.2 => /lib/libcrypt.so.2 (0x280f8000)
        libc.so.5 => /lib/libc.so.5 (0x28111000)

$ ldd -a /usr/local/apache/libexec/libphp4.so
/usr/local/apache/libexec/libphp4.so:
        libcrypt.so.2 => /lib/libcrypt.so.2 (0x282ec000)
        libpq.so.3 => /usr/local/pgsql/lib/libpq.so.3 (0x28305000)
        libm.so.2 => /lib/libm.so.2 (0x2831b000)
/usr/local/pgsql/lib/libpq.so.3:
        libcrypt.so.2 => /lib/libcrypt.so.2 (0x282ec000)
        libc_r.so.5 => /usr/lib/libc_r.so.5 (0x28334000)

All libraries present on system.
Comment 1 Simon L. B. Nielsen freebsd_committer freebsd_triage 2004-05-06 10:37:08 UTC
On 2004.05.06 00:21:15 -0700, Ilya Storozhilov wrote:
> 


> After upgrading from 5.2.1 p4 to 5.2.1 p5 Apache 1.3.29 (compiled from
> sources) + PHP 4.3.6 as DSO (compiled from sources) core dumps at
> startup occueres.


Do you also have the problem if you use ports to install apache/php ?

I haven't checked, but there might be patches in the apache and/or PHP
ports to work around FreeBSD specific problems, so you might want to
check those two ports for FreeBSD specific patches if you really want to
compile from source, without using ports.

-- 
Simon L. Nielsen
Comment 2 gemini 2004-05-06 17:04:15 UTC
Ilya Storozhilov wrote:
>>Description:
> 
> After upgrading from 5.2.1 p4 to 5.2.1 p5 Apache 1.3.29 (compiled from sources) + PHP 4.3.6 as DSO (compiled from sources) core dumps at startup occueres.
> 
> Apache configure params:
> ./configure --enable-module=so --enable-module=rewrite
> PHP configure params:
> ./configure --with-apxs=/usr/local/apache/bin/apxs --with-pgsql=/usr/local/pgsql
> 
> Problem appeares only on 5.2.1 p5. On earler versions everything works fine. If PHP compiled without PostgreSQL support Apache starts good. It was tested on two FreeBSD boxes.
> 
> $ ldd -a /usr/local/apache/bin/httpd
> /usr/local/apache/bin/httpd:
>         libcrypt.so.2 => /lib/libcrypt.so.2 (0x280f8000)
>         libc.so.5 => /lib/libc.so.5 (0x28111000)
> 
> $ ldd -a /usr/local/apache/libexec/libphp4.so
> /usr/local/apache/libexec/libphp4.so:
>         libcrypt.so.2 => /lib/libcrypt.so.2 (0x282ec000)
>         libpq.so.3 => /usr/local/pgsql/lib/libpq.so.3 (0x28305000)
>         libm.so.2 => /lib/libm.so.2 (0x2831b000)
> /usr/local/pgsql/lib/libpq.so.3:
>         libcrypt.so.2 => /lib/libcrypt.so.2 (0x282ec000)
>         libc_r.so.5 => /usr/lib/libc_r.so.5 (0x28334000)
> 
> All libraries present on system.

I'm not sure how it is on FreeBSD 5.x (we use 4.x, only), but linking 
with both 'libc.so.5' (Apache) and 'libc_r.so.5' (PHP4/PostgreSQL) 
doesn't look healthy to me.  Maybe it helps to compile PostgreSQL's 
client lib without threads, since Apache 1.3.x is a non-threaded 
application.

What I can't tell you, though, is why it fails only on 5.2.1 p5.  Maybe 
it worked just by chance, and now something has changed in the libs and 
it blows up.

    Uwe
-- 
Uwe Doering         |  EscapeBox - Managed On-Demand UNIX Servers
gemini@geminix.org  |  http://www.escapebox.net
Comment 3 Mark Linimon freebsd_committer freebsd_triage 2004-06-30 04:58:59 UTC
Responsible Changed
From-To: freebsd-bugs->ale

This is a ports bug, possibly to do with lang/php4, so assign 
it to ale@.  IMHO the libraries are indeed wrong, somehow.
Comment 4 Alex Dupre freebsd_committer freebsd_triage 2004-07-29 13:44:16 UTC
State Changed
From-To: open->closed

Working with the new PHP ports.