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

RuntimeError: maximum recursion depth exceeded while calling a Python object #36

Open
chenxiang2019 opened this issue Feb 26, 2018 · 0 comments

Comments

@chenxiang2019
Copy link

Hi, all.

I'm trying to compile an experiment program which has very big table number(more than 1000 tables) using p4c-bm. However, when I start the mininet, the process raises an error shows that the following error:

...

  File "/usr/local/lib/python2.7/dist-packages/p4_hlir-0.9.44-py2.7.egg/p4_hlir/hlir/p4_tables.py", line 447, in _set_modified_hdrs
    _set_modified_hdrs(hlir, nt, full_modified_hdrs)
  File "/usr/local/lib/python2.7/dist-packages/p4_hlir-0.9.44-py2.7.egg/p4_hlir/hlir/p4_tables.py", line 447, in _set_modified_hdrs
    _set_modified_hdrs(hlir, nt, full_modified_hdrs)
  File "/usr/local/lib/python2.7/dist-packages/p4_hlir-0.9.44-py2.7.egg/p4_hlir/hlir/p4_tables.py", line 447, in _set_modified_hdrs
    _set_modified_hdrs(hlir, nt, full_modified_hdrs)
  File "/usr/local/lib/python2.7/dist-packages/p4_hlir-0.9.44-py2.7.egg/p4_hlir/hlir/p4_tables.py", line 447, in _set_modified_hdrs
    _set_modified_hdrs(hlir, nt, full_modified_hdrs)
  File "/usr/local/lib/python2.7/dist-packages/p4_hlir-0.9.44-py2.7.egg/p4_hlir/hlir/p4_tables.py", line 436, in _set_modified_hdrs
    for a, nt in entry_point.next_.items():
  File "/usr/lib/python2.7/collections.py", line 110, in items
    return [(key, self[key]) for key in self]
RuntimeError: maximum recursion depth exceeded while calling a Python object

This is a common error as writing Python script. Based on the error information, I set the maximum recursion depth by using sys.getrecursionlimit() in p4_tables.py and resolve this problem.

BTW, I have another question. What's the maximum table number supported by BMv2?

Thank you!

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

No branches or pull requests

1 participant