Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crashing tests on Windows x64 #15709

Open
cmb69 opened this issue Sep 2, 2024 · 7 comments
Open

Crashing tests on Windows x64 #15709

cmb69 opened this issue Sep 2, 2024 · 7 comments

Comments

@cmb69
Copy link
Member

cmb69 commented Sep 2, 2024

Description

As of 4dc7795, a couple of tests are crashing. (Note that the issues have no introduced by this commit, but are merely visible now.)

=====================================================================
FAILED TEST SUMMARY
---------------------------------------------------------------------
Bug #54268 (Double free when destroy_zend_class fails) [D:\a\php-src\php-src\Zend\tests\bug54268.phpt]
GH-9407: LSP error in eval'd code refers to wrong class for static type [D:\a\php-src\php-src\Zend\tests\gh9407.phpt]
Stack limit 014 - Fuzzer [D:\a\php-src\php-src\Zend\tests\stack_limit\stack_limit_014.phpt]
GH-14639 (Member access within null pointer in ext/spl/spl_observer.c) [D:\a\php-src\php-src\ext\spl\tests\gh14639.phpt]
Bug #45392 (ob_start()/ob_end_clean() and memory_limit) [D:\a\php-src\php-src\tests\lang\bug45392.phpt]
=====================================================================

4 of these test fail with status code FFFFFFFFC00000FF, which is ERROR_EA_LIST_INCONSISTENT, while one fails with FFFFFFFFC0000028, which is ERROR_OUT_OF_PAPER (these errors don't make much sense, but the German translation of ERROR_OUT_OF_PAPER even less: "Der Drucker ist aus Papier.")

Anyhow, this appears to be a tracing JIT issue.

PHP Version

master

Operating System

Windows

@cmb69
Copy link
Member Author

cmb69 commented Sep 2, 2024

Oops, apparently looked up the wrong error codes: FFFFFFFFC0000028 is STATUS_BAD_STACK and FFFFFFFFC00000FF is STATUS_BAD_FUNCTION_TABLE. Makes more sense.

Note that locally I can only reproduce the crashes of Zend\tests\gh9407.phpt and tests\lang\bug45392.phpt, and both fail with STATUS_BAD_STACK, but only with tracing JIT enabled. gh9407.phpt fails on the LONGJMP() in _zend_bailout().

@cmb69
Copy link
Member Author

cmb69 commented Sep 2, 2024

#14919 (comment) seems to be related.

PS: indeed, the tests are only failing when built with Visual Studio 2022 on x64 (but not on x86, and not when built with Visual Studio 2019). There might be an issue with vs17, or maybe just more thorough checking.

cmb69 added a commit to cmb69/php-src that referenced this issue Sep 2, 2024
This is a stop-gap measure for phpGH-15709 to keep CI green.
@iluuu1994
Copy link
Member

Der Drucker ist aus Papier.

Lol. That sounds like it would be a problem.

cmb69 added a commit that referenced this issue Sep 2, 2024
This is a stop-gap measure for GH-15709 to keep CI green.
@Girgias
Copy link
Member

Girgias commented Sep 9, 2024

If/when this issue is fixed 6d59620 should be reverted.

cmb69 referenced this issue Oct 23, 2024
The error changed in master, not 8.4. My bad.
@cmb69
Copy link
Member Author

cmb69 commented Oct 23, 2024

‎Zend/tests/gh16508.phpt has the same issue (STATUS_BAD_FUNCTION_TABLE). I cannot reproduce locally like for the other STATUS_BAD_FUNCTION_TABLE tests. I can only reproduce STATUS_BAD_STACK issues. I'll have a closer look.

cmb69 added a commit that referenced this issue Oct 23, 2024
This is a stop-gap measure for GH-15709 to keep CI green.
cmb69 added a commit that referenced this issue Oct 23, 2024
This is a stop-gap measure for GH-15709 to keep CI green.

Sorry, xfailed the wrong test case previously.
@cmb69
Copy link
Member Author

cmb69 commented Oct 23, 2024

I've experimented with this locally, focusing on the Zend/tests/gh9407.phpt, since I can reproduce the STATUS_BAD_STACK reliably with x64/vs17 ZTS builds on master. I cannot, however, reproduce with x86 builds, nor NTS builds. nor with vs16, nor with vs17 builds of PHP-8.3. I also cannot reproduce if running gh9407.php. I've also did some experiments with CI. Some findings:

PS: the issue apparently does not occur if ZEND_DEBUG=1, and is likely somewhat related to ASan builds on Windows.

@danog
Copy link
Contributor

danog commented Nov 16, 2024

Note that adding --repeat 2 and improving the JIT flags as per #12406 also creates a number of additional issues: https://github.com/danog/php-src/actions/runs/11869776299/job/33080469494#step:6:470

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

No branches or pull requests

4 participants