Closed ck-on closed 11 years ago
Is there a reproduceable script?
and, what's the backtrace is?
@laruence Sorry, unfortunately I do not know how to do a backtrace? Are you saying php-fpm should have shown one with the segfault?
The script was my control panel: https://gist.github.com/ck-on/4959032 Simply triggering "recheck" (with an updated file elsewhere) was enough to cause the segfault and the invalidate never happened.
Basically I run the server with a very high revalidate_freq to disable file stat and manually trigger invalidate when scripts are (rarely) updated. Until this commit, the process worked perfectly.
see here how to generate a backtrace: http://bugs.php.net/bugs-generating-backtrace.php
since I can not see a reason for that change cause the segfault for now, so a backtrace could be useful
thanks
It doesn't crash for me on PHP 5.5.0-dev fpm-fcgi Linux, built on May 2 2013 04:19:33 CEST.
Will recompile and test again tonight (12+ hours from now). Sorry I cannot do it sooner, other obligations.
I apologize as I am unable to reproduce the problem now despite recompiling the master.
I have no idea why I was able to repeatedly trigger it the other night.
If I see it again I will attempt to document and debug it more carefully.
okey, then close now, you can re-open this if you encounter this issue again.
I just encountered the segfault problem again with invalidate.
Something I just realized is it might be happening when the cache is in state of very little memory free, there was only 10M available (out of 128M) so maybe it was not able to allocate the memory needed?
But that would imply the memory tracking is inaccurate? There was no "cache full" count triggered.
Perhaps the little free memory left was so fragmented that it could not allocate a block big enough for updating the invalidated script. That might explain it?
Resetting the cache (while keeping it still running) immediately returned everything to normal.
could you please try to get a backtrace of that segfault? that will be easy for us to track it down
The new invalidate function has been working great (thanks!) until one of the commits on April 28th
Consistently causes this now:
kernel: php-fpm[13804]: segfault at 0 ip 00007fdf431b2dca sp 00007fff8ad32b60 error 4 in opcache.so[7fdf431a8000+21000]
php-fpm 5.4.16-dev on 64bit centos 6.4
Will try to figure out how to roll back a commit or two, to see which one it is...
added:
okay this commit breaks it, I think "Avoid possible conditional jump depended on uninitialised value" https://github.com/zend-dev/ZendOptimizerPlus/commit/95b1b4e06c539631707d7c05490f1e648f302512
I was able to use the previous commit without any problems with invalidate