-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Closed
Labels
Description
Description
https://github.com/danog/jit_bugs, reproducer 7.
Result:
php: ext/opcache/jit/zend_jit_trace.c:350: uint32_t zend_jit_trace_type_to_info_ex(uint8_t, uint32_t): Assertion `info & (1 << type)' failed.
Followed by an impossible RuntimeException PHP Error: Array to string conversion in /app/src/Psalm/Type/Atomic/TGenericObject.php
, exactly from #12255.
ping @dstogov
PHP Version
Operating System
No response
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
dstogov commentedon Oct 30, 2023
This scenario is not reproducible with PHP master branch.
danog commentedon Oct 30, 2023
@dstogov Just ran this with b7c34b7 and can reproduce the issue, running on a 12-core x86_64 machine, will try to tweak the psalm settings a bit to simplify reproduction...
danog commentedon Oct 30, 2023
@dstogov Cleaned up the reproducer a bit, could you try?
dstogov commentedon Oct 30, 2023
I'll try this tomorrow (actually today morining).
USE_ZEND_ALLOC=1
is already set inDockerfile
, so this shouldn't change anything.Could you please also add the following patch to allow debugging in container.
danog commentedon Oct 30, 2023
Done!
Actually it's set to 0 in the Dockerfile, the new setting should speed up stuff a bit :)
dstogov commentedon Oct 31, 2023
Right. My mistake.
Now I see the assertions.
May be I missed them before, because they don't interrupt the execution.
They occur in children processes that is even more complex to debug.
Is there a way to test everything in a single process?
danog commentedon Oct 31, 2023
@dstogov --threads=1 can help with that!
dstogov commentedon Oct 31, 2023
The reduced test case
dstogov commentedon Oct 31, 2023
This should be partially fixed by 93d5c0e
The commit fixes the reduced test case above.
Now running psalm with
--threads=100
, I see only a single assertion (previously I saw few ones).There are no assertions when running psalm with
--threads=1
and withoutwrap.php
I have no ideas how to catch this last assertion.
danog commentedon Oct 31, 2023
Hmm, will see if I can reduce this this weekend...
dstogov commentedon Nov 2, 2023
The assertion disappears if
-f
flag is removed in the command line (before/app/wrap.php
)An attempt to fix phpGH-12512
13 remaining items