You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Linux hostname 5.1.9-arch1-1-ARCH #1 SMP PREEMPT Tue Jun 11 16:18:09 UTC 2019 x86_64 GNU/Linux
Description
When running a future that panics on a runtime with block_on or block_on_all, it will trigger an unreachable macro.
It is documented behavior, that those functions panic if the provided future panics, but it shouldn't panic with unreachable since that code is clearly not unreachable.
Version
tokio 0.1.21 (also latest master as of now)
Platform
Linux hostname 5.1.9-arch1-1-ARCH #1 SMP PREEMPT Tue Jun 11 16:18:09 UTC 2019 x86_64 GNU/Linux
Description
When running a future that panics on a runtime with
block_on
orblock_on_all
, it will trigger anunreachable
macro.It is documented behavior, that those functions panic if the provided future panics, but it shouldn't panic with
unreachable
since that code is clearly not unreachable.The bug is here:
tokio/tokio/src/runtime/threadpool/mod.rs
Lines 253 to 263 in d4adeee
tokio/tokio/src/runtime/threadpool/mod.rs
Lines 279 to 295 in d4adeee
The
unreachable
macro should be replaced with something likepanic!("The provided future paniced")
or something like that.Code to reproduce:
Or the same with
block_on
instead ofblock_on_all
.The unreachable get's triggered because
tx.send
errored because the receiving end of the oneshot channel was dropped because of the panic btw.The text was updated successfully, but these errors were encountered: