Score:0

how to resolve Apache apachectl[5465]: Segmentation fault (core dumped)?

us flag

I recently ran an apt upgrade and while everything seemed fine, now when I try and get apache2 running I run into the following issues,

$ sudo systemctl start apache2
Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xe" for details.
$ systemctl status apache2
● apache2.service - The Apache HTTP Server
     Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Thu 2022-02-10 13:35:40 PST; 30s ago
       Docs: https://httpd.apache.org/docs/2.4/
    Process: 6919 ExecStart=/usr/sbin/apachectl start (code=exited, status=139)

Feb 10 13:35:39 Mythbox systemd[1]: Starting The Apache HTTP Server...
Feb 10 13:35:40 Mythbox apachectl[6919]: Segmentation fault (core dumped)
Feb 10 13:35:40 Mythbox apachectl[6919]: Action 'start' failed.
Feb 10 13:35:40 Mythbox apachectl[6919]: The Apache error log may have more information.
Feb 10 13:35:40 Mythbox systemd[1]: apache2.service: Control process exited, code=exited, status=139/n/a
Feb 10 13:35:40 Mythbox systemd[1]: apache2.service: Failed with result 'exit-code'.
Feb 10 13:35:40 Mythbox systemd[1]: Failed to start The Apache HTTP Server.
~$ sudo apachectl configtest
Syntax OK

Nothing presents in the error log, and that is with loglevel set to debug, so whatever is happening isn't getting that far. I've tried an apt reinstall apache2 but that didn't make a difference.

At this point I'm stuck in what to do to figure out what is going on. Any ideas?

in flag
Which error log(s) have you looked at? If there isn’t something in `/var/log/apache2/error.log`, then there should be something in `/var/log/syslog`
David avatar
cn flag
What version of Ubuntu? Server Desktop or Core version?
Score:0
us flag

On a hunch, I went through and disabled all the apache2 mods, then slowly enabled them, one by one, until I found the one that was causing the crash.

It turned out to be apache2 was trying to load php7.4 and php8.1 which causes the crash. Load just one and it's fine.

Amjith avatar
fk flag
You may explain it how you did. I am also facing same situation now.
Score:0
cn flag

I faced a similar issue with the error message "Apache apachectl[5465]: Segmentation fault (core dumped)" and managed to find a solution that worked for me.

In my case, the problem was related to the php8.2 module. I was able to resolve it by disabling the php8.2 module using the a2dismod command:

sudo a2dismod php8.2
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.