Skip to content
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.

Deep recursion in VM code fails with java StackOverflowError unless -Xss is significant #1033

Open
mkalinin opened this issue Mar 14, 2018 · 1 comment

Comments

@mkalinin
Copy link
Contributor

Reproduced in ImportLighTest.deepRecursionTest(). It starts to work properly if -Xss parameter is set at least to 5m.

An invocation in VM breeds its own repository track to run the code on it. Each inner invocation creates track on top of a previous one. Thus when code accesses repository it have to pass all tracks and once the level of recursive invocation becomes big enough it turns with StackOverflowError. It's a rare case, but anyway. There is no straightforward solution, requires deeper investigation.

@Nashatyrev
Copy link
Member

Here we have 2 recusrions:

  • VM call recursion
  • Storage recursion

Normally both recursions can be flattened, but this requires some extra efforts

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

No branches or pull requests

2 participants