Skip to content

Instantly share code, notes, and snippets.

@shqking
Last active July 12, 2021 13:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shqking/51d92bf8cdcdf6f3aad24632b6f906e3 to your computer and use it in GitHub Desktop.
Save shqking/51d92bf8cdcdf6f3aad24632b6f906e3 to your computer and use it in GitHub Desktop.
PHP-community-job-commit-0d6358f2c

opcache.jit=0 (failed in both x86 and arm64)

# ERROR 1: Laravel
Fatal error: During inheritance of JsonSerializable: Uncaught Declaration of Illuminate\Support\Fluent::jsonSerialize() should be compatible with JsonSerializable::jsonSerialize(): mixed

# ERROR 2: Amphp
Fatal error: PHPUnit\Framework\Error\Deprecated: Implicit conversion from float-string "15.24" to int loses precision in /opt/php-oss/amp/test/PromiseTest.php:329

opcache.jit=1205

# ERROR 1 and ERROR 2 (both arm64 and x86)

# ERROR 3: Symfony src/Symfony/Component/Uid (only arm64)
environment: line 1:  2955 Segmentation fault      "$@"

# ERROR 4: assertion failure. (both arm64 and x86)
# Symfony src/Symfony/Bundle/FrameworkBundle
# Symfony src/Symfony/Bundle/WebProfilerBundle
# Symfony src/Symfony/Bundle/TwigBundle
# Symfony src/Symfony/Bundle/SecurityBundle
environment: line 1:  3929 Aborted                 "$@"
php: ./php-src/Zend/zend_hash.c:995: _zend_hash_index_add_or_update_i: Assertion `(zend_gc_refcount(&(ht)->gc) == 1) || ((ht)->u.flags & (1<<6))' failed.

opcache.jit=1254

# ERROR 1 and ERROR 2 (both arm64 and x86)

# ERROR 5: Symfony src/Symfony/Component/DependencyInjection(only arm64) 
environment: line 1:  6264 Segmentation fault      "$@"

# ERROR 6: assertion failure (only arm64)
# PHPUnit
# Symfony src/Symfony/Component/Config
php: ext/opcache/jit/zend_jit_trace.c:7466: zend_jit_trace_exit: Assertion `((execute_data)->opline) >= ((execute_data)->func)->op_array.opcodes && ((execute_data)->opline) < ((execute_data)->func)->op_array.opcodes + ((execute_data)->func)->op_array.last' failed.
@shqking
Copy link
Author

shqking commented Jun 28, 2021

===============================
arm64

....environment: line 1: 46375 Segmentation fault "$@"
[06-24 15:02:59 UTC] php-test-oss:MSG: Warning [139] while doing [sudo php ./phpunit src/Symfony/Bridge/Doctrine --exclude-group tty,benchmark,intl-data,transient]
FATAL ERROR HERE nonZTS+HYBRID+JIT1254: Symfony src/Symfony/Bridge/Doctrine
FATAL ERROR HERE ZTS+HYBRID+JIT1254: Symfony src/Symfony/Bridge/Doctrine

548 Segmentation fault "$@"
Bus error
[06-24 15:10:09 UTC] php-test-oss:MSG: Warning [139] while doing [sudo php ./phpunit src/Symfony/Component/Cache --exclude-group tty,benchmark,intl-data,transient]
FATAL ERROR HERE nonZTS+HYBRID+JIT1254: Symfony src/Symfony/Component/Cache
FATAL ERROR HERE nonZTS+CALL+JIT1254: Symfony src/Symfony/Component/Cache
FATAL ERROR HERE ZTS+HYBRID+JIT1254: Symfony src/Symfony/Component/Cache

Segmentation fault "$@"
[06-24 15:12:50 UTC] php-test-oss:MSG: Warning [139] while doing [sudo php ./phpunit src/Symfony/Component/HttpKernel --exclude-group tty,benchmark,intl-data,transient]
FATAL ERROR HERE nonZTS+HYBRID+JIT1254: Symfony src/Symfony/Component/HttpKernel
FATAL ERROR HERE nonZTS+CALL+JIT1254: Symfony src/Symfony/Component/HttpKernel

Fatal error: Invalid opcode 137/4/0. in /opt/php-oss/symfony/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php on line 175
[06-24 15:17:20 UTC] php-test-oss:MSG: Warning [255] while doing [sudo php ./phpunit src/Symfony/Bundle/TwigBundle --exclude-group tty,benchmark,intl-data,transient]
FATAL ERROR HERE nonZTS+HYBRID+JIT1254: Symfony src/Symfony/Bundle/TwigBundle
FATAL ERROR HERE nonZTS+CALL+JIT1254: Symfony src/Symfony/Bundle/TwigBundle

php: ext/opcache/jit/zend_jit_trace.c:7466: zend_jit_trace_exit: Assertion `((execute_data)->opline) >= ((execute_data)->func)->op_array.opcodes && ((execute_data)->opline) < ((execute_data)->func)->op_array.opcodes + ((execute_data)->func)->op_array.last' failed.
environment: line 1: 2703 Aborted "$@"
[06-24 15:20:52 UTC] php-test-oss:MSG: Warning [137] while doing [sudo php ./phpunit src/Symfony/Bundle/SecurityBundle --exclude-group tty,benchmark,intl-data,transient]
FATAL ERROR HERE nonZTS+HYBRID+JIT1254: Symfony src/Symfony/Bundle/SecurityBundle
FATAL ERROR HERE nonZTS+CALL+JIT1254: Symfony src/Symfony/Bundle/SecurityBundle
FATAL ERROR HERE ZTS+HYBRID+JIT1254: Symfony src/Symfony/Bundle/SecurityBundle

php: ext/opcache/jit/zend_jit_trace.c:7466: zend_jit_trace_exit: Assertion `((execute_data)->opline) >= ((execute_data)->func)->op_array.opcodes && ((execute_data)->opline) < ((execute_data)->func)->op_array.opcodes + ((execute_data)->func)->op_array.last' failed.
environment: line 1: 2703 Aborted "$@"
[06-24 16:14:39 UTC] php-test-oss:MSG: Warning [134] while doing [sudo php ./phpunit src/Symfony/Component/Mailer --exclude-group tty,benchmark,intl-data,transient]
FATAL ERROR HERE nonZTS+CALL+JIT1254: Symfony src/Symfony/Component/Mailer
FATAL ERROR HERE ZTS+CALL+JIT1254: Symfony src/Symfony/Component/Mailer

php: ext/opcache/jit/zend_jit_trace.c:7466: zend_jit_trace_exit: Assertion `((execute_data)->opline) >= ((execute_data)->func)->op_array.opcodes && ((execute_data)->opline) < ((execute_data)->func)->op_array.opcodes + ((execute_data)->func)->op_array.last' failed.
environment: line 1: 16507 Aborted "$@"
[06-24 17:43:19 UTC]php-test-oss:MSG: Warning [134] while doing [sudo php ./phpunit]
FATAL ERROR HERE ZTS+HYBRID+JIT1254: PHPUnit
FATAL ERROR HERE ZTS+CALL+JIT1254: PHPUnit

Segmentation fault "$@"
[06-24 18:45:42 UTC] php-test-oss:MSG: Warning [139] while doing [sudo php ./phpunit src/Symfony/Component/HttpFoundation --exclude-group tty,benchmark,intl-data,transient]
FATAL ERROR HERE ZTS+CALL+JIT1254: Symfony src/Symfony/Component/HttpFoundation

php: /home/ent-user/ci-scripts/php-src/Zend/zend_types.h:1179: zend_gc_delref: Assertion `p->refcount > 0' failed.
environment: line 1: 25629 Aborted "$@"
[06-26 02:56:10 UTC] php-test-oss:MSG: Warning [134] while doing [sudo php ./phpunit src/Symfony/Component/Form --exclude-group tty,benchmark,intl-data,transient]
FATAL ERROR under nonZTS+HYBRID+JIT1254: Symfony src/Symfony/Component/Form

================
x86

Segmentation fault "$@"
[06-24 15:35:33 UTC] php-test-oss:MSG: Warning [139] while doing [sudo php ./phpunit src/Symfony/Component/HttpClient --exclude-group tty,benchmark,intl-data,transient]
FATAL ERROR HERE nonZTS+CALL+JIT1205: Symfony src/Symfony/Component/HttpClient
FATAL ERROR HERE ZTS+CALL+JIT1205: Symfony src/Symfony/Component/HttpClient

@shqking
Copy link
Author

shqking commented Jul 1, 2021

Test

Run 3 times. Machines with different CPUs are used each time.
Jenkins task IDs are 14672, 14673 and 14674

Base Code

commit 0c89edac3a64016c7ce35d2231e2cb889a4cc7ca
Author: Jan-E <github@ehrhardt.nl>
Date:   Sat Jun 26 14:44:32 2021 +0200    Windows: allow GD ext without avif.dll
   
   Closes GH-7200.

x86

ERROR 1: occurs 2 times (14672 and 14674)

environment: line 1: 20528 Segmentation fault "$@"
[07-01 01:25:01 UTC]ent-x86-10-ubuntu-php-test-oss:MSG: Warning [139] while doing [sudo php ./phpunit src/Symfony/Bundle/WebProfilerBundle --exclude-group tty,benchmark,intl-data,transient]
FATAL ERROR under nonZTS+CALL+JIT1254: Symfony src/Symfony/Bundle/WebProfilerBundle

arm64

ERROR 2

php: ext/opcache/jit/zend_jit_trace.c:7466: zend_jit_trace_exit: Assertion `((execute_data)>opline) >= ((execute_data)>func)>op_array.opcodes && ((execute_data)>opline) < ((execute_data)>func)>op_array.opcodes + ((execute_data)>func)>op_array.last' failed.

Affected projects

FATAL ERROR under nonZTS+HYBRID+JIT1254: Symfony src/Symfony/Component/Config   ---- 14672
FATAL ERROR under nonZTS+CALL+JIT1254: Symfony src/Symfony/Component/Config        ---- 14672
FATAL ERROR under ZTS+HYBRID+JIT1254: Symfony src/Symfony/Component/Config     ---- 14673
FATAL ERROR under ZTS+CALL+JIT1254: Symfony src/Symfony/Component/Config     ---- 14673

environment: line 1: 26000 Aborted "$@"
[07-01 00:58:51 UTC]ent-arm-05-ubuntu-php-test-oss:MSG: Warning [134] while doing [sudo php ./phpunit src/Symfony/Component/Config --exclude-group tty,benchmark,intl-data,transient]
FATAL ERROR under nonZTS+CALL+JIT1254: Symfony src/Symfony/Bundle/TwigBundle     ---- 14673
FATAL ERROR under ZTS+HYBRID+JIT1254: Symfony src/Symfony/Bundle/TwigBundle       ---- 14672

environment: line 1: 13111 Aborted "$@"
[07-01 01:53:35 UTC]ent-arm-16-ubuntu-php-test-oss:MSG: Warning [134] while doing [sudo php ./phpunit src/Symfony/Bundle/TwigBundle --exclude-group tty,benchmark,intl-data,transient]
FATAL ERROR under nonZTS+HYBRID+JIT1254: PHPUnit    ---- 14673 14674
FATAL ERROR under nonZTS+CALL+JIT1254: PHPUnit        ---- 14672

environment: line 1: 185466 Aborted "$@"
[07-01 01:15:23 UTC]ent-arm-26-ubuntu-php-test-oss:MSG: Warning [134] while doing [sudo php ./phpunit]
FATAL ERROR under ZTS+HYBRID+JIT1254: Symfony src/Symfony/Component/Intl     ---- 14672 14673

environment: line 1: 9978 Aborted "$@"
[07-01 01:06:39 UTC]ent-arm-10-ubuntu-php-test-oss:MSG: Warning [134] while doing [sudo php ./phpunit src/Symfony/Component/Intl --exclude-group tty,benchmark,intl-data,transient]
FATAL ERROR under ZTS+HYBRID+JIT1254: Symfony src/Symfony/Component/Serializer    ---- 14672
FATAL ERROR under ZTS+CALL+JIT1254: Symfony src/Symfony/Component/Serializer         ---- 14672

environment: line 1: 10946 Aborted "$@"
[07-01 01:10:20 UTC]ent-arm-10-ubuntu-php-test-oss:MSG: Warning [134] while doing [sudo php ./phpunit src/Symfony/Component/Serializer --exclude-group tty,benchmark,intl-data,transient]
FATAL ERROR under ZTS+HYBRID+JIT1254: Symfony src/Symfony/Component/Cache         ---- 14673

environment: line 1: 5828 Aborted "$@"
[07-01 01:31:57 UTC]ent-arm-13-ubuntu-php-test-oss:MSG: Warning [134] while doing [sudo php ./phpunit src/Symfony/Component/Cache --exclude-group tty,benchmark,intl-data,transient]

ERROR 3

php: /home/ent-user/ci-scripts/php-src/Zend/zend_types.h:1179: zend_gc_delref: Assertion `p->refcount > 0' failed.

Affected projects

FATAL ERROR under nonZTS+HYBRID+JIT1254: Symfony src/Symfony/Component/Form ---- 14672
FATAL ERROR under nonZTS+CALL+JIT1254: Symfony src/Symfony/Component/Form      ---- 14672

environment: line 1: 24738 Aborted "$@"
[07-01 00:53:59 UTC]ent-arm-05-ubuntu-php-test-oss:MSG: Warning [134] while doing [sudo php ./phpunit src/Symfony/Component/Form --exclude-group tty,benchmark,intl-data,transient]

ERROR 4

/home/ent-user/ci-scripts/php-src/Zend/zend_hash.c(1639) : ht=0xffff6eec0d80 is already destroyed
php: /home/ent-user/ci-scripts/php-src/Zend/zend_hash.c:71: _zend_is_inconsistent: Assertion `0' failed.

Affected projects

FATAL ERROR under ZTS+CALL+JIT1254: Symfony src/Symfony/Component/Translation     ---- 14672

environment: line 1: 21677 Aborted "$@"
[07-01 02:00:13 UTC]ent-arm-10-ubuntu-php-test-oss:MSG: Warning [134] while doing [sudo php ./phpunit src/Symfony/Component/Translation --exclude-group tty,benchmark,intl-data,transient]

ERROR 5

environment: line 1: 22444 Segmentation fault "$@"

Affected projects

FATAL ERROR under nonZTS+HYBRID+JIT1254: Symfony src/Symfony/Component/PropertyAccess ---- 14672
FATAL ERROR under nonZTS+CALL+JIT1254: Symfony src/Symfony/Component/PropertyAccess     ---- 14672

environment: line 1: 24953 Segmentation fault "$@"
[07-01 00:55:32 UTC]ent-arm-05-ubuntu-php-test-oss:MSG: Warning [139] while doing [sudo php ./phpunit src/Symfony/Component/PropertyAccess --exclude-group tty,benchmark,intl-data,transient]
FATAL ERROR under nonZTS+HYBRID+JIT1254: Symfony src/Symfony/Component/Config ---- 14673 14674

environment: line 1: 185409 Segmentation fault "$@"
[07-01 01:14:54 UTC]ent-arm-26-ubuntu-php-test-oss:MSG: Warning [139] while doing [sudo php ./phpunit src/Symfony/Component/Config --exclude-group tty,benchmark,intl-data,transient]
FATAL ERROR under nonZTS+CALL+JIT1254: Symfony src/Symfony/Bundle/TwigBundle     ---- 14674
FATAL ERROR under nonZTS+HYBRID+JIT1254: Symfony src/Symfony/Bundle/TwigBundle ---- 14673

environment: line 1: 368403 Segmentation fault "$@"
[07-01 01:29:49 UTC]ent-arm-26-ubuntu-php-test-oss:MSG: Warning [139] while doing [sudo php ./phpunit src/Symfony/Bundle/TwigBundle --exclude-group tty,benchmark,intl-data,transient]
FATAL ERROR under ZTS+CALL+JIT1254: PHPUnit ---- 14672 14673

[07-01 02:05:09 UTC]ent-arm-10-ubuntu-php-test-oss:MSG: Warning [139] while doing [sudo php ./phpunit]
FATAL ERROR under nonZTS+CALL+JIT1254: Symfony src/Symfony/Component/Validator ---- 14672

environment: line 1: 21475 Segmentation fault "$@"
[07-01 01:53:51 UTC]ent-arm-05-ubuntu-php-test-oss:MSG: Warning [139] while doing [sudo php ./phpunit src/Symfony/Component/Validator --exclude-group tty,benchmark,intl-data,transient]
FATAL ERROR under ZTS+CALL+JIT1254: Symfony src/Symfony/Component/DependencyInjection ---- 14672 14673

environment: line 1: 22444 Segmentation fault "$@"
[07-01 02:01:58 UTC]ent-arm-10-ubuntu-php-test-oss:MSG: Warning [139] while doing [sudo php ./phpunit src/Symfony/Component/DependencyInjection --exclude-group tty,benchmark,intl-data,transient]
FATAL ERROR under ZTS+CALL+JIT1254: Symfony src/Symfony/Bundle/WebProfilerBundle   ---- 14673

......environment: line 1: 14963 Segmentation fault "$@"
[07-01 02:29:31 UTC]ent-arm-13-ubuntu-php-test-oss:MSG: Warning [139] while doing [sudo php ./phpunit src/Symfony/Bundle/WebProfilerBundle --exclude-group tty,benchmark,intl-data,transient]

ERROR 6

environment: line 1: 12897 Aborted "$@"
FATAL ERROR under nonZTS+CALL+JIT1254: Symfony src/Symfony/Bridge/Doctrine     ---- 14673

@shqking
Copy link
Author

shqking commented Jul 7, 2021

ERROR 7: assertion error in symfony_demo for HYBRID+JIT1205 in both arm64 and x86

Error msg:

[07-06 02:59:11 UTC]Running : sudo php -d opcache.preload=var/cache/dev/App_KernelDevDebugContainer.preload.php public/index.php
php: php-src/Zend/zend_vm_execute.h:62757: zend_get_opcode_handler_func: Assertion `zv != ((void *)0)' failed.

This error occurred only in HYBRID mode, i.e. ZTS+HYBRID, NTS+HBRID, with JIT1205 for both arm64 and x86.

This error first occurred after this commit.

commit 2e93bb7a451a8ec6f7fcfd24a623969024907b89
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed May 12 17:21:39 2021 +0300    Fixed possible use after free ext/opcache/zend_persist.c | 4 ++++
 1 file changed, 4 insertions(+)

Preload issue

One short call chain is zend_jit_handler -> zend_get_opcode_handler_func -> assertion
But this is not because there is some unrecognized opline in App_KernelDevDebugContainer.preload.php file.
Because php var/cache/dev/App_KernelDevDebugContainer.preload.php succeeded.

Test more JIT options under NTS+HYBRID

1202,1203,1204: pass
1205: assertion error #7

1255: assertion error #7
1252,1253,1254: pass

Note that 1255 would also result in the same error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment