question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Maximum call stack size exceeded - python 3.6 - jsii 0.21.1

See original GitHub issue

We are currently working with CDK to deploy multiple stacks that create an ECS Cluster/tasks and ALBs. Deploying more than a certain number of stacks simultaneously creates the error reported bellow. Deploying the stacks individually works perfectly. I wanted to note that in my code I’m passing some cdk objects from stack to stack like in the example in this link: https://github.com/aws-samples/aws-cdk-examples/blob/master/python/codepipeline-docker-build/Base.py#L68-L70 https://github.com/aws-samples/aws-cdk-examples/blob/master/python/codepipeline-docker-build/app.py#L12-L15

Reproduction Steps

I don’t have any easy way to reproduce the steps without sharing confidential code.

Error Log

$ cdk synthesize -c "deploy=stg"

/Users/med.bensalem/WorkSpace/repos/devops.cdk-pipeline/infrastructure/.env/lib/python3.6/site-packages/jsii/_embedded/jsii/jsii-runtime.js:13374
                throw e;
                ^

RangeError: Maximum call stack size exceeded
    at new Uint8Array (<anonymous>)
    at new FastBuffer (internal/buffer.js:944:1)
    at Function.alloc (buffer.js:358:10)
    at SyncStdio.readLine (/Users/med.bensalem/WorkSpace/repos/devops.cdk-pipeline/infrastructure/.env/lib/python3.6/site-packages/jsii/_embedded/jsii/jsii-runtime.js:13350:33)
    at SyncStdio.readLine (/Users/med.bensalem/WorkSpace/repos/devops.cdk-pipeline/infrastructure/.env/lib/python3.6/site-packages/jsii/_embedded/jsii/jsii-runtime.js:13379:25)
    at SyncStdio.readLine (/Users/med.bensalem/WorkSpace/repos/devops.cdk-pipeline/infrastructure/.env/lib/python3.6/site-packages/jsii/_embedded/jsii/jsii-runtime.js:13379:25)
    at SyncStdio.readLine (/Users/med.bensalem/WorkSpace/repos/devops.cdk-pipeline/infrastructure/.env/lib/python3.6/site-packages/jsii/_embedded/jsii/jsii-runtime.js:13379:25)
    at SyncStdio.readLine (/Users/med.bensalem/WorkSpace/repos/devops.cdk-pipeline/infrastructure/.env/lib/python3.6/site-packages/jsii/_embedded/jsii/jsii-runtime.js:13379:25)
    at SyncStdio.readLine (/Users/med.bensalem/WorkSpace/repos/devops.cdk-pipeline/infrastructure/.env/lib/python3.6/site-packages/jsii/_embedded/jsii/jsii-runtime.js:13379:25)
    at SyncStdio.readLine (/Users/med.bensalem/WorkSpace/repos/devops.cdk-pipeline/infrastructure/.env/lib/python3.6/site-packages/jsii/_embedded/jsii/jsii-runtime.js:13379:25)
Traceback (most recent call last):
  File "infrastructure.py", line 165, in <module>
    ecs_task_name=ecs_task['name']
  File "/Users/med.bensalem/WorkSpace/repos/devops.cdk-pipeline/infrastructure/.env/lib/python3.6/site-packages/jsii/_runtime.py", line 66, in __call__
    inst = super().__call__(*args, **kwargs)
  File "/Users/med.bensalem/WorkSpace/repos/devops.cdk-pipeline/infrastructure/stacks/alb.py", line 53, in __init__
    route_table_id=subnet_route_table
  File "/Users/med.bensalem/WorkSpace/repos/devops.cdk-pipeline/infrastructure/.env/lib/python3.6/site-packages/aws_cdk/aws_ec2/__init__.py", line 23182, in from_subnet_attributes
    return jsii.sinvoke(cls, "fromSubnetAttributes", [scope, id, attrs])
  File "/Users/med.bensalem/WorkSpace/repos/devops.cdk-pipeline/infrastructure/.env/lib/python3.6/site-packages/jsii/_kernel/__init__.py", line 113, in wrapped
    return _recursize_dereference(kernel, fn(kernel, *args, **kwargs))
  File "/Users/med.bensalem/WorkSpace/repos/devops.cdk-pipeline/infrastructure/.env/lib/python3.6/site-packages/jsii/_kernel/__init__.py", line 307, in sinvoke
    args=_make_reference_for_native(self, args),
  File "/Users/med.bensalem/WorkSpace/repos/devops.cdk-pipeline/infrastructure/.env/lib/python3.6/site-packages/jsii/_kernel/providers/process.py", line 351, in sinvoke
    return self._process.send(request, InvokeResponse)
  File "/Users/med.bensalem/WorkSpace/repos/devops.cdk-pipeline/infrastructure/.env/lib/python3.6/site-packages/jsii/_kernel/providers/process.py", line 307, in send
    self._process.stdin.flush()
BrokenPipeError: [Errno 32] Broken pipe
Subprocess exited with error 1

Environment

  • **CDK CLI Version :1.21.0
  • **JSII Version:0.21.1
  • **OS :OSX Catalina
  • **Language :python 3.6

This is 🐛 Bug Report

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
medbensalemcommented, Jan 27, 2020

I confirm that reversing back to node 12, solved the issue.

1reaction
alukachcommented, Jan 27, 2020

@MrArnoldPalmer I was experiencing this issue. Using nvm use 12 to force my node version from 13.7 to 12 did the trick. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

javascript - Maximum call stack size exceeded error
It means that somewhere in your code, you are calling a function which in turn calls another function and so forth, until you...
Read more >
RangeError: Maximum call stack size exceeded - Educative.io
In this shot, we will see how to fix the “RangeError: Maximum call stack size exceeded” error. ... The most common source for...
Read more >
JavaScript Error: Maximum Call Stack Size Exceeded
If you see the “Maximum Call Stack Size Exceeded” error, there's likely a problem with a recursive function within your JavaScript code.
Read more >
awslabs/aws-cdk - Gitter
I updated my aws-cdk npm package and now I need to upgrade my python modules.. ... [2021-01-21T04:53:44.762Z] RangeError: Maximum call stack size exceeded...
Read more >
Debug Range Error Maximum call stack size exceeded
Debug Range Error Maximum call stack size exceeded #vscode #javascript #shorts #debug #100daysofcode.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found