Open goodboy opened 2 years ago
Boom got it.
It's because we call await ctx.cancel()
inside a finally:
...from the containing open_feed():
block...
Removing this makes the serialization error propagate.
Need to make a test for this in tractor
..
Still no idea how to reproduce with unit test 😂
It seems to be some kind of race where the .started()
call errors but the error is rewrapped and discarded during cancellation processing triggered by the calling actor? I'm lost how this is possible atm..
Guilty line of code when using
msgpack
intractor
.Super odd, and pretty sure @iamzoltan found this before but, basically a serialization error due to using
msgpack
(instead ofmsgspec
) and sending aset
causes a crash intractor.Context.started()
but this error isn't propagated upward to the calling actor (emsd
in this case).Instead we get the msg error but the contents of that message aren't an
error
and instead contain areturn
?And here is the msg contents:
Not sure what the heck is going on but simple tests introduced to
tractor
don't seem to expose this problem which makes me think it's something to do with a race inContextCancelled
being raised in the target task and/or the wrong error being capture and set asContext._errror
? it's that or some kinda wacky task-context id mixup is happening.Needs some deep debugging inside
_invoke()
likely...