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

Maximum recursion depth exceeded when dumping a large Finite State Machines #26491

Closed
cheuberg opened this issue Oct 15, 2018 · 10 comments
Closed

Comments

@cheuberg
Copy link
Contributor

When calling dumps(fsm) for some large finite state machine, maximum recursion depth might be exceeded:

  File "sage/misc/persist.pyx", line 285, in sage.misc.persist.dumps (build/cythonized/sage/misc/persist.c:4397)
  File "sage/misc/persist.pyx", line 256, in sage.misc.persist._base_dumps (build/cythonized/sage/misc/persist.c:3989)
  File "sage/misc/persist.pyx", line 835, in sage.misc.persist.SagePickler.dumps (build/cythonized/sage/misc/persist.c:6593)
  File "sage/misc/persist.pyx", line 592, in sage.misc.persist._BasePickler.dump (build/cythonized/sage/misc/persist.c:5664)
RuntimeError: maximum recursion depth exceeded while calling a Python object

CC: @dkrenn

Component: finite state machines

Keywords: Pickle

Author: Clemens Heuberger

Branch/Commit: ef2d7a6

Reviewer: Daniel Krenn

Issue created by migration from https://trac.sagemath.org/ticket/26491

@cheuberg
Copy link
Contributor Author

comment:1

I guess that the problem is that states save their outgoing transitions. So a dump will be recursive, because one state dumps its transitions which in turn dump their states and so on.

@cheuberg
Copy link
Contributor Author

Commit: ef2d7a6

@cheuberg
Copy link
Contributor Author

Changed keywords from none to Pickle

@cheuberg
Copy link
Contributor Author

Author: Clemens Heuberger

@cheuberg
Copy link
Contributor Author

New commits:

ef2d7a6Trac #26491: Pickle Finite State Machines

@cheuberg
Copy link
Contributor Author

Branch: u/cheuberg/t/26491/pickle-fsm

@dkrenn
Copy link
Contributor

dkrenn commented Oct 21, 2018

Reviewer: Daniel Krenn

@dkrenn
Copy link
Contributor

dkrenn commented Oct 21, 2018

comment:3

LGTM (positive review) modulo patchbot (which has not finished yet).

@vbraun
Copy link
Member

vbraun commented Oct 23, 2018

Changed branch from u/cheuberg/t/26491/pickle-fsm to ef2d7a6

@embray
Copy link
Contributor

embray commented Oct 28, 2018

comment:6

This should be re-targeted for 8.5.

@embray embray modified the milestones: sage-8.4, sage-8.5 Oct 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants