Discussion:
PHP-5.5.2 +opcache segfaults with Piwik
Grant
2013-08-25 09:31:29 UTC
Permalink
I've tried php-5.5.2 and 5.5.3 but both segfault with piwik unless the
opcache is disabled. Someone filed a piwik bug but was told it's a
php bug:

http://dev.piwik.org/trac/ticket/4093

- Grant
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Grant
2013-09-01 09:13:54 UTC
Permalink
Post by Grant
I've tried php-5.5.2 and 5.5.3 but both segfault with piwik unless the
opcache is disabled. Someone filed a piwik bug but was told it's a
http://dev.piwik.org/trac/ticket/4093
- Grant
Is this a known issue?

- Grant
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Lester Caine
2013-09-01 11:59:18 UTC
Permalink
Post by Grant
Post by Grant
I've tried php-5.5.2 and 5.5.3 but both segfault with piwik unless the
Post by Grant
opcache is disabled. Someone filed a piwik bug but was told it's a
http://dev.piwik.org/trac/ticket/4093
Is this a known issue?
I'm running my own port of piwik in production with eaccelerator on 5.4 but I've
made the decision not to move any of the machines to 5.5 until all of the legacy
5.2 machines have been brought up to 5.4. Not an answer, but explains perhaps
why the problem is not being seen by others.
--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Jan Ehrhardt
2013-09-01 15:17:43 UTC
Permalink
Post by Grant
Post by Grant
I've tried php-5.5.2 and 5.5.3 but both segfault with piwik unless the
opcache is disabled. Someone filed a piwik bug but was told it's a
http://dev.piwik.org/trac/ticket/4093
Is this a known issue?
(...) Not an answer, but explains perhaps why the problem is not being
seen by others.
It is more likely that users do not notice it. I have Piwik running with
PHP 5.3 and php_opcache.dll (Centos 5) and it segfaults:

[Sun Sep 01 17:06:53.131410 2013] [core:notice] [pid 25411] AH00052:
child pid 25451 exit signal Segmentation fault (11)
[Sun Sep 01 17:08:18.561917 2013] [core:notice] [pid 25411] AH00052:
child pid 25453 exit signal Segmentation fault (11)
[Sun Sep 01 17:08:19.569714 2013] [core:notice] [pid 25411] AH00052:
child pid 25450 exit signal Segmentation fault (11)

However, nothing special is displaying on the page. You have to grep
your Apache error_log to know that it happens. How did you notice?

Jan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Jan Ehrhardt
2013-09-01 19:15:03 UTC
Permalink
Post by Grant
Post by Grant
I've tried php-5.5.2 and 5.5.3 but both segfault with piwik unless the
opcache is disabled. Someone filed a piwik bug but was told it's a
http://dev.piwik.org/trac/ticket/4093
Is this a known issue?
I changed the PHP on my (dev) Centos5 server to PHP 5.5.3, pulled the
latest OPcache from Github and tried to get a segfault. That was clearly
visible when I tried to access the Goals tab in the dashboard of one of
my websites. The page never got further than 'Loading data...' and my
Apache log showed a segfault.

So, if it was no known issue it is confirmed now.

Jan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Grant
2013-09-05 10:47:55 UTC
Permalink
Post by Grant
Post by Grant
I've tried php-5.5.2 and 5.5.3 but both segfault with piwik unless the
opcache is disabled. Someone filed a piwik bug but was told it's a
http://dev.piwik.org/trac/ticket/4093
- Grant
Is this a known issue?
- Grant
Is there anything I can do?

- Grant
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Jan Ehrhardt
2013-09-06 07:21:48 UTC
Permalink
Post by Grant
Post by Grant
Post by Grant
I've tried php-5.5.2 and 5.5.3 but both segfault with piwik unless the
opcache is disabled. Someone filed a piwik bug but was told it's a
http://dev.piwik.org/trac/ticket/4093
Is this a known issue?
Is there anything I can do?
Could you test if your problems are solved when you use the latest
opcache from github?
https://github.com/zendtech/ZendOptimizerPlus

Jan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Jan Ehrhardt
2013-09-02 08:57:14 UTC
Permalink
Post by Grant
I've tried php-5.5.2 and 5.5.3 but both segfault with piwik unless the
opcache is disabled. Someone filed a piwik bug but was told it's a
http://dev.piwik.org/trac/ticket/4093
Could you try to add a function_exists check to
libs/upgradephp/upgrade.php?

This at the function declaration of _json_encode:
if (!function_exists('_json_encode')) { function _json_encode($var, ...

And a extra } at the end.

This seemed to correct this fatal error on my side:

[02-Sep-2013 10:35:40 Europe/Paris] PHP Fatal error: Cannot redeclare
_json_encode() (previously declared in
/usr/local/lib/php/share/piwik/libs/upgradephp/upgrade.php:109) in
/usr/local/lib/php/share/piwik/libs/upgradephp/upgrade.php on line 109

I do not know what opcache has to do with it, although I suspect that
Piwik is calling itself a lot of times and that opcache is trailing
behind (or something like that).

Jan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Jan Ehrhardt
2013-09-02 13:51:53 UTC
Permalink
Post by Jan Ehrhardt
Could you try to add a function_exists check to
libs/upgradephp/upgrade.php?
if (!function_exists('_json_encode')) { function _json_encode($var, ...
And a extra } at the end.
This patch, together with upgrading to the latest OPcache from github
solved my segfaults and fatal errors.

Jan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Lester Caine
2013-09-02 14:42:33 UTC
Permalink
Post by Jan Ehrhardt
Post by Jan Ehrhardt
Could you try to add a function_exists check to
Post by Jan Ehrhardt
libs/upgradephp/upgrade.php?
if (!function_exists('_json_encode')) { function _json_encode($var, ...
And a extra } at the end.
This patch, together with upgrading to the latest OPcache from github
solved my segfaults and fatal errors.
Jan - could you post the solution on http://dev.piwik.org/trac/ticket/4093 -
better that you get the credit than one of us pinch it ;)
--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Daniel
2013-09-04 00:40:29 UTC
Permalink
Just so that you know, I've posted in the forum topic as well:
http://forum.piwik.org/read.php?2,105879
Regards,
Daniel Fenn
Post by Lester Caine
Post by Jan Ehrhardt
Post by Jan Ehrhardt
Could you try to add a function_exists check to
Post by Jan Ehrhardt
libs/upgradephp/upgrade.php?
if (!function_exists('_json_encode')) { function _json_encode($var, ...
And a extra } at the end.
This patch, together with upgrading to the latest OPcache from github
solved my segfaults and fatal errors.
Jan - could you post the solution on http://dev.piwik.org/trac/ticket/4093
- better that you get the credit than one of us pinch it ;)
--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Loading...