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

max_stack_depth Error on import #7

Open
jamesrwelch opened this issue Nov 19, 2021 · 2 comments
Open

max_stack_depth Error on import #7

jamesrwelch opened this issue Nov 19, 2021 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@jamesrwelch
Copy link
Contributor

jamesrwelch commented Nov 19, 2021

Error on trying to import the maurodatamapper schema:

2021-11-19 20:40:42,801 [080-exec-1] ERROR DatabaseDataModelImporterProviderService : Something went wrong executing statement while importing maurodatamapper: ERROR: stack depth limit exceeded
  Hint: Increase the configuration parameter "max_stack_depth" (currently 2048kB), after ensuring the platform's stack depth limit is adequate.
2021-11-19 20:40:42,809 [080-exec-1] ERROR o.g.web.errors.GrailsExceptionResolver   : PSQLException occurred when processing request: [POST] /api/dataModels/import/uk.ac.ox.softeng.maurodatamapper.plugins.database.postgres/PostgresDatabaseDataModelImporterProviderService/5.1.0
ERROR: stack depth limit exceeded
  Hint: Increase the configuration parameter "max_stack_depth" (currently 2048kB), after ensuring the platform's stack depth limit is adequate.. Stacktrace follows:
uk.ac.ox.softeng.maurodatamapper.api.exception.ApiBadRequestException: Cannot execute statement: ERROR: stack depth limit exceeded
  Hint: Increase the configuration parameter "max_stack_depth" (currently 2048kB), after ensuring the platform's stack depth limit is adequate.
        at uk.ac.ox.softeng.maurodatamapper.plugins.database.AbstractDatabaseDataModelImporterProviderService.importDataModelsFromParameters(AbstractDatabaseDataModelImporterProviderService.groovy:764)
        at uk.ac.ox.softeng.maurodatamapper.plugins.database.AbstractDatabaseDataModelImporterProviderService$_importModels_closure1.doCall(AbstractDatabaseDataModelImporterProviderService.groovy:435)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at uk.ac.ox.softeng.maurodatamapper.plugins.database.AbstractDatabaseDataModelImporterProviderService.importModels(AbstractDatabaseDataModelImporterProviderService.groovy:434)
        at uk.ac.ox.softeng.maurodatamapper.core.provider.importer.ModelImporterProviderService.importDomains(ModelImporterProviderService.groovy:52)
        at uk.ac.ox.softeng.maurodatamapper.core.importer.ImporterService.importDomains(ImporterService.groovy:49)
        at uk.ac.ox.softeng.maurodatamapper.core.controller.ModelController.$tt__importModels(ModelController.groovy:630)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at grails.gorm.transactions.GrailsTransactionTemplate$2.doInTransaction(GrailsTransactionTemplate.groovy:94)
        at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140)
        at grails.gorm.transactions.GrailsTransactionTemplate.execute(GrailsTransactionTemplate.groovy:91)
        at java.base/java.lang.invoke.VirtualHandle.invokeExact_thunkArchetype_L(VirtualHandle.java:130)
        at java.base/java.lang.invoke.AsTypeHandle.invokeExact_thunkArchetype_X(AsTypeHandle.java:49)
        at org.grails.core.DefaultGrailsControllerClass$MethodHandleInvoker.invoke(DefaultGrailsControllerClass.java:223)
        at org.grails.core.DefaultGrailsControllerClass.invoke(DefaultGrailsControllerClass.java:188)
        at org.grails.web.mapping.mvc.UrlMappingsInfoHandlerAdapter.handle(UrlMappingsInfoHandlerAdapter.groovy:90)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040)
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
        at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)
        at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
        at org.grails.web.servlet.mvc.GrailsWebRequestFilter.doFilterInternal(GrailsWebRequestFilter.java:77)
        at org.grails.web.filters.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:67)
        at org.springframework.boot.web.servlet.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:128)
        at org.springframework.boot.web.servlet.support.ErrorPageFilter.access$000(ErrorPageFilter.java:66)
        at org.springframework.boot.web.servlet.support.ErrorPageFilter$1.doFilterInternal(ErrorPageFilter.java:103)
        at org.springframework.boot.web.servlet.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:121)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:831)
Caused by: org.postgresql.util.PSQLException: ERROR: stack depth limit exceeded
  Hint: Increase the configuration parameter "max_stack_depth" (currently 2048kB), after ensuring the platform's stack depth limit is adequate.
        at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2553)
        at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2285)
        at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:323)
        at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:473)
        at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:393)
        at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:164)
        at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:114)
        at uk.ac.ox.softeng.maurodatamapper.plugins.database.AbstractDatabaseDataModelImporterProviderService.executeStatement(AbstractDatabaseDataModelImporterProviderService.groovy:724)
        at uk.ac.ox.softeng.maurodatamapper.plugins.database.AbstractDatabaseDataModelImporterProviderService.getColumnRangeDistribution(AbstractDatabaseDataModelImporterProviderService.groovy:894)
        at uk.ac.ox.softeng.maurodatamapper.plugins.database.AbstractDatabaseDataModelImporterProviderService$_updateDataModelWithEnumerationsAndSummaryMetadata_closure3$_closure14$_closure15.doCall(AbstractDatabaseDataModelImporterProviderService.groovy:553)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at uk.ac.ox.softeng.maurodatamapper.plugins.database.AbstractDatabaseDataModelImporterProviderService$_updateDataModelWithEnumerationsAndSummaryMetadata_closure3$_closure14.doCall(AbstractDatabaseDataModelImporterProviderService.groovy:513)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at uk.ac.ox.softeng.maurodatamapper.plugins.database.AbstractDatabaseDataModelImporterProviderService$_updateDataModelWithEnumerationsAndSummaryMetadata_closure3.doCall(AbstractDatabaseDataModelImporterProviderService.groovy:501)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at uk.ac.ox.softeng.maurodatamapper.plugins.database.AbstractDatabaseDataModelImporterProviderService.updateDataModelWithEnumerationsAndSummaryMetadata(AbstractDatabaseDataModelImporterProviderService.groovy:500)
        at uk.ac.ox.softeng.maurodatamapper.plugins.database.AbstractDatabaseDataModelImporterProviderService.importAndUpdateDataModelsFromResults(AbstractDatabaseDataModelImporterProviderService.groovy:490)
        at uk.ac.ox.softeng.maurodatamapper.plugins.database.AbstractDatabaseDataModelImporterProviderService.importDataModelsFromParameters(AbstractDatabaseDataModelImporterProviderService.groovy:759)
        ... 33 common frames omitted
@jamesrwelch jamesrwelch added the bug Something isn't working label Nov 19, 2021
@jamesrwelch
Copy link
Contributor Author

Happens on a few different databases I've tried. The error occurs when summary metadata is requested, but not when enumeration guessing.

@aaronforshaw
Copy link
Contributor

I think this was fixed by MauroDataMapper-Plugins/mdm-plugin-database#10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants