Bug #81363 [Com]: Segfault running PHPStan tests with JIT triggers assertion

From: Date: Mon, 16 Aug 2021 16:25:32 +0000
Subject: Bug #81363 [Com]: Segfault running PHPStan tests with JIT triggers assertion
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-235877@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=81363&edit=1 ID: 81363 Comment by: smokey101stair at gmail dot com Reported by: smokey101stair at gmail dot com Summary: Segfault running PHPStan tests with JIT triggers assertion Status: Open Type: Bug Package: JIT Operating System: Ubuntu 20.04/WSL2 PHP Version: 8.0.9 Block user comment: N Private report: N New Comment: I am unable to reproduce when only using vendor/bin/phpunit. As for the "Error: Class "PHPStan\Analyser\Analyser" problem, I got that too after a second run. I had to clear out the test cache to fix it: rm -rf /tmp/phpstan-tests/cache/nette.configurator/* Previous Comments: ------------------------------------------------------------------------ [2021-08-16 08:49:13] nikic@php.net When using vendor/bin/phpunit, I'm not seeing an assertion failure, but see a lot of "Error: Class "PHPStan\Analyser\Analyser" not found" errors when running with opcache (without jit). Is it possible to reproduce this without paratest? ------------------------------------------------------------------------ [2021-08-16 00:52:37] smokey101stair at gmail dot com Description: ------------ PHP segfaults while running the PHPStan testsuite with the JIT enabled. PHP 8.0.9 (cli) (built: Aug 14 2021 16:31:22) ( NTS DEBUG ) Copyright (c) The PHP Group Zend Engine v4.0.9, Copyright (c) Zend Technologies with Zend OPcache v8.0.9, Copyright (c), by Zend Technologies opcache.enable_cli=1 opcache.memory_consumption=256 opcache.max_accelerated_files=20000 opcache.jit=1255 opcache.jit_buffer_size=256M memory_limit=-1 Steps to reproduce: 1) git clone https://github.com/phpstan/phpstan-src.git 2) cd phpstan-src 3) composer install 4) make tests Actual result: -------------- #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 #1 0x00007fcf9c21f859 in __GI_abort () at abort.c:79 #2 0x00007fcf9c21f729 in __assert_fail_base (fmt=0x7fcf9c3b5588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x7fcf993cc6fc "info & (1 << type)", file=0x7fcf993cc3d0 "ext/opcache/jit/zend_jit_trace.c", line=340, function=<optimized out>) at assert.c:92 #3 0x00007fcf9c230f36 in __GI___assert_fail (assertion=0x7fcf993cc6fc "info & (1 << type)", file=0x7fcf993cc3d0 "ext/opcache/jit/zend_jit_trace.c", line=340, function=0x7fcf993cedd0 <__PRETTY_FUNCTION__.29615> "zend_jit_trace_type_to_info_ex") at assert.c:101 #4 0x00007fcf99376e18 in zend_jit_trace_type_to_info_ex (type=0 '\000', info=2164258944) at ext/opcache/jit/zend_jit_trace.c:340 #5 0x00007fcf99377012 in zend_jit_trace_add_op_guard (tssa=0x7fcf9739e0d0, ssa_var=2, op_type=0 '\000') at ext/opcache/jit/zend_jit_trace.c:379 #6 0x00007fcf9937c186 in zend_jit_trace_build_tssa (trace_buffer=0x7ffc7ea4c460, parent_trace=0, exit_num=0, script=0x0, op_arrays=0x7ffc7ea48240, num_op_arrays_ptr=0x7ffc7ea47fb0) at ext/opcache/jit/zend_jit_trace.c:1677 #7 0x00007fcf99385835 in zend_jit_trace (trace_buffer=0x7ffc7ea4c460, parent_trace=0, exit_num=0) at ext/opcache/jit/zend_jit_trace.c:3563 #8 0x00007fcf9939f56b in zend_jit_compile_root_trace (trace_buffer=0x7ffc7ea4c460, opline=0x4349a2d8, offset=5280) at ext/opcache/jit/zend_jit_trace.c:6510 #9 0x00007fcf993a1575 in zend_jit_trace_hot_root (execute_data=0x7fcf99417780, opline=0x4349a2d8) at ext/opcache/jit/zend_jit_trace.c:7003 #10 0x00000000517755c7 in ?? () #11 0x0000000000000000 in ?? () ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=81363&edit=1

« previous php.bugs (#235877) next »