Compare commits

..

3 Commits

Author SHA1 Message Date
Gud Boi 7f602db50d Unmask `ClosedResourceError` handling in `._transport`
Unmask the CRE case block for peer-closed socket errors which already
had a TODO about reproducing the condition. It appears this case can
happen during inter-actor comms teardowns in `piker`, but i haven't been
able to figure out exactly what reproduces it yet..

So activate the block again for that 'socket already closed'-msg case,
and add a TODO questioning how to reproduce it.

(this commit msg was generated in some part by [`claude-code`][claude-code-gh])
[claude-code-gh]: https://github.com/anthropics/claude-code
2026-02-11 21:45:32 -05:00
Tyler Goodlet c79a4a0bf6 Mask tpt-closed handling of `chan.send(return_msg)`
A partial revert of commit c05d08e426 since it seem we already
suppress tpt-closed errors lower down in `.ipc.Channel.send()`; given
that i'm pretty sure this new handler code should basically never run?

Left in a todo to remove the masked content once i'm done more
thoroughly testing under `piker`.
2026-02-11 21:45:32 -05:00
Tyler Goodlet 84af2b8535 More `TransportClosed`-handling around IPC-IO
For IPC-disconnects-during-teardown edge cases, augment some `._rpc`
machinery,
- in `._invoke()` around the `await chan.send(return_msg)` where we
  suppress if the underlying `Channel` already disconnected.
- add a disjoint handler in `_errors_relayed_via_ipc()` which just
  reports-n-reraises the exc (same as prior behaviour).
  * originally i thought it needed to be handled specially (to avoid
    being crash handled) but turns out that isn't necessary?
  * hence the also-added-bu-masked-out `debug_filter` / guard expression
    around the `await debug._maybe_enter_pm()` line.
- show the `._invoke()` frame for the moment.
2026-02-11 21:45:32 -05:00
3 changed files with 9 additions and 2 deletions

View File

@ -169,7 +169,7 @@ class UDSAddress(
# ?^TODO, for `multiaddr`'s parser we can't use the `::`
# above^, SO maybe a `.` or something else here?
# sockname: str = '.'.join(actor.uid) + f'@{pid}'
# -[ ] CURRENTLY using `.` BREAKS TEST SUITE tho..
# -[ ] CURRETLY using `.` BREAKS TEST SUITE tho..
else:
prefix: str = '<unknown-actor>'
if is_root_process():

View File

@ -416,6 +416,9 @@ def get_logger(
mod_ns_path: str = caller_mod.__name__
mod_pkg_ns_path: str = caller_mod.__package__
# if 'snakelib' in mod_pkg_ns_path:
# import pdbp
# breakpoint()
if (
mod_pkg_ns_path in mod_ns_path
or
@ -488,6 +491,10 @@ def get_logger(
proper_name: str = name.removeprefix(
f'{pkg_name}.'
)
# if 'pylib' in name:
# import pdbp
# breakpoint()
msg: str = (
f'@ {get_caller_mod()}\n'
f'Duplicate pkg-name in sub-logger `name`-key?\n'

View File

@ -71,7 +71,7 @@ from outcome import (
Outcome,
)
log: StackLevelAdapter = get_logger()
log: StackLevelAdapter = get_logger(__name__)
__all__ = [