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 "JIT stack limit exhausted" in big queries #5137

Closed
eisberg opened this issue Dec 21, 2021 · 4 comments · Fixed by #5138
Closed

Error "JIT stack limit exhausted" in big queries #5137

eisberg opened this issue Dec 21, 2021 · 4 comments · Fixed by #5138

Comments

@eisberg
Copy link
Contributor

eisberg commented Dec 21, 2021

Bug Report

Q A
BC Break no
Version 3.2.0

Summary

When executing big DDL/SQL queries, the error "JIT stacklimit exhausted" occurs

Same problem reporting also here:
Issue: #4980
PR: #4927

Error trace:

JIT stack limit exhausted
#0 vendor/doctrine/dbal/src/SQL/Parser.php(109): Doctrine\DBAL\SQL\Parser\Exception\RegularExpressionError::new()
#1 vendor/doctrine/dbal/src/Driver/OCI8/Connection.php(71): Doctrine\DBAL\SQL\Parser->parse('DELETE FROM DEV...', Object(Doctrine\DBAL\Driver\OCI8\ConvertPositionalToNamedPlaceholders))
#2 vendor/doctrine/dbal/src/Driver/OCI8/Connection.php(108): Doctrine\DBAL\Driver\OCI8\Connection->prepare('DELETE FROM DEV...')
#3 vendor/doctrine/dbal/src/Connection.php(1145): Doctrine\DBAL\Driver\OCI8\Connection->exec('DELETE FROM DEV...')
#4 vendor/doctrine/orm/lib/Doctrine/ORM/Query/Exec/SingleTableDeleteUpdateExecutor.php(45): Doctrine\DBAL\Connection->executeStatement('DELETE FROM DEV...', Array, Array)
#5 vendor/doctrine/orm/lib/Doctrine/ORM/Query.php(322): Doctrine\ORM\Query\Exec\SingleTableDeleteUpdateExecutor->execute(Object(Doctrine\DBAL\Connection), Array, Array)
#6 vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php(1160): Doctrine\ORM\Query->_doExecute()
...

How to reproduce

Example DQL: dql.txt

pseudo code:

$this->createFilteredQueryBuilder($filter) //   << Doctrine\ORM\QueryBuilder, with filter ( many OR conditions, see dql.txt)
            ->delete($entityClassName, 'a')
            ->getQuery()
            ->execute();

Expected behaviour

Large SQL runs without errors (as in DBAL2)

@morozov
Copy link
Member

morozov commented Dec 21, 2021

I can reproduce the issue locally. It looks like the current version of the regular expressions used by the parser still can take too many steps on queries like the one in the description (ref).

@morozov
Copy link
Member

morozov commented Dec 21, 2021

@eisberg please see if #5138 works for you. It works for me with your query.

@eisberg
Copy link
Contributor Author

eisberg commented Dec 22, 2021

@eisberg please see if #5138 works for you. It works for me with your query.

Yes, it works fine with this fix!

@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants