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

Error: Xdebug has detected a possible infinite loop, and aborted your script with a stack depth of '512' frames #49968

Closed
mxts opened this issue Feb 4, 2024 · 4 comments · Fixed by #49972

Comments

@mxts
Copy link

mxts commented Feb 4, 2024

Laravel Version

10.43.0

PHP Version

8.1.27

Database Driver & Version

MySQL version: 8.0.35

Description

  1. Our internal CI/CD started failing out of the blue with Error: Xdebug has detected a possible infinite loop, and aborted your script with a stack depth of '512' frames

  2. After some work, we managed to reproduce at https://github.com/mxts/laravel-issue, if using 10.43.0, the test will fail, while test will pass if using 10.42.0

  3. The issue comes from the internals and we still have not narrowed down the code, but when our entire scope here https://github.com/mxts/laravel-issue/blob/b6d93fd817c6e0ed9d88c20e157137a1a7af09f9/app/Models/WithTx.php#L9-L15 is commented out, the problem goes away

  4. Not quite sure why our scope leads Laravel to nest infinitely

Steps To Reproduce

  1. Clone https://github.com/mxts/laravel-issue
  2. Modify .env.testing with DB credentials
  3. Run composer update to get 10.43.0 and watch php artisan test fail
  4. Modify composer.json to use 10.42.0
  5. Run composer update to get 10.42.0 and watch php artisan test pass
@mateusjunges
Copy link
Contributor

Hey @mxts I had some issues using your repo to reproduce this. Had to recreate storage directory and create .env manually to fix it, but up & running now. I tracked it down to this PR #49912. Still investigating

@mxts
Copy link
Author

mxts commented Feb 4, 2024

@mateusjunges wonderful thanks!

Sorry about the storage and .env, I'm curious, did you face the issue too?

@mateusjunges
Copy link
Contributor

mateusjunges commented Feb 4, 2024

Yeah, I can reproduce the issue. Trying to fix it now.

@mateusjunges
Copy link
Contributor

Ok, fixed it. I'll open a PR in a few min

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants