-
Notifications
You must be signed in to change notification settings - Fork 97
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
Segmentation fault - was: Seeking help with endless loop #606
Comments
Would be good if you tried to reproduce it here in the test suite. Also try to bring the environments of your local machine and GitHub Actions closer with these steps, you might be able to reproduce it in both places: https://phpstan.org/blog/phpstan-reports-different-errors-locally-ci-what-should-i-do |
Thanks, I double checked, but I already follow best practices. Couldn't find anything related in your blog post. This line triggers the endless loop:
I can remove it and PHPStan works again. To get rid of the error I can also remove:
And I can replace these lines:
So the error is likely somewhere in this bridge trying to understand the subselect?!? The tests not only require mongo, they are also really hard to read and understand. |
Found even more weirdness. This works
And this causes PHPStan to be blocked until PHP timeout:
|
Anyway, closing as this seems to be of no interest and/or environment specific. |
@ondrejmirtes I think this is a deeper issue, I am running into a If you check this build, you can see
Now one commit later the build does not fail anymore on PHPStan. You can see the latest commits and build here to verify it yourself. I think there is an issue in PHPStan.
|
I have a strange issue that I cannot reproduce in CI: PHPStan execution does not end locally, it gets stuck at a certain code point (see example below) and runs until PHP timeout occurs after 300 seconds.
Usually my Symfony 6.4 app is analyzed in ~ 15 seconds, but with a recent code change on my end (a Doctrine subselect was added) it doesn't end, CPU is at 100% and RAM usage increases constantly (after 20 seconds its at 6GB+).
I use a Macbook M3 and tried PHP 8.1 and 8.3 with same results.
This code runs without issue in a GitHub action (Ubuntu latest with PHP 8.1 / 8.2 / 8.3).
PHPStan is installed in the project.
Composer packages are the same, all PHPstan configs are fetched from phpstan.neon.
The code is the same locally and in CI, besides the minor version of PHP.
Thats the code triggering the problem:
If I remove the last line (the
getDQL()
subselect), the issue goes away.I tried to lower the Doctrine package, tried to lower the level from 9 to 4 and removed the bleeding-edge rules:
Do you have any idea where/how I could investigate what is going on?
The text was updated successfully, but these errors were encountered: