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

Cross-actor tracebacks on gevent #74

Closed
arnuschky opened this issue Aug 24, 2017 · 0 comments
Closed

Cross-actor tracebacks on gevent #74

arnuschky opened this issue Aug 24, 2017 · 0 comments
Assignees
Milestone

Comments

@arnuschky
Copy link

arnuschky commented Aug 24, 2017

When a traceback is thrown in an actor, is there any way to report the original traceback in the calling actor? Debugging is very hard in Pykka as an exception is shown only with the traceback from the calling actor rather than the traceback leading to the actual cause of the exception.

Taking the counter.py example, let's assume there's an exception in the Adder actor. What we see is:

Traceback (most recent call last):
  File "counter.py", line 45, in <module>
    bookkeeper.count_to(10).get()
  File "/local/lib/python2.7/site-packages/pykka/gevent.py", line 47, in get
    return self.async_result.get(timeout=timeout)
  File "/local/lib/python2.7/site-packages/gevent/event.py", line 385, in get
    return self.get(block=False)
  File "/local/lib/python2.7/site-packages/gevent/event.py", line 375, in get
    return self._raise_exception()
  File "/local/lib/python2.7/site-packages/gevent/event.py", line 355, in _raise_exception
    reraise(*self.exc_info)
  File "/local/lib/python2.7/site-packages/gevent/_util_py2.py", line 8, in reraise
    raise type, value, tb
KeyError: 'arg'

What I would love to see is:

Traceback (most recent call last):
  File "counter.py", line 37, in <module>
    raise KeyError('arg')
  File "counter.py", line 35, in <module>
    adder.add_one()
  File "counter.py", line 45, in <module>
    bookkeeper.count_to(10).get()
  File "/local/lib/python2.7/site-packages/pykka/gevent.py", line 47, in get
    return self.async_result.get(timeout=timeout)
  File "/local/lib/python2.7/site-packages/gevent/event.py", line 385, in get
    return self.get(block=False)
  File "/local/lib/python2.7/site-packages/gevent/event.py", line 375, in get
    return self._raise_exception()
  File "/local/lib/python2.7/site-packages/gevent/event.py", line 355, in _raise_exception
    reraise(*self.exc_info)
  File "/local/lib/python2.7/site-packages/gevent/_util_py2.py", line 8, in reraise
    raise type, value, tb
KeyError: 'arg'

Is this somehow possible? Am I missing something, or are cross-actor tracebacks not possible?

@jodal jodal added the question label Dec 8, 2018
@jodal jodal added this to the v2.0 milestone Jan 28, 2019
@jodal jodal changed the title Cross-actor tracebacks Cross-actor tracebacks on gevent Jan 28, 2019
@jodal jodal closed this as completed in 26dd5fc Feb 15, 2019
@jodal jodal self-assigned this Feb 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants