apache / skywalking

APM, Application Performance Monitoring System
https://skywalking.apache.org/
Apache License 2.0
23.72k stars 6.5k forks source link

[PHP][Bug] PHP Warning: JIT is incompatible with third party extensions that override zend_execute_ex(). JIT disabled. in Unknown on line 0 #10852

Closed ruiorz closed 1 year ago

ruiorz commented 1 year ago

Search before asking

Apache SkyWalking Component

PHP (apache/skywalking-php)

What happened

php -v PHP Warning: JIT is incompatible with third party extensions that override zend_execute_ex(). JIT disabled. in Unknown on line 0 PHP 8.1.19 (cli) (built: May 13 2023 01:16:13) (NTS) Copyright (c) The PHP Group Zend Engine v4.1.19, Copyright (c) Zend Technologies with Zend OPcache v8.1.19, Copyright (c), by Zend Technologies

What you expected to happen

php -v got a jit warning when i set 'skywalking_agent.enable = On' in my alpine docker container

Turn off skywalking_agent, it works ok: php -dskywalking_agent.enable=Off -v PHP 8.1.19 (cli) (built: May 13 2023 01:16:13) (NTS) Copyright (c) The PHP Group Zend Engine v4.1.19, Copyright (c) Zend Technologies with Zend OPcache v8.1.19, Copyright (c), by Zend Technologies

How to reproduce

thank you

Anything else

uname -a Linux 998d8983800d 5.4.0-100-generic #113-Ubuntu SMP Thu Feb 3 18:43:29 UTC 2022 x86_64 Linux

Are you willing to submit PR?

Code of Conduct

ruiorz commented 1 year ago

skywalking_agent in my dockerfile:

FROM php:8.1-cli-alpine3.17

# Install Skywalking
RUN set -ex \
    && apk --update add --no-cache --virtual .sk-deps $PHPIZE_DEPS musl-dev llvm15-dev clang15-dev protobuf-c-compiler git \
    && apk add --no-cache protobuf \
    && curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain none -y \
    && export PATH="$PATH:/root/.cargo/bin" \
    && export RUSTFLAGS="-C target-feature=-crt-static" \
    && rustup default stable \
    && echo '[http]' >> /root/.cargo/config \
    && echo 'check-revoke = false' >> /root/.cargo/config \
    && echo 'timeout = 300' >> /root/.cargo/config \
    && echo 'low-speed-limit = 100' >> /root/.cargo/config \
    && echo '[net]' >> /root/.cargo/config \
    && echo 'retry = 10' >> /root/.cargo/config \
    && echo 'git-fetch-with-cli = true' >> /root/.cargo/config \
    && export MAKEFLAGS="-j$(nproc)" \
    && pecl install skywalking_agent-0.5.0 && docker-php-ext-enable skywalking_agent \
    && apk del --no-network .sk-deps \
    && rustup self uninstall -y \
    && docker-php-source delete \
    && rm -rf /usr/share/man /var/cache/apk/* /tmp/* /root/.cargo
jmjoy commented 1 year ago

Unfortunately, skywalking-php does override zend_execute_ex to implement hooking, this conflicts with jit in PHP 8.

You can disable opcache.jit to eliminate warnings.

ruiorz commented 1 year ago

Unfortunately, skywalking-php does override zend_execute_ex to implement hooking, this conflicts with jit in PHP 8.

You can disable opcache.jit to eliminate warnings.

ok~thanks

jmjoy commented 1 year ago

Welcome to follow this PR, which add support for PHP8 JIT.