New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jetpack JSON API access crashes PHP-FPM running PHP 7.1 #6629
Comments
cc @georgestephanis who's worked on other PHP 7.1 oddities lately. |
This is affecting me too BTW. |
|
|
A quick and amusing check, on PHP 7.1 http://public-api.wordpress.com/rest/v1/sites/ipstenu.org shows up as a 404, but it works fine on PHP 7. |
Heard back on an upstream bug report that I believe is related -- I'm going to try and track down what we can do to work around this, but for info for y'all in progress -- https://bugs.php.net/bug.php?id=74213 |
I'm also have this problem, switch to php 7.0.x and work |
After upgrading the environment today to
there haven't been any crashes anymore. 👍 |
Hi, i have this error again. |
@camaran Could you try to update PHP to 7.1.4? It includes the following fix, that may help you: https://bugs.php.net/bug.php?id=74213 Let me know how it goes! |
Hi, i installed php 7.1.4 but i still with the problem. |
I am also experiencing the same crash with PHP 7.1.4 (from deb.sury.org), Wordpress 4.7.3 and Jetpack 4.8.2 running on Debian Jessie. |
@camaran @rraptorr Do you get errors similar to the ones mentioned in the original report above? |
I am getting segfaults on xmlrpc.php file. The problem is gone when switching back to php 7.0 or removing jetpack. This seems pretty similar to the original report. I was testing every PHP 7.1 version, since PHP 7.1.0. I was always getting this segfault and I am getting it still with PHP 7.1.4. |
After some testing I'm hitting the same issue: Ubuntu 16.04 The following in wp-config lets me perform a sync with Jetpack for the time being but I'm hoping this doesn't have to be permanent:
|
php 7.1.4 does not help with this issue |
Looks like I have the problem again after a while of success with either the WordPress.com and iOS app. 😩 The only configuration change in the last couple of days was removing php-xdebug. The rest were ordinary OS updates and reboots because of an updated kernel. Selectively turning off the opcache does work for me as well:
|
I have raised this issue last week. I have added opcache.enable = 0 to my domain's php.ini, but I cannot see any change. |
It is indeed a problem with opcache. |
Disabling opcache in The amount of headers sent/header validity still seems to me to be the possible root cause? My setup is a wp/jetpack via dokku (herokuish) ~ nginx-fpm If you don't want the extra config in the wordpress config you can also blacklist xmlrpc in the opcache config... http://php.net/manual/en/opcache.configuration.php#ini.opcache.blacklist-filename |
i think now is fixed with php 7.1.5 |
Well, for me it segfaults just the same with 7.1.5 |
@Ipstenu that isn't really a fix.. it's just a workaround IMHO |
I didn't call it a fix. I just said that it appears to be working as I'm one of the people facing this problem. If I don't report back with what has, and has not, worked, how can Automattic or anyone else know if their actual fix is headed in the right direction? :) |
@Ipstenu Sorry Mika, hope I didn't sound harsh.. this workaround has been mentioned before and will always work due to it disabling the feature in php that is not playing well with Jetpack in this instance. Going back months Automattic are well aware of this. (check the many threads where it is mentioned here on Github if you like) Again.. no attack intended.. sorry for the wrong use of words |
Appears to always work. More data, confirming the fix works in more environments, and replying to ones own bug reports, is considered good behavior in the open source community. I don't want to be DenverCoder9. And it's spelled with an A. Not an E. |
It's an opcache error.. disabling opcache in php 7.1 will always work around this error |
If XMLRPC v OpCache is the only part that causes the core dump, sure. |
Thank you all for the input! Just for the record, here's a bug report that I have submitted to PHP about this exact problem. It's not XMLRPC that causes the segfault, but apparently it's some code that gets called as part of the JSON API request that gets sent via XMLRPC. If you happen to know why that code can cause a segfault with opcache, or maybe how I can narrow down the exact cause, I'll be very grateful: |
Has anyone tried this with PHP 7.1.6 yet? There is one opcache bug fix in that update. Actually, I just tried 7.1.6 and the segfault bug still exists. |
Also reported here 3261025-t |
@kevinlisota just tested on 7.1.6 too, processes still segfault for me when responding to WordPress.com JSON API. What were the issues that were fixed with opcache? Can you post some links please? |
Here is the changelog for PHP 7.1.6: http://php.net/ChangeLog-7.php#7.1.6 There is one bugfix to opcache here: https://bugs.php.net/bug.php?id=74596 |
Changelog PHP 7.1.7RC1: https://github.com/php/php-src/blob/PHP-7.1.7/NEWS I don't know if it fixes it?
|
Also reported in 3266547-t |
It's still not working in PHP 7.1.7 |
@zinigor Any way to get PHP development team to look at the bug you filed? I see no activity on it |
Possible report 3332067-t |
@kevinlisota A good way would be to create a simple way to reproduce the segfault, which I haven't been able to do. You can see how far I have been able to progress in the bug report, but I haven't had more time to dig in. If you are able to produce a contained reproduction case, that would help tremendously! |
https://wordpress.org/support/topic/jetpack-causing-502-bad-gateway/ User is experiencing similar issues with PHP 7.0.15-0ubuntu0.16.04.4 |
614936-zen Sent them this workaround: #6629 (comment) |
630882-zenSent same work around as above. User would prefer to not troubleshoot. |
635556-zenSent same work around as above. |
620933-zen sent suggested workarounds. |
645154-zenSent same work around as above. |
Currently running on PHP 7.1.8 and having same issue. Disabling opcache works as a workaround |
PHP 7.1.9 and having the same problem. |
PHP 7.1.8 on serverpilot and having the same problem. Trouble shooting for hours until reading this thread. Switch to 7.0 on serverpilot, then it works right away. Thanks, guys! |
The Jetpack people noticed me about the freshly baked 5.3 update today: https://jetpack.com/2017/09/05/jetpack-5-3-php-7-1-compatibility/ Now works well with php 7.1. Hooray! |
Steps to reproduce the issue
What I expected
Blog posts are displayed.
What happened instead
App didn't display any content, only outlines of soon to be displayed blog posts.
Observation
PHP task crashes on every API access.
This behaviour also happens for other related API access.
Environment
Error logs
These are the nginx error logs intertwined with
php7.1-fpm.log
lines for better readability. Hostname was replaced by example.com.The text was updated successfully, but these errors were encountered: