cphalcon: [BUG]: Application crash due to update php 7.4.8
Today I updated the php from 7.4.7 to 7.4.8 and the application on phalcon4 gives a 502 error.
Details
- Phalcon version: 4.0.6
- PHP Version: 7.4.8
- Operating System: Mint
- Installation type: Compiling from source
- Zephir version (if any): 0.12.17-6724dbf
- Server: Nginx
run phalcon servo logs Segmentation fault (core dumped)
nginx logs[error] 1843#1843: *1636 recv() failed (104: Connection reset by peer) while reading response header from upstream
php-fpm logs [pool www] child 31495 exited on signal 11 (SIGSEGV - core dumped) after 2.853970 seconds from start
I repeat, on version 7.4.7 everything is ok. Does anyone have such problems?
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 40 (12 by maintainers)
Commits related to this issue
- Build again --build-all (phalcon/cphalcon#15107) Improve code style and scripts Only depends on PHP Tap for build and test Cleanup Abstract classes — committed to shivammathur/homebrew-phalcon by shivammathur 4 years ago
- Build again --build-all (phalcon/cphalcon#15107) Improve code style and scripts Only depends on PHP Tap for build and test Cleanup Abstract classes — committed to shivammathur/homebrew-phalcon by shivammathur 4 years ago
@akiyamasensei555 I have also been experiencing these issues since PHP 7.4.8 updates.
In production, my hosting provider uses CloudLinux who have rebuilt the Phalcon package (in the same way that Remi’s repository rebuilt it, mentioned above). This is now working again, but we had to raise a support ticket with CloudLinux to ask them to rebuild the packages for us.
Locally on my macOS development server, I used PECL to install Phalcon. This morning, I tried upgrading to PHP 7.4.9 (without rebuilding Phalcon) and it did not work (same
zend_mm_heap errors).To fix this, I ran
pecl uninstall phalconfrom the Terminal. Then I went into the folder defined in php.ini asextension_dirand deletedphalcon.soas well. I then ranpecl install phalcon(which rebuilt it from source via PECL), ensured it was loaded in my php.ini file, and when I retried my app locally it was working again. I could log in and interacting with the database functioned correctly.I really do not know what caused the issue. For a short while, my only work around was to install PHP 7.3 with Phalcon 4.0.6 and develop off that instead, but I can at least report back today that a reinstallation via PECL worked for me on macOS. A build from source would probably also work.
I’m not sure if any of this helps you, but fingers crossed.
new package uploaded to the Remi’s repository, checked, working fine! https://git.remirepo.net/cgit/rpms/php/php-phalcon4.git/commit/?id=b800d15f35331fed35f6bb67bb9b84356a7f5ad1
I can confirm this with both the https://packagecloud.io/phalcon and http://ppa.launchpad.net/ondrej/php builds of Phalcon 4.0.6
Minimal test case to reproduce:
Re-building the extension from source reliably fixes the problem. I suspect there is some incompatibility at the ABI level in PHP 7.4.8.
Please could you upload a new package on packagecloud.io for version 4.0.6 built against PHP 7.4.8?
~PHP 7.4.8 and Phalcon 4.0.5 works without any issue.~
I have asked Remi to rebuild the package in remirepo: https://forum.remirepo.net/viewtopic.php?id=4024
I’ve made some tests and I’ve upgraded my phalcon extension to 4.0.6 (latest) version and I can’t reproduce problems I’ve faced.
I’ve faced two problems:
Now everything works fine but while I’ve installed phalcon via pecl I’ve received some errors and “Segmentation fault” in end of the process. Here is my command to update phalcon and it’s output
Later today I’ll test it on production and I’ll give you additional information.
UPDATE: After reinstall of phalcon everything works like a charm - tested in production environment
I have also experienced this issue and in my case it appears to be caused when I run apt update to update php7.4-phalcon with the latest PHP 7.4.8 update. I get a hard “Service Unavailable” 503 page with the text “The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.”
I have a PHP 7.4 server that doesn’t run Phalcon and it updated to PHP 7.4.8 just fine.
Luckily for me I was able to roll back to last night’s backup and recover or else I would be down hard right now.
Since I joined the party too late, and Phalcon 5 Alpha is also released, I had to checkout the branch for 4.1.2 before reinstalling. Just so everyone knows, I had exact same problem with Phalcon 4.1.2 running with PHP 7.4.3, MySQL 8.0.25 on Ubuntu 20.04 Here are my steps that fixed the issue.
git clone https://github.com/phalcon/cphalcon.gitcd cphalcon/git checkout tags/v4.1.2 ./cd build/sudo ./installsudo service apache2 restartI am also seeing the same error on CloudLinux (production environment, downgraded to PHP 7.3 as a workaround) and also installations via PECL on macOS development environments. Upgrades to PHP 7.4.8 appear to have triggered this in all cases for me: I was seeing lots of
zend_mm_heap corruptedlines in the error log. Recompile from source fixed it for me too, but PECL re-install is not working.great! Really, reinstalling the phalcon solves this problem and error 502 and error segmentation disappeared.
I just did the installation again
cd buildsudo ./installI still have the same version of Phalcon 4.0.6, but now everything works. Magic 😃
I’m facing the explained issue with php 7.4.8 (Ondrej built) with Phalcon 4.0.5
solved by:
and, to prevent upgrade create
/etc/apt/preferences.d/phpwith:@ruudboon It will be useful?