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

Failing Psalm unit tests on windows with function JIT #18024

Open
danog opened this issue Mar 11, 2025 · 5 comments
Open

Failing Psalm unit tests on windows with function JIT #18024

danog opened this issue Mar 11, 2025 · 5 comments

Comments

@danog
Copy link
Contributor

danog commented Mar 11, 2025

Description

Psalm end to end tests on the master branch are segfaulting with function JIT enabled.

https://github.com/vimeo/psalm/actions/runs/13793644553/job/38579742315?pr=11342

To reproduce, fork Psalm (master branch), uncomment https://github.com/vimeo/psalm/blob/master/.github/workflows/windows-ci.yml#L62, remove the next line and start the unit tests.

Ping @dstogov, @nielsdos.

PHP Version

PHP 8.4.4

Operating System

Microsoft Windows Server 2022 10.0.20348

@dstogov
Copy link
Member

dstogov commented Mar 11, 2025

@danog Thanks for the report, but I need a reduced test case.

@iluuu1994
Copy link
Member

@danog Can you reproduce this locally? Preferably when running only one test? It's going to be very hard to diagnose otherwise.

@nielsdos
Copy link
Member

nielsdos commented Mar 11, 2025

FWIW the Windows exit code corresponds to 0xc0000005, i.e. ACCESS_VIOLATION.

On my Linux machine I get:

[niels@ARCH psalm]$ /run/media/niels/MoreData/php-8.4/sapi/cli/php -d opcache.enable=1 -d opcache.enable_cli=1 -d opcache.jit=function -d opcache.jit_buffer_size=256M -d zend_extension=/run/media/niels/MoreData/php-8.4/modules/opcache.so -f ./psalm
ir_base[6813] is in use list of ir_base[1]
php: /run/media/niels/MoreData/php-8.4/ext/opcache/jit/ir/ir_check.c:391: ir_check: Assertion `ok' failed.
Aborted (core dumped)

Déjà vu, I think this is dstogov/ir#109, and indeed backporting that allows me to run the psalm command. This particular issue fix is in queue for 8.4.6, and not released yet.
If that assertion failure is not the root cause, it's possible your issue was already fixed too anyway. There a few JIT fixes in 8.4.5 (and 8.4-dev) as well.

@dstogov
Copy link
Member

dstogov commented Mar 12, 2025

@nielsdos thanks for analysing.

Copy link

No feedback was provided. The issue is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so. Thank you.

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