Pause-point in .fsp.cascade() causes tractor._state._runtime_vars type bug? #70

Open
opened 2026-02-02 20:45:29 +00:00 by goodboy · 0 comments

No idea how it’s happening yet but if i put a tractor.pause() inside the if loglevel: block i get this crash,


Feb 02 16:14:44 (chart.fsp_1[842703], 76838, tractor.devx.debug._tty_lock.request_root_stdio_lock[503120])) [ERROR] tractor.devx.debug _tty_lock.py:1147 Failed during debug request dialog with root actor?
Failed in `Portal.open_context()` call ??

  + Exception Group Traceback (most recent call last):
  |   File "/home/goodboy/repos/tractor/tractor/devx/debug/_tty_lock.py", line 1123, in request_root_stdio_lock
  |     except* (
  |     ...<25 lines>...
  |         raise ctx_eg
  | ExceptionGroup:  (1 sub-exception)
  +-+---------------- 1 ----------------
    | Traceback (most recent call last):
    |   File "/home/goodboy/repos/tractor/tractor/devx/debug/_tty_lock.py", line 1040, in request_root_stdio_lock
    |     async with get_root() as portal:
    |                ~~~~~~~~^^
    |   File "/nix/store/3lll9y925zz9393sa59h653xik66srjb-python3-3.13.9/lib/python3.13/contextlib.py", line 214, in __aenter__
    |     return await anext(self.gen)
    |            ^^^^^^^^^^^^^^^^^^^^^
    |   File "/home/goodboy/repos/tractor/tractor/_discovery.py", line 103, in get_root
    |     _connect_chan(addr) as chan,
    |     ~~~~~~~~~~~~~^^^^^^
    |   File "/nix/store/3lll9y925zz9393sa59h653xik66srjb-python3-3.13.9/lib/python3.13/contextlib.py", line 214, in __aenter__
    |     return await anext(self.gen)
    |            ^^^^^^^^^^^^^^^^^^^^^
    |   File "/home/goodboy/repos/tractor/tractor/ipc/_chan.py", line 500, in _connect_chan
    |     chan = await Channel.from_addr(addr)
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/home/goodboy/repos/tractor/tractor/ipc/_chan.py", line 181, in from_addr
    |     addr: Address = wrap_address(addr)
    |                     ~~~~~~~~~~~~^^^^^^
    |   File "/home/goodboy/repos/tractor/tractor/_addr.py", line 264, in wrap_address
    |     raise TypeError(
    |     ...<3 lines>...
    |     )
    | TypeError: Can not wrap unwrapped-address ??
    | type(addr): <class 'dict'>
    | addr: {'_host': '127.0.0.1', '_port': 0}
    |
    +------------------------------------

which seems to indicate that the ._runtime_vars['_root_mailbox'] value is getting set to a tractor.ipc._tcp.TCPAddress after it’s been dict-serialized for to/from msgpack for IPC transit?

No idea how it's happening yet but if i put a `tractor.pause()` inside the `if loglevel:` block i get this crash, ```python Feb 02 16:14:44 (chart.fsp_1[842703], 76838, tractor.devx.debug._tty_lock.request_root_stdio_lock[503120])) [ERROR] tractor.devx.debug _tty_lock.py:1147 Failed during debug request dialog with root actor? Failed in `Portal.open_context()` call ?? + Exception Group Traceback (most recent call last): | File "/home/goodboy/repos/tractor/tractor/devx/debug/_tty_lock.py", line 1123, in request_root_stdio_lock | except* ( | ...<25 lines>... | raise ctx_eg | ExceptionGroup: (1 sub-exception) +-+---------------- 1 ---------------- | Traceback (most recent call last): | File "/home/goodboy/repos/tractor/tractor/devx/debug/_tty_lock.py", line 1040, in request_root_stdio_lock | async with get_root() as portal: | ~~~~~~~~^^ | File "/nix/store/3lll9y925zz9393sa59h653xik66srjb-python3-3.13.9/lib/python3.13/contextlib.py", line 214, in __aenter__ | return await anext(self.gen) | ^^^^^^^^^^^^^^^^^^^^^ | File "/home/goodboy/repos/tractor/tractor/_discovery.py", line 103, in get_root | _connect_chan(addr) as chan, | ~~~~~~~~~~~~~^^^^^^ | File "/nix/store/3lll9y925zz9393sa59h653xik66srjb-python3-3.13.9/lib/python3.13/contextlib.py", line 214, in __aenter__ | return await anext(self.gen) | ^^^^^^^^^^^^^^^^^^^^^ | File "/home/goodboy/repos/tractor/tractor/ipc/_chan.py", line 500, in _connect_chan | chan = await Channel.from_addr(addr) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/home/goodboy/repos/tractor/tractor/ipc/_chan.py", line 181, in from_addr | addr: Address = wrap_address(addr) | ~~~~~~~~~~~~^^^^^^ | File "/home/goodboy/repos/tractor/tractor/_addr.py", line 264, in wrap_address | raise TypeError( | ...<3 lines>... | ) | TypeError: Can not wrap unwrapped-address ?? | type(addr): <class 'dict'> | addr: {'_host': '127.0.0.1', '_port': 0} | +------------------------------------ ``` which seems to indicate that the `._runtime_vars['_root_mailbox']` value is getting set to a `tractor.ipc._tcp.TCPAddress` after it's been `dict`-serialized for to/from msgpack for IPC transit?
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: pikers/piker#70
There is no content yet.