php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #81363 Segfault running PHPStan tests with JIT triggers assertion
Submitted: 2021-08-16 00:52 UTC Modified: 2021-08-16 08:49 UTC
From: smokey101stair at gmail dot com Assigned:
Status: Open Package: JIT
PHP Version: 8.0.9 OS: Ubuntu 20.04/WSL2
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: smokey101stair at gmail dot com
New email:
PHP Version: OS:

 

 [2021-08-16 00:52 UTC] 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 ?? ()

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-08-16 08:49 UTC] 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 16:25 UTC] smokey101stair at gmail dot com
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/*
 [2023-05-02 18:35 UTC] setwills34 at aol dot com
(https://collegegrazing.com/)github.com
(https://collegegrazing.com/blog/)github.com
(https://collegegrazing.com/affiliate-disclosure/)github.com
(https://collegegrazing.com/terms-of-use/)github.com
(https://collegegrazing.com/fake-id/best-fake-id-websites/)github.com
(https://collegegrazing.com/about/)github.com
(https://collegegrazing.com/contact/)github.com
(https://collegegrazing.com/fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-fake-ids/)github.com
(https://collegegrazing.com/how-to-get-a-fake-id/)github.com
(https://collegegrazing.com/top-fake-id-review/)github.com
(https://collegegrazing.com/fake-id/buy-virginia-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-new-mexico-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-kentucky-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-iowa-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-maine-fake-id/)github.com
(https://collegegrazing.com/all-state-fakes-review/)github.com
(https://collegegrazing.com/fake-id/buy-colorado-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-missouri-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-new-hampshire-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-vermont-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-georgia-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-arizona-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-alabama-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-florida-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-maryland-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-wyoming-fake-id/)github.com
(https://collegegrazing.com/fake-id/what-happens-if-i-get-caught/)github.com
(https://collegegrazing.com/fake-id/buy-california-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-new-york-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-alaska-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-rhode-island-fake-id/)github.com
(https://collegegrazing.com/magic-fake-id-review/)github.com
(https://collegegrazing.com/fake-id/buy-utah-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-hawaii-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-minnesota-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-oklahoma-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-illinois-fake-id/)github.com
(https://collegegrazing.com/evolved-ids-review/)github.com
(https://collegegrazing.com/fake-id/buy-indiana-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-montana-fake-id/)github.com
(https://collegegrazing.com/how-do-bouncers-spot-fake-ids/)github.com
(https://collegegrazing.com/fake-id/common-uses/)github.com
(https://collegegrazing.com/fake-id/buy-arkansas-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-pennsylvania-fake-id/)github.com
(https://collegegrazing.com/blog/page/2/)github.com
(https://collegegrazing.com/fake-id/buy-new-jersey-fake-id/)github.com
(https://collegegrazing.com/how-to-spot-a-georgia-fake-id/)github.com
(https://collegegrazing.com/scannable-fake-ids/)github.com
(https://collegegrazing.com/fake-id/buy-south-dakota-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-massachusetts-fake-id/)github.com)github.com
(https://collegegrazing.com/fake-id/how-to-spot/)github.com
(https://collegegrazing.com/fake-id/buy-west-virginia-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-connecticut-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-wisconsin-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-idaho-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-columbia-fake-id/)github.com
(https://collegegrazing.com/fake-id/how-to-make/)github.com
(https://collegegrazing.com/fake-id/buy-mississippi-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-nevada-fake-id/)github.com
(https://collegegrazing.com/how-to-pay-for-fake-id/)github.com
(https://collegegrazing.com/how-to-take-a-fake-id-photo-at-home/)github.com
(https://collegegrazing.com/fake-id/buy-oregon-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-texas-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-north-dakota-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-louisiana-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-south-carolina-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-kansas-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-tennessee-fake-id/)github.com
(https://collegegrazing.com/fake-id/types-of-fake-ids/)github.com
(https://collegegrazing.com/fake-id/buy-delaware-fake-id/)github.com
(https://collegegrazing.com/lost-identification-review/)github.com
(https://collegegrazing.com/fake-id/buy-washington-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-nebraska-fake-id/)github.com
(https://collegegrazing.com/dingo-fakes-review/)github.com
(https://collegegrazing.com/fake-id/buy-north-carolina-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-michigan-fake-id/)github.com
(https://collegegrazing.com/fake-id/buy-ohio-fake-id/)github.com
(https://collegegrazing.com/fake-id/best-states/)github.com
(https://collegegrazing.com/idviking-review/)github.com
(https://collegegrazing.com/super-printer-bros-review/)github.com
(https://collegegrazing.com/idgod-review/)github.com
(https://collegegrazing.com/bogus-braxtor-review/)github.com
(https://collegegrazing.com/newids-review/)github.com
(https://collegegrazing.com/litfakes-review/)github.com
(https://collegegrazing.com/old-ironside-fakes-review/)github.com
(https://collegegrazing.com/idhurry-review/)github.com
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 06:01:30 2024 UTC