OpenRailAssociation / osrd

An open source web application for railway infrastructure design, capacity analysis, timetabling and simulation
https://osrd.fr
GNU Lesser General Public License v3.0
415 stars 40 forks source link

editoast: projection: assert `range_begin.is_none()` on stdcm v1 request #7813

Open eckter opened 2 weeks ago

eckter commented 2 weeks ago

What happened?

This assertion failed when trying to benchmark stdcm requests

Full stack trace:

``` thread 'actix-rt|system:0|arbiter:0' panicked at src/views/train_schedule/projection.rs:133:17: assertion failed: range_begin.is_none() stack backtrace: 0: rust_begin_unwind at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/panicking.rs:647:5 1: core::panicking::panic_fmt at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/core/src/panicking.rs:72:14 2: core::panicking::panic at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/core/src/panicking.rs:144:5 3: editoast::views::train_schedule::projection::Projection::intersect at ./src/views/train_schedule/projection.rs:133:17 4: editoast::views::train_schedule::simulation_report::project_head_positions at ./src/views/train_schedule/simulation_report.rs:359:25 5: editoast::views::train_schedule::simulation_report::project_simulation_results::{{closure}} at ./src/views/train_schedule/simulation_report.rs:203:26 6: editoast::views::train_schedule::simulation_report::create_simulation_report::{{closure}} at ./src/views/train_schedule/simulation_report.rs:121:6 7: editoast::views::stdcm::create_simulation_from_core_response::{{closure}} at ./src/views/stdcm/mod.rs:304:6 8: editoast::views::stdcm::compute_stdcm::{{closure}} at ./src/views/stdcm/mod.rs:152:90 9: ::register::create::{{closure}} at ./src/views/stdcm/mod.rs:140:74 10: actix_web::handler::handler_service::{{closure}}::{{closure}} at /home/eckter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/actix-web-4.5.1/src/handler.rs:113:22 11: as core::future::future::Future>::poll at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/core/src/future/future.rs:124:9 12: as actix_web::service::HttpServiceFactory>::register::{{closure}}::{{closure}} at /home/eckter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/actix-web-4.5.1/src/resource.rs:452:28 13: as core::future::future::Future>::poll at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/core/src/future/future.rs:124:9 14: as actix_web::service::HttpServiceFactory>::register::{{closure}}::{{closure}} at /home/eckter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/actix-web-4.5.1/src/scope.rs:430:28 15: as core::future::future::Future>::poll at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/core/src/future/future.rs:124:9 16: as actix_web::service::HttpServiceFactory>::register::{{closure}}::{{closure}} at /home/eckter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/actix-web-4.5.1/src/scope.rs:430:28 17: as core::future::future::Future>::poll at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/core/src/future/future.rs:124:9 18: as core::future::future::Future>::poll at /home/eckter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/opentelemetry-0.22.0/src/trace/context.rs:382:9 19: as core::future::future::Future>::poll at /home/eckter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-util-0.3.30/src/future/future/map.rs:55:37 20: as core::future::future::Future>::poll at /home/eckter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-util-0.3.30/src/lib.rs:91:13 21: as core::future::future::Future>::poll at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/core/src/future/future.rs:124:9 22: as actix_service::Service>::call::{{closure}} at /home/eckter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/actix-cors-0.7.0/src/middleware.rs:239:27 23: as core::future::future::Future>::poll at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/core/src/future/future.rs:124:9 24: as core::future::future::Future>::poll at /home/eckter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/actix-web-4.5.1/src/middleware/logger.rs:357:32 25: as core::future::future::Future>::poll at /home/eckter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/actix-service-2.0.2/src/map_err.rs:99:9 26: actix_http::h1::dispatcher::InnerDispatcher::poll_response at /home/eckter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/actix-http-3.6.0/src/h1/dispatcher.rs:466:27 27: as core::future::future::Future>::poll at /home/eckter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/actix-http-3.6.0/src/h1/dispatcher.rs:1125:43 28: as core::future::future::Future>::poll at /home/eckter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/actix-http-3.6.0/src/service.rs:966:45 29: as core::future::future::Future>::poll at /home/eckter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/actix-service-2.0.2/src/and_then.rs:114:37 30: as actix_service::Service<(actix_server::worker::WorkerCounterGuard,actix_server::socket::MioStream)>>::call::{{closure}} at /home/eckter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/actix-server-2.3.0/src/service.rs:75:31 31: tokio::runtime::task::core::Core::poll::{{closure}} at /home/eckter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/task/core.rs:328:17 32: tokio::loom::std::unsafe_cell::UnsafeCell::with_mut at /home/eckter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/loom/std/unsafe_cell.rs:16:9 33: tokio::runtime::task::core::Core::poll at /home/eckter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/task/core.rs:317:13 34: tokio::runtime::task::harness::poll_future::{{closure}} at /home/eckter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/task/harness.rs:485:19 35: as core::ops::function::FnOnce<()>>::call_once at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/core/src/panic/unwind_safe.rs:272:9 36: std::panicking::try::do_call at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/panicking.rs:554:40 37: __rust_try 38: std::panicking::try at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/panicking.rs:518:19 39: std::panic::catch_unwind at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/panic.rs:142:14 40: tokio::runtime::task::harness::poll_future at /home/eckter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/task/harness.rs:473:18 41: tokio::runtime::task::harness::Harness::poll_inner at /home/eckter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/task/harness.rs:208:27 42: tokio::runtime::task::harness::Harness::poll at /home/eckter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/task/harness.rs:153:15 43: tokio::runtime::task::raw::poll at /home/eckter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/task/raw.rs:271:5 44: tokio::runtime::task::raw::RawTask::poll at /home/eckter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/task/raw.rs:201:18 45: tokio::runtime::task::LocalNotified::run at /home/eckter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/task/mod.rs:427:9 46: tokio::task::local::LocalSet::tick::{{closure}} at /home/eckter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/task/local.rs:676:63 47: tokio::runtime::coop::with_budget at /home/eckter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/coop.rs:107:5 48: tokio::runtime::coop::budget at /home/eckter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/coop.rs:73:5 49: tokio::task::local::LocalSet::tick at /home/eckter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/task/local.rs:676:31 50: as core::future::future::Future>::poll::{{closure}} at /home/eckter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/task/local.rs:982:16 51: tokio::task::local::LocalSet::with::{{closure}} at /home/eckter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/task/local.rs:730:13 52: std::thread::local::LocalKey::try_with at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/thread/local.rs:286:16 53: std::thread::local::LocalKey::with at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/thread/local.rs:262:9 54: tokio::task::local::LocalSet::with at /home/eckter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/task/local.rs:728:9 55: as core::future::future::Future>::poll at /home/eckter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/task/local.rs:968:9 56: tokio::task::local::LocalSet::run_until::{{closure}} at /home/eckter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/task/local.rs:635:19 57: as core::future::future::Future>::poll at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/core/src/future/future.rs:124:9 58: tokio::runtime::scheduler::current_thread::CoreGuard::block_on::{{closure}}::{{closure}}::{{closure}} at /home/eckter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/scheduler/current_thread/mod.rs:659:57 59: tokio::runtime::coop::with_budget at /home/eckter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/coop.rs:107:5 60: tokio::runtime::coop::budget at /home/eckter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/coop.rs:73:5 61: tokio::runtime::scheduler::current_thread::CoreGuard::block_on::{{closure}}::{{closure}} at /home/eckter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/scheduler/current_thread/mod.rs:659:25 62: tokio::runtime::scheduler::current_thread::Context::enter at /home/eckter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/scheduler/current_thread/mod.rs:404:19 63: tokio::runtime::scheduler::current_thread::CoreGuard::block_on::{{closure}} at /home/eckter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/scheduler/current_thread/mod.rs:658:36 64: tokio::runtime::scheduler::current_thread::CoreGuard::enter::{{closure}} at /home/eckter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/scheduler/current_thread/mod.rs:737:68 65: tokio::runtime::context::scoped::Scoped::set at /home/eckter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/context/scoped.rs:40:9 66: tokio::runtime::context::set_scheduler::{{closure}} at /home/eckter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/context.rs:180:26 67: std::thread::local::LocalKey::try_with at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/thread/local.rs:286:16 68: std::thread::local::LocalKey::with at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/thread/local.rs:262:9 69: tokio::runtime::context::set_scheduler at /home/eckter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/context.rs:180:9 70: tokio::runtime::scheduler::current_thread::CoreGuard::enter at /home/eckter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/scheduler/current_thread/mod.rs:737:27 71: tokio::runtime::scheduler::current_thread::CoreGuard::block_on at /home/eckter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/scheduler/current_thread/mod.rs:646:19 72: tokio::runtime::scheduler::current_thread::CurrentThread::block_on::{{closure}} at /home/eckter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/scheduler/current_thread/mod.rs:175:28 73: tokio::runtime::context::runtime::enter_runtime at /home/eckter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/context/runtime.rs:65:16 74: tokio::runtime::scheduler::current_thread::CurrentThread::block_on at /home/eckter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/scheduler/current_thread/mod.rs:167:9 75: tokio::runtime::runtime::Runtime::block_on at /home/eckter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/runtime/runtime.rs:347:47 76: tokio::task::local::LocalSet::block_on at /home/eckter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.0/src/task/local.rs:592:9 77: actix_rt::runtime::Runtime::block_on at /home/eckter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/actix-rt-2.9.0/src/runtime.rs:138:9 78: actix_rt::arbiter::Arbiter::with_tokio_rt::{{closure}} at /home/eckter/.cargo/registry/src/index.crates.io-6f17d22bba15001f/actix-rt-2.9.0/src/arbiter.rs:143:21 ```

What did you expect to happen?

No response

How can we reproduce it (as minimally and precisely as possible)?

I have a specific request that reproduces is, but it has some data that isn't public (ask me)

What operating system, browser and environment are you using?

  • Env: Local

OSRD version (top right corner Account button > Informations)

468372cd3e1d92692c4e4fc854fea713ed952aef

eckter commented 2 weeks ago

Won't fix: this is actually legacy code that should be dropped soon-ish (tsv1). I just just update my benchmark scripts

I'll still leave this open while tsv1 still exists, just to avoid duplicates