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

Assertion `jit->ra[var].flags & (1<<0)' failed #16837

Open
danog opened this issue Nov 17, 2024 · 4 comments
Open

Assertion `jit->ra[var].flags & (1<<0)' failed #16837

danog opened this issue Nov 17, 2024 · 4 comments

Comments

@danog
Copy link
Contributor

danog commented Nov 17, 2024

Description

Got the following assertion when running multiple Psalm unit tests:

ext/opcache/jit/zend_jit_ir.c:1386: zend_jit_use_reg: Assertion `jit->ra[var].flags & (1<<0)' failed.

Config is in #12406, reproducer command is:

php --repeat 2 -f .github/jit_check.php /tmp/psalm/vendor/bin/phpunit /tmp/psalm/tests/LanguageServer/FileMapTest.php

PHP Version

nightly

Operating System

No response

@iluuu1994
Copy link
Member

/cc @dstogov

@dstogov
Copy link
Member

dstogov commented Nov 19, 2024

This may be fixed via ef5844a

I wasn't able to reproduce the reported assertion, but got a crash instead.
The commit above fixed the crash. Assertion is not reproducible.

@danog
Copy link
Contributor Author

danog commented Nov 20, 2024

@dstogov Thanks! Seems okay, but still getting some segfaults on tests/AnnotationTest.php and several others (currently testing on arm64).

Reproduce by cloning and running php .github/nightly.php with the following ini:

memory_limit = -1
zend.assertions = 1
display_errors = On
display_startup_errors = On

[opcache]
zend_extension=opcache.so

opcache.memory_consumption=4096M
opcache.enable=1
opcache.enable_cli=1
opcache.jit=tracing
opcache.validate_timestamps=0
opcache.jit_buffer_size=128M
opcache.file_update_protection=0
opcache.max_accelerated_files=1000000
opcache.interned_strings_buffer=64

opcache.jit_prof_threshold=0.000000001
opcache.jit_max_root_traces=  100000
opcache.jit_max_side_traces=  100000
opcache.jit_max_exit_counters=100000
opcache.jit_hot_loop=1
opcache.jit_hot_func=1
opcache.jit_hot_return=1
opcache.jit_hot_side_exit=1

opcache.jit_blacklist_root_trace=255
opcache.jit_blacklist_side_trace=255

opcache.protect_memory=1

@danog
Copy link
Contributor Author

danog commented Nov 21, 2024

@dstogov Sorry, I meant to link the repo https://github.com/danog/php-src for the reproducer :)

Reproduce by cloning https://github.com/danog/php-src and running php .github/nightly.php with the following ini:

memory_limit = -1
zend.assertions = 1
display_errors = On
display_startup_errors = On

[opcache]
zend_extension=opcache.so

opcache.memory_consumption=4096M
opcache.enable=1
opcache.enable_cli=1
opcache.jit=tracing
opcache.validate_timestamps=0
opcache.jit_buffer_size=128M
opcache.file_update_protection=0
opcache.max_accelerated_files=1000000
opcache.interned_strings_buffer=64

opcache.jit_prof_threshold=0.000000001
opcache.jit_max_root_traces=  100000
opcache.jit_max_side_traces=  100000
opcache.jit_max_exit_counters=100000
opcache.jit_hot_loop=1
opcache.jit_hot_func=1
opcache.jit_hot_return=1
opcache.jit_hot_side_exit=1

opcache.jit_blacklist_root_trace=255
opcache.jit_blacklist_side_trace=255

opcache.protect_memory=1

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

3 participants