Getting fatal error cannot recover from stack overflow when running ansible core 2.11.12

I put ansible in debug and these are the last few lines I am seeing:

Read vars_file 'vars.yml'
 12999 1704737576.69532: done with get_vars()
 12999 1704737576.69540: in VariableManager get_vars()
 12999 1704737576.69557: Loading data from /etc/ansible/vars.yml
Read vars_file 'vars.yml'
 12999 1704737576.69573: done with get_vars()
Fatal Python error: Cannot recover from stack overflow.

There are 152 lines in my vars.yaml file but I have been running like this for well over a year with no issues. No we are seeing this message.

This is on Rocky 8 with python 3.6

Any one have any clue what ios going on or how to better debug things?

The debug messages about the vars_file loading is probably not directly related to the issue, and there’s not enough info to guess. There’s recursion somewhere that’s exceeding Python’s internal stack depth, so it crashes. You might get a more relevant error if you reduce the stack depth 29.1. sys — System-specific parameters and functions — Python 3.6.15 documentation so a RecursionError is raised instead.

1 Like