php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #70380 Segfault in libphp7.so upon apache start
Submitted: 2015-08-28 09:13 UTC Modified: 2015-12-13 04:22 UTC
Votes:9
Avg. Score:3.8 ± 0.9
Reproduced:8 of 8 (100.0%)
Same Version:5 (62.5%)
Same OS:2 (25.0%)
From: Birman at Cerberox dot com Assigned:
Status: No Feedback Package: Apache2 related
PHP Version: 7.0.0RC1 OS: CentOS 7.1.1503
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: Birman at Cerberox dot com
New email:
PHP Version: OS:

 

 [2015-08-28 09:13 UTC] Birman at Cerberox dot com
Description:
------------
Followed this guide here: http://php7.zend.com/repo.php
Did exactly what it said. Also disabled the libphp5 module from loading inside /etc/httpd/conf/httpd.conf.

When starting httpd service, it says it couldn't start and this can be found in the journal:

-- Unit httpd.service has begun starting up.
Aug 28 10:04:10 ns369670 httpd[4162]: [Fri Aug 28 10:04:10.396870 2015] [so:warn] [pid 4162] AH01574: module rewrite_module is already loaded, skipping
Aug 28 10:04:10 ns369670 kernel: httpd[4162]: segfault at 0 ip 00007f60d5a86c9d sp 00007fffb76c3070 error 4 in libphp7.so[7f60d5599000+b8c000]
Aug 28 10:04:10 ns369670 systemd[1]: httpd.service: main process exited, code=killed, status=11/SEGV
Aug 28 10:04:10 ns369670 kill[4164]: kill: cannot find process ""
Aug 28 10:04:10 ns369670 systemd[1]: httpd.service: control process exited, code=exited status=1
Aug 28 10:04:10 ns369670 systemd[1]: Failed to start The Apache HTTP Server.

Perhaps it's also relevant that I first followed this guide for installing php7: http://linoxide.com/linux-how-to/install-php-7-centos-7-fedora-21/
It didn't come with "make uninstall" though, so there are leftovers somewhere.

Apache version 2.4.6.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-08-28 13:08 UTC] laruence@php.net
-Status: Open +Status: Feedback
 [2015-08-28 13:08 UTC] laruence@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.


 [2015-08-28 22:03 UTC] Birman at Cerberox dot com
-Status: Feedback +Status: Open
 [2015-08-28 22:03 UTC] Birman at Cerberox dot com
I have the backtrace file. I wasn't sure how to add it here, so I uploaded it somewhere else: http://www.upload.ee/download/5164096/6e9d6cec2876e6775ce/core-httpd.25133
That's a direct link for download.
 [2015-08-31 13:44 UTC] laruence@php.net
use gdb open it, then paste the backtrace output here (text)
 [2015-08-31 13:46 UTC] laruence@php.net
-Status: Open +Status: Feedback
 [2015-09-01 07:46 UTC] Birman at Cerberox dot com
-Status: Feedback +Status: Open
 [2015-09-01 07:46 UTC] Birman at Cerberox dot com
Do you mean this:

[New LWP 3686]
Reading symbols from /usr/sbin/httpd...Reading symbols from /usr/lib/debug/usr/sbin/httpd.debug...done.
done.
Missing separate debuginfo for /usr/lib64/httpd/modules/libphp7.so
Try: yum --enablerepo='*debug*' install /usr/lib/debug/.build-id/9b/4f26c922cbe8b248ea5d2b906b4d7a04efe406
Missing separate debuginfo for
Try: yum --enablerepo='*debug*' install /usr/lib/debug/.build-id/64/de62eaa6d0191ead9358297d64406988d7ed66
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `httpd -X'.
Program terminated with signal 11, Segmentation fault.
#0  0x00007f89431d3c9d in _emalloc (size=288) at /usr/local/src/php/Zend/zend_alloc.c:2376
2376    /usr/local/src/php/Zend/zend_alloc.c: No such file or directory.

Do I need to install all those things it asks me? There are like 50+ more. It feels excessive.
 [2015-09-01 15:48 UTC] laruence@php.net
yeah, please paste them all, thanks
 [2015-09-08 12:34 UTC] Birman at Cerberox dot com
[New LWP 31943]
Reading symbols from /usr/sbin/httpd...Reading symbols from /usr/lib/debug/usr/sbin/httpd.debug...done.
done.
Missing separate debuginfo for /usr/lib64/httpd/modules/libphp7.so
Try: yum --enablerepo='*debug*' install /usr/lib/debug/.build-id/9b/4f26c922cbe8b248ea5d2b906b4d7a04efe406
Missing separate debuginfo for
Try: yum --enablerepo='*debug*' install /usr/lib/debug/.build-id/64/de62eaa6d0191ead9358297d64406988d7ed66
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `httpd -X'.
Program terminated with signal 11, Segmentation fault.
#0  0x00007f853a212c9d in _emalloc (size=288) at /usr/local/src/php/Zend/zend_alloc.c:2376

warning: Source file is more recent than executable.
2376            if (UNEXPECTED(AG(mm_heap)->use_custom_heap)) {

That's the best it offered me. The 50+ things it asked me to install were actually already installed.
 [2015-09-10 15:46 UTC] krihog at gmail dot com
Had the same error when trying to restart apache after following that guide. What i did to solve it was to run:
sudo a2dismod php5

and then restarting the apache2 service, after that it all worked
 [2015-10-11 02:10 UTC] Birman at Cerberox dot com
It tells me that there is no such command as "a2dismod" when I try this.
Just attempted again after downloading repos. Still same problem
 [2015-12-05 07:51 UTC] prionkor dot business at gmail dot com
I have the exact same problem. Was you able to resolve this? I am using centos 7.1 with apache 2.4.6 in a vagrant box
 [2015-12-05 14:26 UTC] rasmus@php.net
-Status: Open +Status: Feedback
 [2015-12-05 14:26 UTC] rasmus@php.net
Check your Apache configuration files and make sure you are not loading both php5 and php7 into Apache. You should see something like:

LoadModule php7_module modules/libphp7.so

If you also have:

LoadModule php5_module modules/libphp5.so

then delete the php5 one.
 [2015-12-13 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 [2017-06-04 08:50 UTC] zhupiter at gmail dot com
o Environment

OS: CentOS 6.x
PHP: php5 was installed by yum, and php7 was make & installed from the source tarball.

o Possible solution:

Disable the libphp5.so in both of /etc/httpd/conf/httpd.conf and /etc/httpd/conf.d/php.conf if any.
 [2024-07-01 03:35 UTC] sounderweaver at gmail dot com
I also had the same problem. Can you solve this problem? I am using centos 7.1 with apache 2.4.6 in a vagrant box.
(https://github.com)(https://geometrydash-free.io)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 11:01:30 2024 UTC