Closed
Description
Description
I am hitting an assertion failure in the JIT using PHP 8.4.0alpha2 in a particular project. I have not yet been able to create a small reproducer, so hopefully the following stack trace is useful.
Relevant changed ini settings:
opcache.enable_cli=1
opcache.memory_consumption=256
opcache.max_accelerated_files=20000
opcache.jit=1255
opcache.jit_buffer_size=256M
php: /home/trevor/.phpbrew/build/php-8.4.0alpha2/ext/opcache/jit/ir/ir.c:2810: _ir_RSTORE: Assertion `ctx->control' failed.
Program received signal SIGABRT, Aborted.
__pthread_kill_implementation (no_tid=0, signo=6, threadid=140737294845440) at ./nptl/pthread_kill.c:44
44 ./nptl/pthread_kill.c: No such file or directory.
(gdb) bt
#0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=140737294845440) at ./nptl/pthread_kill.c:44
#1 __pthread_kill_internal (signo=6, threadid=140737294845440) at ./nptl/pthread_kill.c:78
#2 __GI___pthread_kill (threadid=140737294845440, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
#3 0x00007ffff73e5476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#4 0x00007ffff73cb7f3 in __GI_abort () at ./stdlib/abort.c:79
#5 0x00007ffff73cb71b in __assert_fail_base (fmt=0x7ffff7580130 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n",
assertion=0x7ffff40e7e63 "ctx->control",
file=0x7ffff40e3ba0 "/home/trevor/.phpbrew/build/php-8.4.0alpha2/ext/opcache/jit/ir/ir.c", line=2810,
function=<optimized out>) at ./assert/assert.c:92
#6 0x00007ffff73dce96 in __GI___assert_fail (assertion=0x7ffff40e7e63 "ctx->control",
file=0x7ffff40e3ba0 "/home/trevor/.phpbrew/build/php-8.4.0alpha2/ext/opcache/jit/ir/ir.c", line=2810,
function=0x7ffff40e8700 <__PRETTY_FUNCTION__.7> "_ir_RSTORE") at ./assert/assert.c:101
#7 0x00007ffff4029220 in _ir_RSTORE (ctx=0x7fffffff1900, reg=15, val=-90)
at /home/trevor/.phpbrew/build/php-8.4.0alpha2/ext/opcache/jit/ir/ir.c:2810
#8 0x00007ffff3f9416e in jit_STORE_IP (jit=0x7fffffff1900, ref=-90) at ext/opcache/jit/zend_jit_ir.c:905
#9 0x00007ffff3f945b1 in zend_jit_set_ip (jit=0x7fffffff1900, target=0x555536471cb0)
at ext/opcache/jit/zend_jit_ir.c:1040
#10 0x00007ffff3fce0c2 in zend_jit_trace_handler (jit=0x7fffffff1900, op_array=0x5555364823e8, opline=0x555536471cb0,
may_throw=1, trace=0x7fffffff71c0) at ext/opcache/jit/zend_jit_ir.c:16410
#11 0x00007ffff4006579 in zend_jit_trace (trace_buffer=0x7fffffff6ef0, parent_trace=655, exit_num=5)
at ext/opcache/jit/zend_jit_trace.c:6353
#12 0x00007ffff400fc49 in zend_jit_compile_side_trace (trace_buffer=0x7fffffff6ef0, parent_num=655, exit_num=5,
polymorphism=1) at ext/opcache/jit/zend_jit_trace.c:8192
#13 0x00007ffff4010ae6 in zend_jit_trace_hot_side (execute_data=0x7ffff4418130, parent_num=655, exit_num=5)
at ext/opcache/jit/zend_jit_trace.c:8413
#14 0x00007ffff40121b7 in zend_jit_trace_exit (exit_num=5, regs=0x7fffffffb040)
at ext/opcache/jit/zend_jit_trace.c:8682
#15 0x0000555545400620 in ?? ()
#16 0x00005555364822e8 in ?? ()
--Type <RET> for more, q to quit, c to continue without paging--c
#17 0x00005555364a1888 in ?? ()
#18 0x00007ffff3d9dfa0 in ?? ()
#19 0x0000555536bc3a30 in ?? ()
#20 0x00007fffffffb150 in ?? ()
#21 0x00007fffffffb3a0 in ?? ()
#22 0x000055553570c490 in ?? ()
#23 0x00007fffef0f09b0 in ?? ()
#24 0x0000555555dd0365 in zend_abstract_method_call (fbc=0x7fffef0f09b0) at /home/trevor/.phpbrew/build/php-8.4.0alpha2/Zend/zend_object_handlers.c:1640
#25 0x0000000000000000 in ?? ()
PHP Version
PHP 8.4.0alpha2
Operating System
Ubuntu 22.04