-
Notifications
You must be signed in to change notification settings - Fork 3.2k
swoole causes PHP 8.0.1 JIT enable to fail. #3986
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
Same issue swoole 4.6.0 & php 8.0.1 (on linux) |
mac 10.15.7 ..... same issue. swoole 4.6.0. php-8.0.1 |
version with docker test code
|
this is PHP problem in opcache jit. there is check - https://github.com/php/php-src/blob/e497a9f241bbfecf7bef24631b7d7ee666e23363/ext/opcache/jit/zend_jit.c#L4191 Possible solution is to fork php-src 8.0.1 branch, change this loop (continue if opcode is (57,58,79)), and compile from source. Then it works. Use this if you know what are you doing, otherways i recommend use 8.0.1 without jit. I think there is no other ways to run 8.0.1 with jit and swoole right now. if developers of php adds something like "user opcode override whitelist" where users can define codes that not disable jit. problem will be solved.
|
Work like a charm. |
I created small issue https://bugs.php.net/bug.php?id=80621 and hope php dev team can help us fix this issue. |
There also a way to not override opcodes. Reactphp for example lives in pure php process and works fine it's just responsibility of developer and testing quality. At all engeneer can accidentially turn off your server, application must be ready for this. Maybe if swoole add something like safe mode whitch is turned on by default, but when manually disabled swoole not catch exit and silence at all. This can add more flexibility. |
#4029 can temporarily solve this problem |
Please answer these questions before submitting your issue. Thanks!
PHP Warning: JIT is incompatible with third party extensions that setup user opcode handlers. JIT disabled. in Unknown on line 0
The error disappears when the swoole extension is disabled.
php --ri swoole
)?uname -a
&php -v
&gcc -v
) ?The text was updated successfully, but these errors were encountered: