-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
Occasional infinite loop in previously working code path in 6.5+ #8997
Comments
@tgriesser where is that |
It's coming from lodash. Haven't tried with |
/cc @nodejs/v8 I tried to reproduce this yesterday and was unable. @tgriesser have you been able to come up with a reproducible test case for this? |
I'm trying to reproduce this as well, I've re-run our tests a while now and can't produce this again - though we haven't really done any upgrades. node v6.7 |
Nope, I haven't been able to reproduce this so I'm closing. I've since split out the offending code path so folks using knex shouldn't see this issue anymore. This ticket was opened mainly because issue had been reported by a few different users at the same time, so I figured there was a chance it was indicative of a bigger issue. |
This is a strange issue I'm having trouble reproducing myself or creating a minimum viable test for, but recently in some CI suites in Node 6.5+ there have been infinite loops occurring in code paths that previously had no issue.
It seems that they're occurring when a method (dynamically named on the prototype) calls another dynamically named method. Instead of calling the correct method, it appears to be instead calling itself resulting in an infinite loop.
For example:
It seems that at a certain point when the method
builder.notNullable()
is called instead of then calling/returningthis.nullable(false)
it instead calls itself again and ends up in an infinite loop.Seeing as the v8 version was bumped in 6.5 I suspect this might be a bug there, but I'm not sure where to begin researching if that might be the case.
/cc @jamesdixon @fl0w @kirrg001 @ErisDS who reported seeing this issue, as they might be able to provide more info on the platforms they're seeing this on and provide better insight into the problem.
Here's the original issue as it was reported: knex/knex#1725
These are the two code snippets in the codebase where this has been seen to occur:
https://github.com/tgriesser/knex/blob/82685b57f0f61b053a02899941c78ced3e04163d/src/schema/tablebuilder.js#L156-L182
https://github.com/tgriesser/knex/blob/a24e4df6380bfda9b6e2ef05368ac23a0a2ccaab/src/schema/columnbuilder.js#L30-L39
The text was updated successfully, but these errors were encountered: