-
-
Notifications
You must be signed in to change notification settings - Fork 142
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
Infinite Loop on callHook and whereIn functions causing apache to restart due to stack overflow #265
Comments
I discovered that the function |
For some reason, this works on php7.3-fpm (with nginx) but goes into this infinite loop in php8.0-fpm and kills fpm (it restarts) and results in the same apache behavior above (nginx shows "502 Bad Gateway") More details |
We're also seeing this infinite loop leading to a segfault. In our case it's when using https://gist.github.com/bericp1/b5b0c77a55bed87eacb2109156c48558
Our
And {
"name": "sofa/eloquence",
"version": "dev-master",
"source": {
"type": "git",
"url": "https://github.com/jarektkaczyk/eloquence.git",
"reference": "7863ed50e0a8463efd2058ffa51c1f4908860969"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/jarektkaczyk/eloquence/zipball/7863ed50e0a8463efd2058ffa51c1f4908860969",
"reference": "7863ed50e0a8463efd2058ffa51c1f4908860969",
"shasum": ""
},
"require": {
"php": ">=7.1.0",
"sofa/eloquence-base": ">=5.5",
"sofa/eloquence-mappable": ">=5.5",
"sofa/eloquence-metable": ">=5.5",
"sofa/eloquence-mutable": ">=5.5",
"sofa/eloquence-validable": ">=5.5"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^2.0",
"mockery/mockery": "^1.0",
"phpunit/phpunit": "^9.5",
"squizlabs/php_codesniffer": "2.3.3"
},
"default-branch": true,
"type": "library",
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jarek Tkaczyk",
"email": "[email protected]",
"homepage": "http://softonsofa.com/",
"role": "Developer"
}
],
"description": "Flexible Searchable, Mappable, Metable, Validation and more extensions for Laravel Eloquent ORM.",
"keywords": [
"eloquent",
"laravel",
"mappable",
"metable",
"mutable",
"searchable"
],
"support": {
"issues": "https://github.com/jarektkaczyk/eloquence/issues",
"source": "https://github.com/jarektkaczyk/eloquence"
},
"funding": [
{
"url": "https://softonsofa.com",
"type": "custom"
},
{
"url": "https://github.com/jarektkaczyk",
"type": "github"
}
],
"time": "2020-12-05T10:37:05+00:00"
} UpdateTurns out actually that this loop does not happen on PHP 7.4 (our specific version is 7.4.16) and only happens on PHP 8.0+ (we specifically tested PHP 8.0.3 and PHP 8.0.6). So our interim solution is to use PHP 7.4.16 for the time being until |
@bericp1 This is confirmed only happening on php 8.0+. Have 2 vagrant boxes @charlesaugust44 research is correct, so it seems like this is a matter of having it call |
I'm getting the nginx "502 Bad Gateway" while running PHP 8.0.6 too. |
Could be related to dependency and PR: jarektkaczyk/hookable#31 |
I'm developing a new API on Lumen and renaming the columns of the legacy database.
I have two tables, Images and Variants, Images has many Variants.
Mapped this relation as the Lumen docs suggest:
Image.php
Calling the the route
\api\images\SR16105G13
with no authentication:The PHP interpreter never goes beyond the
with('variants')
function, i did some step by step debugging with Zend debugger and saw that in the functioncallHook
onSofa\Hookable\Builder
it calls thecallParent
function with the first argument"whereIn"
so it will call the parentwhereIn
onEloquent\Builder
but that function doesn't exists there, so PHP reverts the call back towhereIn
onSofa\Hookable\Builder
that callscallHook
and so on, until call stack is exceeded for Apache and it reboots killing the connection.I'm not very familiar with Lumen Eloquent structure to make any modification to solve this, anyone could give me a hand or commit the solution?
The text was updated successfully, but these errors were encountered: