hyperium / tonic

A native gRPC client & server implementation with async/await support.
https://docs.rs/tonic
MIT License
9.82k stars 999 forks source link

test codec::prost::tests::encode_too_big panicks on 32-bit architectures #1771

Open jonassmedegaard opened 3 months ago

jonassmedegaard commented 3 months ago

With tonic v0.10.2 built on Debian autobuild daemons, test codec::prost::tests::encode_too_big panicks on the little-endian 32-bit architectures armel, armhf and i386:

189s ---- codec::prost::tests::encode_too_big stdout ----
189s thread 'codec::prost::tests::encode_too_big' panicked at src/codec/prost.rs:213:29:
189s attempt to add with overflow
189s stack backtrace:
189s    0: rust_begin_unwind
189s              at /usr/src/rustc-1.75.0/library/std/src/panicking.rs:645:5
189s    1: core::panicking::panic_fmt
189s              at /usr/src/rustc-1.75.0/library/core/src/panicking.rs:72:14
189s    2: core::panicking::panic
189s              at /usr/src/rustc-1.75.0/library/core/src/panicking.rs:127:5
189s    3: tonic::codec::prost::tests::encode_too_big::{{closure}}
189s              at ./src/codec/prost.rs:213:29
189s    4: <core::pin::Pin<P> as core::future::future::Future>::poll
189s              at /usr/src/rustc-1.75.0/library/core/src/future/future.rs:125:9
189s    5: <core::pin::Pin<P> as core::future::future::Future>::poll
189s              at /usr/src/rustc-1.75.0/library/core/src/future/future.rs:125:9
189s    6: tokio::runtime::scheduler::current_thread::CoreGuard::block_on::{{closure}}::{{closure}}::{{closure}}
189s              at /usr/share/cargo/registry/tokio-1.35.1/src/runtime/scheduler/current_thread/mod.rs:665:57
189s    7: tokio::runtime::coop::with_budget
189s              at /usr/share/cargo/registry/tokio-1.35.1/src/runtime/coop.rs:107:5
189s    8: tokio::runtime::coop::budget
189s              at /usr/share/cargo/registry/tokio-1.35.1/src/runtime/coop.rs:73:5
189s    9: tokio::runtime::scheduler::current_thread::CoreGuard::block_on::{{closure}}::{{closure}}
189s              at /usr/share/cargo/registry/tokio-1.35.1/src/runtime/scheduler/current_thread/mod.rs:665:25
189s   10: tokio::runtime::scheduler::current_thread::Context::enter
189s              at /usr/share/cargo/registry/tokio-1.35.1/src/runtime/scheduler/current_thread/mod.rs:410:19
189s   11: tokio::runtime::scheduler::current_thread::CoreGuard::block_on::{{closure}}
189s              at /usr/share/cargo/registry/tokio-1.35.1/src/runtime/scheduler/current_thread/mod.rs:664:36
189s   12: tokio::runtime::scheduler::current_thread::CoreGuard::enter::{{closure}}
189s              at /usr/share/cargo/registry/tokio-1.35.1/src/runtime/scheduler/current_thread/mod.rs:743:68
189s   13: tokio::runtime::context::scoped::Scoped<T>::set
189s              at /usr/share/cargo/registry/tokio-1.35.1/src/runtime/context/scoped.rs:40:9
189s   14: tokio::runtime::context::set_scheduler::{{closure}}
189s              at /usr/share/cargo/registry/tokio-1.35.1/src/runtime/context.rs:176:26
189s   15: std::thread::local::LocalKey<T>::try_with
189s              at /usr/src/rustc-1.75.0/library/std/src/thread/local.rs:270:16
189s   16: std::thread::local::LocalKey<T>::with
189s              at /usr/src/rustc-1.75.0/library/std/src/thread/local.rs:246:9
189s   17: tokio::runtime::context::set_scheduler
189s              at /usr/share/cargo/registry/tokio-1.35.1/src/runtime/context.rs:176:9
189s   18: tokio::runtime::scheduler::current_thread::CoreGuard::enter
189s              at /usr/share/cargo/registry/tokio-1.35.1/src/runtime/scheduler/current_thread/mod.rs:743:27
189s   19: tokio::runtime::scheduler::current_thread::CoreGuard::block_on
189s              at /usr/share/cargo/registry/tokio-1.35.1/src/runtime/scheduler/current_thread/mod.rs:652:19
189s   20: tokio::runtime::scheduler::current_thread::CurrentThread::block_on::{{closure}}
189s              at /usr/share/cargo/registry/tokio-1.35.1/src/runtime/scheduler/current_thread/mod.rs:175:28
189s   21: tokio::runtime::context::runtime::enter_runtime
189s              at /usr/share/cargo/registry/tokio-1.35.1/src/runtime/context/runtime.rs:65:16
189s   22: tokio::runtime::scheduler::current_thread::CurrentThread::block_on
189s              at /usr/share/cargo/registry/tokio-1.35.1/src/runtime/scheduler/current_thread/mod.rs:167:9
189s   23: tokio::runtime::runtime::Runtime::block_on
189s              at /usr/share/cargo/registry/tokio-1.35.1/src/runtime/runtime.rs:348:47
189s   24: tonic::codec::prost::tests::encode_too_big
189s              at ./src/codec/prost.rs:238:9
189s   25: tonic::codec::prost::tests::encode_too_big::{{closure}}
189s              at ./src/codec/prost.rs:210:30
189s   26: core::ops::function::FnOnce::call_once
189s              at /usr/src/rustc-1.75.0/library/core/src/ops/function.rs:250:5
189s   27: core::ops::function::FnOnce::call_once
189s              at /usr/src/rustc-1.75.0/library/core/src/ops/function.rs:250:5
189s note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.