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

Recursion error on BroadcastReceiver.receive()? #328

Open
goodboy opened this issue Sep 19, 2022 · 0 comments
Open

Recursion error on BroadcastReceiver.receive()? #328

goodboy opened this issue Sep 19, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@goodboy
Copy link
Owner

goodboy commented Sep 19, 2022

Just hit this in piker doing some nasty clearing engine testing:

    await self.gen.athrow(typ, value, traceback)
    File "/home/goodboy/repos/piker/piker/ui/order_mode.py", line 684, in open_order_mode
      async with (
    File "/usr/lib/python3.10/contextlib.py", line 217, in __aexit__
      await self.gen.athrow(typ, value, traceback)
    File "/home/goodboy/repos/piker/piker/clearing/_client.py", line 249, in open_ems
      async with trio.open_nursery() as n:
    File "/home/goodboy/.virtualenvs/xonsh310/lib/python3.10/site-packages/trio/_core/_run.py", line 813, in __aexit__
      raise combined_error_from_nursery
    File "/home/goodboy/repos/piker/piker/clearing/_client.py", line 157, in relay_order_cmds_from_sync_code
      async for cmd in orders_stream:
    File "/home/goodboy/.virtualenvs/xonsh310/lib/python3.10/site-packages/trio/_abc.py", line 641, in __anext__
      return await self.receive()
    File "/home/goodboy/repos/tractor/tractor/trionics/_broadcast.py", line 294, in receive
      return await self.receive()
    File "/home/goodboy/repos/tractor/tractor/trionics/_broadcast.py", line 294, in receive
      return await self.receive()
    File "/home/goodboy/repos/tractor/tractor/trionics/_broadcast.py", line 294, in receive
      return await self.receive()
    [Previous line repeated 970 more times]
    File "/home/goodboy/repos/tractor/tractor/trionics/_broadcast.py", line 273, in receive
      await ev.wait()
    File "/home/goodboy/.virtualenvs/xonsh310/lib/python3.10/site-packages/trio/_sync.py", line 67, in wait
      await trio.lowlevel.checkpoint()
    File "/home/goodboy/.virtualenvs/xonsh310/lib/python3.10/site-packages/trio/_core/_run.py", line 2346, in checkpoint
      await cancel_shielded_checkpoint()
    File "/home/goodboy/.virtualenvs/xonsh310/lib/python3.10/site-packages/trio/_core/_traps.py", line 43, in cancel_shielded_checkpoint
      return (await _async_yield(CancelShieldedCheckpoint)).unwrap()
    File "/home/goodboy/.virtualenvs/xonsh310/lib/python3.10/site-packages/outcome/_impl.py", line 108, in unwrap
      self._set_unwrapped()
    File "/home/goodboy/.virtualenvs/xonsh310/lib/python3.10/site-packages/outcome/_impl.py", line 59, in _set_unwrapped
      object.__setattr__(self, '_unwrapped', True)
  RecursionError: maximum recursion depth exceeded while calling a Python object

Not sure how this is possible exactly nor how to reproduce it?

The accompanying multi and assertion error were as follows:

Traceback (most recent call last):
File "/home/goodboy/repos/tractor/tractor/_root.py", line 206, in open_root_actor
  yield actor
File "/home/goodboy/repos/piker/piker/_daemon.py", line 244, in maybe_open_runtime
  yield
File "/home/goodboy/repos/piker/piker/_daemon.py", line 269, in maybe_open_pikerd
  yield portal
File "/home/goodboy/repos/piker/piker/ui/_exec.py", line 175, in main
  await func(*((instance,) + args))
File "/home/goodboy/repos/piker/piker/ui/_app.py", line 100, in _async_main
  async with (
File "/home/goodboy/.virtualenvs/xonsh310/lib/python3.10/site-packages/trio/_core/_run.py", line 813, in __aexit__
  raise combined_error_from_nursery
trio.MultiError: AssertionError(), RecursionError('maximum recursion depth exceeded while calling a Python object')

Details of embedded exception 1:

Traceback (most recent call last):
  File "/home/goodboy/repos/piker/piker/ui/_display.py", line 1057, in display_symbol_data
    async with (
  File "/usr/lib/python3.10/contextlib.py", line 217, in __aexit__
    await self.gen.athrow(typ, value, traceback)
  File "/home/goodboy/repos/piker/piker/ui/order_mode.py", line 684, in open_order_mode
    async with (
  File "/home/goodboy/.virtualenvs/xonsh310/lib/python3.10/site-packages/trio/_core/_run.py", line 813, in __aexit__
    raise combined_error_from_nursery
  File "/home/goodboy/repos/piker/piker/ui/order_mode.py", line 928, in process_trades_and_update_ui
    await process_trade_msg(
  File "/home/goodboy/repos/piker/piker/ui/order_mode.py", line 1073, in process_trade_msg
    mode.on_fill(
  File "/home/goodboy/repos/piker/piker/ui/order_mode.py", line 494, in on_fill
    assert len(lines) == 2
AssertionError
@goodboy goodboy added the bug Something isn't working label Sep 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant