You are not logged in.

#1 2013-03-21 23:49:19

34634
Member
Registered: 2012-07-05
Posts: 11

[SOLVED] Cannot Start httpd - Segfault

Hello,

I am trying to setup Apache but am receiving an error when trying to start the daemon.

The error

/usr/sbin/apachectl: line 84:  7821 Segmentation fault      (core dumped) $HTTPD -k $ARGV

/var/log/messages shows

Mar 21 14:52:53 arch kernel: [  402.544664] httpd[14509]: segfault at 1c ip 00007f1a7b524786 sp 00007fffec1aad70 error 4 in libapr-1.so.0.4.6[7f1a7b506000+2f000]
Mar 21 14:52:53 arch apachectl[14498]: /usr/sbin/apachectl: line 84: 14509 Segmentation fault      (core dumped) $HTTPD -k $ARGV

I've had no luck when researching the issue, but I have found that there are other people with the same error here and here. The difference is that these errors seem to be caused from mod_perl and I do not have that installed.

When trying to start Apache in debug mode, it appears as though all of the modules load before crashing.

[34634@arch ~]$ apachectl -k start -e debug
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module authn_file_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module authn_dbm_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module authn_anon_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module authn_dbd_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module authn_default_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module authz_host_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module authz_groupfile_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module authz_user_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module authz_dbm_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module authz_owner_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module authnz_ldap_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module authz_default_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module auth_basic_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module auth_digest_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module file_cache_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module cache_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module disk_cache_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module mem_cache_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module dbd_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module dumpio_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module reqtimeout_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module ext_filter_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module include_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module filter_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module substitute_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module deflate_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module ldap_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module log_config_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module log_forensic_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module logio_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module env_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module mime_magic_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module cern_meta_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module expires_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module headers_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module ident_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module usertrack_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module unique_id_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module setenvif_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module version_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module proxy_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module proxy_connect_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module proxy_ftp_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module proxy_http_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module proxy_scgi_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module proxy_ajp_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module proxy_balancer_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module ssl_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module mime_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module dav_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module status_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module autoindex_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module asis_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module info_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module suexec_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module cgi_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module cgid_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module dav_fs_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module vhost_alias_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module negotiation_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module dir_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module imagemap_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module actions_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module speling_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module userdir_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module alias_module
[Thu Mar 21 16:45:53 2013] [debug] mod_so.c(246): loaded module rewrite_module
/usr/sbin/apachectl: line 84: 14312 Segmentation fault      (core dumped) $HTTPD $ARGV

EDIT:
Here is the code from line line 79.

ERROR=0
if [ "x$ARGV" = "x" ] ; then 
    ARGV="-h"
fi

case $ARGV in
start|stop|restart|graceful|graceful-stop)
    $HTTPD -k $ARGV
    ERROR=$?
    ;;
startssl|sslstart|start-SSL)
    echo The startssl option is no longer supported.
    echo Please edit httpd.conf to include the SSL configuration settings
    echo and then use "apachectl start".
    ERROR=2
    ;;
configtest)
    $HTTPD -t
    ERROR=$?
    ;;
status)
    $LYNX $STATUSURL | awk ' /process$/ { print; exit } { print } '
    ;;
fullstatus)
    $LYNX $STATUSURL
    ;;
*)
    $HTTPD $ARGV
    ERROR=$?
esac

exit $ERROR

Does anyone have any ideas for the cause of this?

Last edited by 34634 (2013-03-22 01:51:43)

Offline

#2 2013-03-22 01:51:31

34634
Member
Registered: 2012-07-05
Posts: 11

Re: [SOLVED] Cannot Start httpd - Segfault

Fixed, Apache had issues finding my hostname.

Solution is in the comments https://aur.archlinux.org/packages.php?ID=14141

Comment by mknod
2013-02-06 08:52
For those having a problem with xampp segfaulting, this is likely due to it not being able to look up your hostname. For some reason apache is crashing because of this. 

I had to add 

127.0.0.1 hostname.mydomain.com 

to /etc/hosts and now it starts without an issue. 

You can look up your hostname using the hostname command. 

If you want to try and see why it does this you can strace the apache process by doing 

strace /opt/lampp/bin/httpd

Offline

Board footer

Powered by FluxBB