# apache segfaults after php-5.3 and openssl-1.0 update

## Leopard

Hello,

i updated php-5.2.14 to php-5.3.3-r1 and openssl-0.9.8o to openssl-1.0.0a-r3.

I did revdep-rebuild --library libssl.so.0.9.8 and libcrypto.so.0.9.8.

First apache complained about openssl.so missing, so i removed /etc/php/apache2-php5/ext-active/openssl.ini.

Now every time i visit my phpbb 3.0.7 forum, i get the following error in /var/log/apache2/error_log:

```
[Fri Oct 22 17:56:25 2010] [notice] child pid 16615 exit signal Segmentation fault (11)
```

Other php pages are working.

What did i do wrong?

```
emerge -pv php openssl apache 

These are the packages that would be merged, in order:

Calculating dependencies... done!

[ebuild   R   ] dev-libs/openssl-1.0.0a-r3  USE="zlib -bindist -gmp -kerberos -rfc3779 -sse2 -test" 0 kB

[ebuild   R   ] www-servers/apache-2.2.16  USE="ssl -debug -doc -ldap (-selinux) -static -suexec -threads" APACHE2_MODULES="actions alias asis auth_basic auth_digest authn_alias authn_anon authn_default authn_file authz_default authz_groupfile authz_host authz_owner authz_user autoindex cgi dav dav_fs dav_lock deflate dir env expires ext_filter filter headers include info log_config logio mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias -authn_dbd -authn_dbm -authz_dbm -cache -cern_meta -cgid -charset_lite -dbd -disk_cache -dumpio -file_cache -ident -imagemap -log_forensic -mem_cache -proxy -proxy_ajp -proxy_balancer -proxy_connect -proxy_ftp -proxy_http -substitute -version" APACHE2_MPMS="prefork -event -itk -peruser -worker" 0 kB                                                                                                            

[ebuild   R   ] dev-lang/php-5.3.3-r1  USE="apache2 bzip2 calendar cgi cli crypt ctype fileinfo filter gd hash iconv ipv6 json mysql mysqli nls phar posix readline session sharedext simplexml snmp ssl tokenizer truetype unicode xml xmlreader xmlwriter xsl zip zlib -adabas -bcmath -berkdb -birdstep -cdb -cjk -concurrentmodphp -curl -curlwrappers -db2 -dbmaker -debug -doc -embed -empress -empress-bcs -enchant -esoob -exif -firebird -flatfile -fpm -frontbase -ftp -gd-external -gdbm -gmp -imap -inifile -interbase -intl -iodbc -kerberos -kolab -ldap -ldap-sasl -libedit -mssql -mysqlnd -oci8 -oci8-instant-client -odbc -pcntl -pdo -pic -postgres -qdbm -recode -sapdb -sharedmem -soap -sockets -solid -spell -sqlite -sqlite3 -suhosin -sybase-ct -sysvipc -threads -tidy -wddx -xmlrpc -xpm" 0 kB
```

```
emerge --info                  

Portage 2.1.8.3 (default/linux/x86/10.0, gcc-4.4.3, glibc-2.11.2-r0, 2.6.32.7 i686)

=================================================================

System uname: Linux-2.6.32.7-i686-AMD_Athlon-tm-_processor-with-gentoo-1.12.13

Timestamp of tree: Thu, 21 Oct 2010 15:15:03 +0000

app-shells/bash:     4.1_p7

dev-lang/python:     2.5.4-r4, 2.6.5-r3, 3.1.2-r4

dev-util/cmake:      2.8.1-r2

sys-apps/baselayout: 1.12.13

sys-apps/sandbox:    2.3-r1

sys-devel/autoconf:  2.13, 2.65-r1

sys-devel/automake:  1.10.3, 1.11.1

sys-devel/binutils:  2.20.1-r1

sys-devel/gcc:       4.1.2, 4.3.4, 4.4.3-r2

sys-devel/gcc-config: 1.4.1

sys-devel/libtool:   2.2.10

sys-devel/make:      3.81-r2

virtual/os-headers:  2.6.30-r1

ACCEPT_KEYWORDS="x86"

ACCEPT_LICENSE="* -@EULA"

CBUILD="i686-pc-linux-gnu"

CFLAGS="-O2 -march=athlon -fomit-frame-pointer"

CHOST="i686-pc-linux-gnu"

CONFIG_PROTECT="/etc"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"

CXXFLAGS="-O2 -march=athlon -fomit-frame-pointer"

DISTDIR="/usr/portage/distfiles"

FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"

GENTOO_MIRRORS="ftp://gd.tuwien.ac.at/opsys/linux/gentoo/ http://gentoo.mirror.icd.hu/"

LDFLAGS="-Wl,-O1 -Wl,--as-needed"

LINGUAS="de"

PKGDIR="/usr/portage/packages"

PORTAGE_CONFIGROOT="/"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

SYNC="rsync://rsync6.de.gentoo.org/gentoo-portage"

USE="acl apache2 berkdb bzip2 cracklib crypt cxx dri fortran gdbm gpm iconv ipv6 jpeg modules mudflap mysql ncurses nls nptl nptlonly openmp pam perl png pppd python readline snmp ssl sysfs tcpd tiff truetype unicode vhosts x86 xml xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="cgi actions alias auth_basic authn_alias authn_anon authn_default authn_file authz_default authz_groupfile authz_host authz_owner authz_user autoindex dav dav_fs dav_lock deflate dir env expires ext_filter filter headers include info log_config logio mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias asis auth_digest" APACHE2_MPMS="prefork" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de" PHP_TARGETS="php-5.2" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nouveau nv r128 radeon savage sis tdfx trident vesa via vmware voodoo" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
```

Best regards,

Leo

----------

## ToeiRei

Hi Leo,

it looks like you have a mix of stable and unstable packages.

You can also try to replace the prefork worker with the itk...

----------

## Leopard

 *ToeiRei wrote:*   

> it looks like you have a mix of stable and unstable packages.

 

Where can i see which packages are unstable? I don't know of any unstable packages beside cyrus-imapd.

 *ToeiRei wrote:*   

> You can also try to replace the prefork worker with the itk...

 

I will change the mpm after i followed the troubleshoot instructions (http://www.gentoo.org/proj/en/apache/doc/troubleshooting.xml#doc_chap3) again.

Do i really need to uninstall apache or does a reemerge suffice?

----------

## ToeiRei

emerging it again does the trick.

----------

## Leopard

I did but it did not solve the problem.

If i enter the website of my phpbb forum, the browser wants to download the index.php (it's empty) and a apache child dies with signal 11.

itk didn't work either.

I downgraded to php-5.2.14 and now it works again.

So Php-5.3.3 casues the problem.

----------

## zaanpenguin

I'm having the same problem. I have PHP 5.2.14-r2 and PHP 5.3.3 working side-by-side.

Switching to 5.2.14 did not solve this, I'm still seeing some PHP scripts return empty pages and some work fine. 

Oddly, I'm seeing this behavior when I visit a normal page through HTTPS as well. Is this a bug in OpenSSL?

----------

## zaanpenguin

I have solved the problem here. Try downgrading to GCC 4.4.5. Apparently GCC 4.5.1 compiles Apache improperly.

----------

## SoLoR

I have same problem... noticed it on 29th after latest apache update when apache recompiled with GCC 4.5.1, im currently downgrading GCC in attemp to see if this fixes for me.

----------

## jlpoole

My Apache instance has been toast for a couple of weeks after a routine upgrade.  Apache segment faults right at the outset.  I've tried recompiling using 4.4.5 instead of the 4.5.1, but no luck.  I'm wondering if there are dependencies that may have been compiled by 4.5.1, too.

----------

## jpf

downgrading to gcc 4.4.5 fixed my problems with apache/openssl.

----------

## jlpoole

 *jpf wrote:*   

> downgrading to gcc 4.4.5 fixed my problems with apache/openssl.

 

I recompiled with 4.4.5:

```
plug ~ # gcc-config -l

 [1] armv5tel-softfloat-linux-gnueabi-4.4.5 *

 [2] armv5tel-softfloat-linux-gnueabi-4.5.1

plug ~ #

plug ~ # eix www-servers/apache

[I] www-servers/apache

     Available versions:  (2) 2.2.14-r1 2.2.15 2.2.16 ~2.2.16-r1

        {apache2_modules_actions apache2_modules_alias apache2_modules_asis apache2_modules_auth_basic apache2_modules_auth_digest apache2_modules_authn_alias apache2_modules_authn_anon apache2_modules_authn_dbd apache2_modules_authn_dbm apache2_modules_authn_default apache2_modules_authn_file apache2_modules_authz_dbm apache2_modules_authz_default apache2_modules_authz_groupfile apache2_modules_authz_host apache2_modules_authz_owner apache2_modules_authz_user apache2_modules_autoindex apache2_modules_cache apache2_modules_cern_meta apache2_modules_cgi apache2_modules_cgid apache2_modules_charset_lite apache2_modules_dav apache2_modules_dav_fs apache2_modules_dav_lock apache2_modules_dbd apache2_modules_deflate apache2_modules_dir apache2_modules_disk_cache apache2_modules_dumpio apache2_modules_env apache2_modules_expires apache2_modules_ext_filter apache2_modules_file_cache apache2_modules_filter apache2_modules_headers apache2_modules_ident apache2_modules_imagemap apache2_modules_include apache2_modules_info apache2_modules_log_config apache2_modules_log_forensic apache2_modules_logio apache2_modules_mem_cache apache2_modules_mime apache2_modules_mime_magic apache2_modules_negotiation apache2_modules_proxy apache2_modules_proxy_ajp apache2_modules_proxy_balancer apache2_modules_proxy_connect apache2_modules_proxy_ftp apache2_modules_proxy_http apache2_modules_proxy_scgi apache2_modules_reqtimeout apache2_modules_rewrite apache2_modules_setenvif apache2_modules_speling apache2_modules_status apache2_modules_substitute apache2_modules_unique_id apache2_modules_userdir apache2_modules_usertrack apache2_modules_version apache2_modules_vhost_alias apache2_mpms_event apache2_mpms_itk apache2_mpms_peruser apache2_mpms_prefork apache2_mpms_worker debug doc ldap selinux ssl static suexec threads}

     Installed versions:  2.2.16(2)(10:11:53 AM 12/06/2010)(apache2_modules_actions apache2_modules_alias apache2_modules_auth_basic apache2_modules_auth_digest apache2_modules_authn_alias apache2_modules_authn_anon apache2_modules_authn_dbd apache2_modules_authn_dbm apache2_modules_authn_default apache2_modules_authn_file apache2_modules_authz_dbm apache2_modules_authz_default apache2_modules_authz_groupfile apache2_modules_authz_host apache2_modules_authz_owner apache2_modules_authz_user apache2_modules_autoindex apache2_modules_cache apache2_modules_cgi apache2_modules_cgid apache2_modules_dav apache2_modules_dav_fs apache2_modules_dav_lock apache2_modules_dbd apache2_modules_deflate apache2_modules_dir apache2_modules_disk_cache apache2_modules_env apache2_modules_expires apache2_modules_ext_filter apache2_modules_file_cache apache2_modules_filter apache2_modules_headers apache2_modules_include apache2_modules_info apache2_modules_log_config apache2_modules_log_forensic apache2_modules_logio apache2_modules_mem_cache apache2_modules_mime apache2_modules_mime_magic apache2_modules_negotiation apache2_modules_proxy apache2_modules_proxy_ajp apache2_modules_proxy_balancer apache2_modules_proxy_connect apache2_modules_proxy_ftp apache2_modules_proxy_http apache2_modules_rewrite apache2_modules_setenvif apache2_modules_speling apache2_modules_status apache2_modules_unique_id apache2_modules_userdir apache2_modules_usertrack apache2_modules_vhost_alias ssl -apache2_modules_asis -apache2_modules_cern_meta -apache2_modules_charset_lite -apache2_modules_dumpio -apache2_modules_ident -apache2_modules_imagemap -apache2_modules_substitute -apache2_modules_version -apache2_mpms_event -apache2_mpms_itk -apache2_mpms_peruser -apache2_mpms_prefork -apache2_mpms_worker -debug -doc -ldap -selinux -static -suexec -threads)

     Homepage:            http://httpd.apache.org/

     Description:         The Apache Web Server.

plug ~ #

```

I also recompiled dev-libs/openssl-1.0.0c with 4.4.5 and the problem does not go away.

I have a bug pending  #347910 filed on 12/6 which remains unassigned at the moment.

----------

