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

Fatal error since PHP 8.3.9+ #11067

Open
sukei opened this issue Aug 7, 2024 · 10 comments
Open

Fatal error since PHP 8.3.9+ #11067

sukei opened this issue Aug 7, 2024 · 10 comments

Comments

@sukei
Copy link

sukei commented Aug 7, 2024

When I run the whole analyze, I got the following error at the very end:

PHP Fatal error: Maximum execution time of 0 seconds exceeded in vendor/vimeo/psalm/src/Psalm/Internal/Type/ParseTree.php on line 26

If I remove the method ParseTree::__destruct, the error disappear. This method seems to exist for the memory management, but I do not see any improvement of the memory usage with or without the destructor.

@romulodl
Copy link

romulodl commented Sep 2, 2024

got the same error running psalm 5.25.0 on PHP 8.2.22

@InvisibleSmiley
Copy link

Last known good: 5.6.0 (broken since 5.7.0).
I'm using psalm/phar because I cannot install vimeo/psalm due to dependency issues (namely nikic/php-parser ^5).
Happens with both PHP 8.1 and 8.2.

@InvisibleSmiley
Copy link

InvisibleSmiley commented Sep 3, 2024

Maybe stating the obvious, but this is neither a problem exceeding the max execution time nor a PHP config issue. It's an infinite loop.

@weirdan
Copy link
Collaborator

weirdan commented Sep 7, 2024

I can't reproduce it. Running latest 5.x branch on either PHP 8.2.23 or PHP 8.3.11 (both are the latest versions at the time of writing) on Psalm's own source code.

@pereorga
Copy link
Contributor

pereorga commented Sep 7, 2024

Psalm's own source code

I can reproduce this using PHP 8.3.11 (brew, Mac M1), when running it with --no-cache.

@weirdan
Copy link
Collaborator

weirdan commented Sep 7, 2024

Running linux here, and it looks like it may be apple-specific: php/php-src#12814 (comment)

@vudaltsov have you had any success tracking it down?

@sukei
Copy link
Author

sukei commented Sep 8, 2024

I can reproduce this using PHP 8.3.11 (brew, Mac M1), when running it with --no-cache.

I have PHP 8.3.11 installed with brew on a MacBook Pro M1 too. The --no-cache flag is not better nor worse however.

@bakert
Copy link

bakert commented Oct 31, 2024

I started experiencing this after upgrading my project from PHP8.1 to 8.2. If I add --threads=1 it goes away. PHP installed via homebrew on my M1 Pro running Sonoma.

bakert added a commit to PennyDreadfulMTG/gatherling that referenced this issue Oct 31, 2024
If you actually find this slow you could remove it because it's just a visual
bug really.
@Saeven
Copy link

Saeven commented Nov 21, 2024

Can confirm what @bakert suspects. On my end, however, I've not changed PHP versions for quite some time, nor have I changed psalm versions (am on 4.30.0).

My suspicion is that this started when I upgraded to Sequoia 15.1. --threads=1 works, --threads=2 does not.

$ php --version
PHP 7.4.33 (cli) (built: Sep 27 2024 12:56:02) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Xdebug v3.1.6, Copyright (c) 2002-2022, by Derick Rethans
    with Zend OPcache v7.4.33, Copyright (c), by Zend Technologies

@Filipponik
Copy link

same problem on M2 + php8.3 + --threads != 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

8 participants