-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Segfault while copying parent interfaces table #10070
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
Comments
Apparently, an inheritance cache issue. |
Might be worth tagging @dstogov then :) |
|
Unfortunately, I can't guess the reason of failure. Could you please analyse core dump at the line where crash occurs and print all the used data.
I suspect |
And we don't use file cache. |
I have no ideas. To fix this, I need a way to reproduce the crash (locally or in some container/VM/remote host). |
I have no way of reproducing this yet, but I wonder if #10719 fixed this... |
Very probably that patch might fix your case as well. Unfortunately, nothing can be proved without a reproduction scenario. |
@danog Are you not hitting this issue at all anymore? In that case I would suggest closing this and reopening if it occurs again. Is that ok? |
Yeah, I stopped encountering the issue after making the config changes described in #10477. |
Description
We've been encountering regular php-fpm segfaults in production.
Inspecting coredumps revealed gibberish class entries in the interfaces field of the ce of a class named
Z\Module\Comment\Orm\CommentObject
, which caused segfaults when copying interfaces over to the interfaces field of the ce of child classZ\Module\Zext\Orm\ZextCommentObject
.Native backtrace:
PHP backtrace:
Here's what I get when inspecting the class entries of the 3 interfaces which CommentObject actually extends (0x43e67d60 is the CE of CommentObject aka the parent_ce of zend_try_early_bind):
As you can see only the second interface has a valid type of ZEND_USER_CLASS, and in all cases the names are unreadable, possibly indicating that pointers contained in interfaces point to just gibberish.
Note that the autoloading of the ZextCommentObject seems to be triggered while parsing CommentObject by some internal opcache logic (maybe zend_accel_inheritance_cache_get?), not by any userland code requiring ZextCommentObject in the CommentObject class (like 154 of CommentObject from the PHP backtrace is just the line with the class declaration, which doesn't mention ZextCommentObject in any way).
PHP Version
PHP 8.1.13, opcache enabled, JIT disabled (due to other segfaults I'll try to report too)
Operating System
Ubuntu 20.04, ondrej repos
The text was updated successfully, but these errors were encountered: