# Apache 2.0.54 Segmentation fault after update world [solved]

## oghiwahn

Hi!

After emerging a fresh world @May 09, 2005 and restarting my apache2 yesterday, apache doesn't deliver any page anymore.

At first i removed mod_php from my config, cause it was updated. Nothing helps.

Here is my apache2 error log:

      [Tue May 10 21:44:42 2005] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec2)

      [Tue May 10 21:44:42 2005] [debug] mod_so.c(248): loaded module access_module

      [Tue May 10 21:44:42 2005] [debug] mod_so.c(248): loaded module auth_module

      [Tue May 10 21:44:42 2005] [debug] mod_so.c(248): loaded module auth_anon_module

      [Tue May 10 21:44:42 2005] [debug] mod_so.c(248): loaded module auth_dbm_module

      [Tue May 10 21:44:42 2005] [debug] mod_so.c(248): loaded module auth_digest_module

      [Tue May 10 21:44:42 2005] [debug] mod_so.c(248): loaded module charset_lite_module

      [Tue May 10 21:44:42 2005] [debug] mod_so.c(248): loaded module env_module

      [Tue May 10 21:44:42 2005] [debug] mod_so.c(248): loaded module expires_module

      [Tue May 10 21:44:42 2005] [debug] mod_so.c(248): loaded module headers_module

      [Tue May 10 21:44:42 2005] [debug] mod_so.c(248): loaded module mime_module

      [Tue May 10 21:44:42 2005] [debug] mod_so.c(248): loaded module negotiation_module

      [Tue May 10 21:44:42 2005] [debug] mod_so.c(248): loaded module setenvif_module

      [Tue May 10 21:44:42 2005] [debug] mod_so.c(248): loaded module log_config_module

      [Tue May 10 21:44:42 2005] [debug] mod_so.c(248): loaded module logio_module

      [Tue May 10 21:44:42 2005] [debug] mod_so.c(248): loaded module cgi_module

      [Tue May 10 21:44:42 2005] [debug] mod_so.c(248): loaded module cgid_module

      [Tue May 10 21:44:42 2005] [debug] mod_so.c(248): loaded module suexec_module

      [Tue May 10 21:44:42 2005] [debug] mod_so.c(248): loaded module alias_module

      [Tue May 10 21:44:42 2005] [debug] mod_so.c(248): loaded module rewrite_module

      [Tue May 10 21:44:42 2005] [debug] mod_so.c(248): loaded module actions_module

      [Tue May 10 21:44:42 2005] [debug] mod_so.c(248): loaded module autoindex_module

      [Tue May 10 21:44:42 2005] [debug] mod_so.c(248): loaded module dir_module

      [Tue May 10 21:44:42 2005] [debug] mod_so.c(248): loaded module status_module

      [Tue May 10 21:44:42 2005] [debug] mod_so.c(248): loaded module ext_filter_module

      [Tue May 10 21:44:42 2005] [debug] mod_so.c(248): loaded module deflate_module

      [Tue May 10 21:44:42 2005] [debug] mod_so.c(248): loaded module include_module

      [Tue May 10 21:44:42 2005] [notice] Digest: generating secret for digest authentication ...

      [Tue May 10 21:44:42 2005] [notice] Digest: done

      [Tue May 10 21:44:42 2005] [notice] Apache/2.0.54 (Gentoo/Linux) configured -- resuming normal operations

      [Tue May 10 21:44:55 2005] [notice] child pid 7264 exit signal Segmentation fault (11)

      [Tue May 10 21:44:56 2005] [notice] child pid 7265 exit signal Segmentation fault (11)

      [Tue May 10 21:44:57 2005] [notice] child pid 7266 exit signal Segmentation fault (11)

      [Tue May 10 21:44:57 2005] [notice] child pid 7267 exit signal Segmentation fault (11)

      [Tue May 10 21:44:57 2005] [notice] child pid 7269 exit signal Segmentation fault (11)

      [Tue May 10 21:44:58 2005] [notice] child pid 7290 exit signal Segmentation fault (11)

      [Tue May 10 21:44:58 2005] [notice] child pid 7291 exit signal Segmentation fault (11)

      [Tue May 10 21:44:58 2005] [notice] child pid 7292 exit signal Segmentation fault (11)

      [Tue May 10 21:44:58 2005] [notice] child pid 7293 exit signal Segmentation fault (11)

      [Tue May 10 21:45:00 2005] [notice] child pid 7294 exit signal Segmentation fault (11)

After some hours of searching apache2 dependencies and comparing with my emerge log, i found my deliverance:

Update of dev-libs/apr-0.9.6-r2 -> dev-libs/apr-0.9.6-r3 brakes apache a leg.

Maybe someone have the problem and could save a hour  :Wink: 

----------

## Tequilasour

Hi!

I encoutered the problem you mentioned and tried to solve it by re-emerging apr like this:

```

emerge -av =dev-libs/apr-0.9.6-r2

```

After that I re-emerged apache2 and on finishing that one, portage told me to re-emerge all the python modules. As far as I remember I have currently only installed the mod_python, which I re-emerged as well. Still my Apache won't show me a single page always failing with a segmenation fault (error log see below). Any more hints on that one?

If I didn't already gave away my status of being quite a newbie which isn't really comfortable with all this emerging stuff (not talking about posting in this forum)  :Embarassed:  , I might want to stress this fact here again  :Wink: 

[Thu May 12 12:09:27 2005] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec2)

[Thu May 12 12:09:27 2005] [notice] Digest: generating secret for digest authentication ...

[Thu May 12 12:09:27 2005] [notice] Digest: done

[Thu May 12 12:09:27 2005] [notice] mod_python: Creating 32 session mutexes based on 150 max processes and 0 max threads.

[Thu May 12 12:09:27 2005] [notice] Apache/2.0.54 (Gentoo/Linux) mod_python/3.1.4 Python/2.3.5 configured -- resuming normal operations

[Thu May 12 12:09:36 2005] [notice] child pid 9592 exit signal Segmentation fault (11)

----------

## oghiwahn

If you have the same Problem as I have, after a fresh update of your world, you can do as I've already done on my system.

Try a

```
equery depgraph apache
```

to have a clue, which packages depends on.

Have a look in your emerge.log and compare all new packages whith this list, installed since last successfull start of your apache.

I've also done a

```
ldd /usr/sbin/apache2
```

to find out which libraries were used.

I took this list and made for example a

```
equery belongs /usr/lib/libapr-0.so.0
```

to see, which packages,  relating to apache were updated.

----------

## holiday

Hi 

Same problem here. After re-emerging apr-0.9.6-r3, apr-util and apache (all ~x86) I could get working at least a simple html page. Width everything else needing any module I still get the segementation fault. I suppose it has to do with the new apr package. Maybe you'll have to re-emerge every package witch depends on apr?

----------

## Tequilasour

Thanx!

I could solve the problem with your solutions. I re-emerged apr-util and after that apache and mod_python and everything works fine now. I didn't know about equery before - this gentoolkit seems to be quite useful!

----------

## Lawless

I still can't it get to work... I re-emerged apache, apr (newest and the old version), apr-util, mod_php... still segmenation fault no matter if it is a simple html or php page...

----------

## Tequilasour

You might have thought of it, but I guess the order, in which you emerge stuff is pretty important, because of the dependencies.

I started by re-emerging that apr-lib (see above)

After that I think it's best to emerge apr-util, then apache and last but least the modules.

----------

## Lawless

Yes I did emerge apr first, then apr-util, then the others...

----------

## asandor

I was having the same problem. I found that I had to emerege mod_php-4.3.11-r1. That fixed it on my end.

Alex

----------

## yamakawa

In my case,

```
emerge --oneshot mod_php
```

does it!  :Very Happy: 

----------

## Lawless

Ah I finally got it by re-emerging all the packages again but deleting the distfiles before...

----------

## Mindstab

I'm not sure if this is related but i've also been having some problems with the new apache versions.  I cannot seem to get it to accept connections using forms with hte post method with out segfaulting.  Everything else works.  Pages, pages with get method forms. but post method forms seg fault.  Any ideas?

apr-0.9.6-r2

apr-utils-0.9.6-r2

apache 2.0.54-r5

----------

## erossetto

Hmm I'm having the same issue.

----------

## erossetto

I've just re-emerged apr apr-utils and apache, and got this message:

 *Quote:*   

>  * LFS support has been removed due to incompatibilites with other packages.
> 
>  * You _will_ have to re-emerge any Apache modules you have installed, or
> 
>  * they will likely misbehave/segfault.

 

So thats the solution....

----------

## obitori

I am experiencing the same problem.  Even with no make.conf USE variables, I get a seg fault.  I don't think I expressly installed anything other than mod_php-5 which was a task unto itself, but I temporarily removed the -D config directives for ssl, php5, and userdir, so I'm confused as to how this could be the problem.  How do I test for other mod_xxx? in my setup?

Bud 

Falls Church, VA

```
potomac apache # USE='-*' emerge apache -av

These are the packages that I would merge, in order:

Calculating dependencies ...done!

[ebuild   R   ] net-www/apache-2.0.54-r11  -apache2 -debug -doc -ldap -mpm-leader -mpm-peruser -mpm-prefork -mpm-threadpool -mpm-worker -no-suexec -ssl -static-modules -threads 0 kB

Total size of downloads: 0 kB

Do you want me to merge these packages? [Yes/No] Interrupted.

potomac apache # lynx localhost

Exiting via interrupt: 2

potomac apache # tail /var/log/apache2/error_log

[Fri Jun 10 20:51:18 2005] [notice] Apache configured -- resuming normal operations

[Fri Jun 10 21:01:46 2005] [notice] child pid 7956 exit signal Segmentation fault (11)

[Fri Jun 10 21:01:48 2005] [notice] child pid 7958 exit signal Segmentation fault (11)

[Sun Jun 12 12:08:53 2005] [notice] caught SIGTERM, shutting down

[Sun Jun 12 12:11:37 2005] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec2)

[Sun Jun 12 12:11:37 2005] [notice] Digest: generating secret for digest authentication ...

[Sun Jun 12 12:11:37 2005] [notice] Digest: done

[Sun Jun 12 12:11:37 2005] [notice] Apache configured -- resuming normal operations

[Sun Jun 12 12:11:42 2005] [notice] child pid 7745 exit signal Segmentation fault (11)

[Sun Jun 12 12:17:02 2005] [notice] child pid 7746 exit signal Segmentation fault (11)

potomac apache # time

real    0m0.000s

user    0m0.000s

sys     0m0.000s

potomac apache # date

Sun Jun 12 12:17:29 EDT 2005

potomac apache # ps ax | grep httpd >> log

potomac apache # cat log

 7743 ?        Ss     0:00 /usr/sbin/apache2 -d /usr/lib/apache2 -f /etc/apache2/httpd.conf -k start

 7744 ?        S      0:00 /usr/sbin/apache2 -d /usr/lib/apache2 -f /etc/apache2/httpd.conf -k start

 7747 ?        S      0:00 /usr/sbin/apache2 -d /usr/lib/apache2 -f /etc/apache2/httpd.conf -k start

 7748 ?        S      0:00 /usr/sbin/apache2 -d /usr/lib/apache2 -f /etc/apache2/httpd.conf -k start

 7749 ?        S      0:00 /usr/sbin/apache2 -d /usr/lib/apache2 -f /etc/apache2/httpd.conf -k start

 7751 ?        S      0:00 /usr/sbin/apache2 -d /usr/lib/apache2 -f /etc/apache2/httpd.conf -k start

 7758 ?        S      0:00 /usr/sbin/apache2 -d /usr/lib/apache2 -f /etc/apache2/httpd.conf -k start

 7762 pts/4    R+     0:00 grep httpd

potomac apache # cp /etc/apache2/httpd.conf ~/httpd.conf

potomac apache # cd

potomac ~ # vi httpd.conf

potomac ~ # cat /etc/conf.d/apache2

# Copyright 1999-2004 Gentoo Foundation

# Distributed under the terms of the GNU General Public License v2

# $Header: /var/cvsroot/gentoo-src/apache/dist/2.0/init/apache2.confd,v 1.2 2005/06/01 10:02:37 hollow Exp $

# Config file for /etc/init.d/apache2

# An example from /etc/apache2/modules.d/40_mod_ssl.conf:

#

# <IfDefine SSL>

#  <IfModule !mod_ssl.c>

#    LoadModule ssl_module    extramodules/mod_ssl.so

#  </IfModule>

# </IfDefine>

#

# This means that the mod_ssl.so DSO module is only loaded

# into the server when you pass "-D SSL" at startup.  To

# enable WebDAV, add "-D DAV -D DAV_FS".  If you installed

# mod_php then add "-D PHP4".  For more options, please

# read the files in the /etc/apache2/modules.d directory.

#APACHE2_OPTS="-D SSL -D PHP5 -D USERDIR"

# Extended options for advanced uses of Apache ONLY

# You don't need to edit these unless you are doing crazy Apache stuff

# As not having them set correctly, or feeding in an incorrect configuration

# via them will result in Apache failing to start

# YOU HAVE BEEN WARNED.

# ServerRoot setting

#SERVERROOT=/usr/lib/apache2

# Configuration file location

# - If this does NOT start with a '/', then it is treated relative to

# $SERVERROOT by Apache

#CONFIGFILE=conf/httpd.conf

# Location to log startup errors to

# They are normally dumped to your terminal.

#STARTUPERRORLOG="/var/log/apache2/startuperror.log"

potomac ~ # /etc/init.d/apache2 configtest

 * Checking Apache Configuration ...                                        [ ok ]

potomac ~ #

potomac ~ #                                   

```

----------

## obitori

Alright, that was easier than I thought.  /etc/apache/modules.d/ contains the modules that would need updating.

I did:

emerge apr 

emerge apr-utils

emerge apache

emerge mod_ssl

emerge mod_php

emerge mailman  (I don't know if this was necessary, but it was in modules.d and I'd not actually used it yet.)

So, I'm still compiling...

----------

## TheZog

I'm getting the same seg fault error message and I've re-emerged glibc, apr, apr-util, apache, mod_php, mod_perl, mod_python, etc.

I have also run apache without any modules loaded (ssl, php, perl or python).

It doesn't work for simple html files either.

I'm completely out of ideas and would love some suggestions.

7/22

OK, Now I've re-emerged empty world, but it still croaks.

7/23

Well It seems that Aapche works fine for version 2.0.54-r10, but croaks on r11 or r12. No idea why or what changed.

----------

