Skip to content

Set of opcache tests fail zts+aarch64 8.4.1 #16902

Closed

Description

@andypost

Description

Building ZTS packages for Alpinelinux for 8.4.1 I got a set of failed tests and all of them related to opcache

ref https://gitlab.alpinelinux.org/alpine/aports/-/jobs/1615413

# JIT and OpCache related tests to disable
ext/opcache/tests/bug81272.phpt
ext/opcache/tests/gh16186_001.phpt
ext/opcache/tests/gh16186_002.phpt
ext/opcache/tests/jit/assign_obj_002.phpt
ext/opcache/tests/jit/bool_not_001.phpt
ext/opcache/tests/jit/bug77857.phpt
ext/opcache/tests/jit/bug79888.phpt
ext/opcache/tests/jit/bug80634.phpt
ext/opcache/tests/jit/bug80745.phpt
ext/opcache/tests/jit/bug80786.phpt
ext/opcache/tests/jit/bug80802.phpt
ext/opcache/tests/jit/bug80839.phpt
ext/opcache/tests/jit/bug80861.phpt
ext/opcache/tests/jit/bug80959.phpt
ext/opcache/tests/jit/bug81051.phpt
ext/opcache/tests/jit/bug81225.phpt
ext/opcache/tests/jit/bug81225_2.phpt
ext/opcache/tests/jit/bug81226.phpt
ext/opcache/tests/jit/bug81249.phpt
ext/opcache/tests/jit/bug81255.phpt
ext/opcache/tests/jit/bug81256.phpt
ext/opcache/tests/jit/bug81409.phpt
ext/opcache/tests/jit/cast_001.phpt
ext/opcache/tests/jit/defined_001.phpt
ext/opcache/tests/jit/fetch_dim_r_005.phpt
ext/opcache/tests/jit/fetch_obj_005.phpt
ext/opcache/tests/jit/gh12380.phpt
ext/opcache/tests/jit/gh15490.phpt
ext/opcache/tests/jit/gh8461-001.phpt
ext/opcache/tests/jit/gh8461-002.phpt
ext/opcache/tests/jit/gh8461-003.phpt
ext/opcache/tests/jit/gh8461-004.phpt
ext/opcache/tests/jit/gh8461-005.phpt
ext/opcache/tests/jit/gh8461-006.phpt
ext/opcache/tests/jit/gh8461-007.phpt
ext/opcache/tests/jit/gh8461-008.phpt
ext/opcache/tests/jit/gh8591-001.phpt
ext/opcache/tests/jit/gh8591-002.phpt
ext/opcache/tests/jit/gh8591-003.phpt
ext/opcache/tests/jit/gh8591-004.phpt
ext/opcache/tests/jit/gh8591-005.phpt
ext/opcache/tests/jit/gh8591-006.phpt
ext/opcache/tests/jit/hot_func_002.phpt
ext/opcache/tests/jit/ignored_opcodes.phpt
ext/opcache/tests/jit/init_fcall_003.phpt
ext/opcache/tests/jit/loop_002.phpt
ext/opcache/tests/jit/mod_003.phpt
ext/opcache/tests/jit/mul_005.phpt
ext/opcache/tests/jit/oss-fuzz-64727.phpt
ext/opcache/tests/jit/reg_alloc_004.phpt
ext/opcache/tests/jit/trampoline_001.phpt
ext/opcache/tests/jit/trampoline_002.phpt

PHP Version

PHP 8.4.1

Operating System

Alpinelinux

Activity

  1. andypost commented on Nov 23, 2024

    @andypost
    ContributorAuthor

    it fail only on aarch64

    TEST 10325/18580 [ext/opcache/tests/jit/reg_alloc_004.phpt]
    ========DIFF========
    --
         Warning: Undefined variable $d in %sreg_alloc_004.php on line 7
         
         Warning: Undefined variable $d in %sreg_alloc_004.php on line 7
    008- 
    009- Fatal error: Uncaught Error: First array member is not a valid class name or object in %sreg_alloc_004.php:7
    010- Stack trace:
    011- #0 %sreg_alloc_004.php(7): createTree(0)
    012- #1 %sreg_alloc_004.php(7): createTree(1)
    013- #2 %sreg_alloc_004.php(7): createTree(2)
    014- #3 %sreg_alloc_004.php(9): createTree(3)
    015- #4 {main}
    016-   thrown in %sreg_alloc_004.php on line 7
    ========DONE========
    FAIL Register Alloction 004: Check guard before register load [ext/opcache/tests/jit/reg_alloc_004.phpt] 
    
    TEST 10365/18580 [ext/opcache/tests/jit/trampoline_001.phpt]
    ========DIFF========
    001- BBBCCC
    001+ B
    ========DONE========
    FAIL JIT Trampoline 001: trampoline cleanup [ext/opcache/tests/jit/trampoline_001.phpt] 
    TEST 10366/18580 [ext/opcache/tests/jit/trampoline_002.phpt]
    ========DIFF========
    001- BBBCCCDDDCCC
    001+ B
    ========DONE========
    FAIL JIT Trampoline 002: trampoline cleanup [ext/opcache/tests/jit/trampoline_002.phpt] 
    
  2. andypost commented on Nov 23, 2024

    @andypost
    ContributorAuthor
    TEST 10300/18580 [ext/opcache/tests/jit/oss-fuzz-64727.phpt]
    ========DIFF========
    001- int(0)
    002- int(3)
    003- int(3)
    004- NULL
    001+ 
    ========DONE========
    FAIL oss-fuzz #64727 [ext/opcache/tests/jit/oss-fuzz-64727.phpt] 
    
  3. ndossche commented on Nov 23, 2024

    @ndossche
    Member

    Hm, this could be related to the TSRM cache tcb offset, if this is not fully supported on ARM64+MUSL.
    Just to be clear: this does work on versions lower than 8.4 ? Does a debug build give any assertion failure?

  4. andypost commented on Nov 23, 2024

    @andypost
    ContributorAuthor

    Previously I did not build zts so no previous state, debug -g was added but I did not debug yet, strange that it pass on loongarch64 and armv7/hf(32-bit)

  5. andypost commented on Nov 23, 2024

    @andypost
    ContributorAuthor

    building with --enable-debug-assertions

  6. andypost commented on Nov 23, 2024

    @andypost
    ContributorAuthor

    Yes, there's assertions now

    TEST 10365/18580 [ext/opcache/tests/jit/trampoline_001.phpt]
    ========DIFF========
    001- BBBCCC
    001+ Assertion failed: tsrm_ls_cache_tcb_offset != 0 (ext/opcache/jit/zend_jit_ir.c: zend_jit_setup: 3237)
    ========DONE========
    FAIL JIT Trampoline 001: trampoline cleanup [ext/opcache/tests/jit/trampoline_001.phpt] 
    TEST 10366/18580 [ext/opcache/tests/jit/trampoline_002.phpt]
    ========DIFF========
    001- BBBCCCDDDCCC
    001+ Assertion failed: tsrm_ls_cache_tcb_offset != 0 (ext/opcache/jit/zend_jit_ir.c: zend_jit_setup: 3237)
    ========DONE========
    FAIL JIT Trampoline 002: trampoline cleanup [ext/opcache/tests/jit/trampoline_002.phpt] 
    
  7. andypost commented on Nov 23, 2024

    @andypost
    ContributorAuthor

    all of them are the same!

    TEST 10026/18580 [ext/opcache/tests/jit/assign_dim_003.phpt]
    ========DIFF========
    001- Warning: Undefined variable $v in %sassign_dim_003.php on line 3
    002- NULL
    001+ Assertion failed: tsrm_ls_cache_tcb_offset != 0 (ext/opcache/jit/zend_jit_ir.c: zend_jit_setup: 3237)
    ========DONE========
    FAIL JIT ASSIGN_DIM: 003 [ext/opcache/tests/jit/assign_dim_003.phpt] 
    
  8. ndossche commented on Nov 24, 2024

    @ndossche
    Member

    Thanks! Right, so my suspicion that this is missing MUSL TSRM TLS support is right.
    Annoyingly I don't have Arm64 hardware, but I can look into this maybe via emulation...

  9. 23 remaining items

  10. ndossche commented on Nov 25, 2024

    @ndossche
    Member

    @andypost I fixed the ZTS issue, hence this issue was closed.

    About your other two issues:

    1. I'll try to have a look at the FFI issue, I need to setup a Docker container for i386 Alpine though so that may take a little bit.
    2. The gdbm issue is actually this: ext/dba/tests: sort expected test output #14962 It turns out that the test file was missing a sort. I'll ask in that PR if this should be backported.
  11. ndossche commented on Nov 25, 2024

    @ndossche
    Member

    @andypost I can reproduce that FFI issue but have not fully understood it yet. I know that the reason for the crash is that is_zend_ptr() for some reason returned 1 instead of 0, I'm debugging further...

  12. ndossche commented on Nov 25, 2024

    @ndossche
    Member

    @andypost I have identified the problem and propose this patch: #16938

  13. ndossche commented on Nov 26, 2024

    @ndossche
    Member

    @andypost Everything you reported, including that gdbm issue, should now be fixed in the next releases of 8.2,8.3,8.4.

  14. andypost commented on Nov 26, 2024

    @andypost
    ContributorAuthor

    @nielsdos Thank you a lot!

    I'm waiting for RC1 releases to start with ZTS!

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions