OpenRailAssociation / osrd

An open source web application for railway infrastructure design, capacity analysis, timetabling and simulation
https://osrd.fr
465 stars 44 forks source link

gateway: panic on SIGINT #8420

Open emersion opened 3 months ago

emersion commented 3 months ago

What happened?

When bringing down the container, SIGINT is sent to gateway. It dies with a panic instead of gracefully handling the signal:

[gateway]      | thread '<unnamed>' panicked at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.1/src/runtime/time/entry.rs:568:9:
[gateway]      | A Tokio 1.x context was found, but it is being shutdown.
[gateway]      | note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

What did you expect to happen?

No response

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

  1. Start gateway
  2. Send SIGINT

On which environments the bug occurs?

No response

On which browser the bug occurs?

No response

OSRD version (top right corner Account button > Informations)

db3ce245158b055f93e30563c784195151c5e2de

flomonster commented 1 month ago

Fixed!

[2024-10-03T15:38:02Z INFO  actix_web::middleware::logger] 127.0.0.1 "GET / HTTP/1.1" 101 10984 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:130.0) Gecko/20100101 Firefox/130.0" 18.799406
[2024-10-03T15:38:02Z INFO  actix_server::worker] shutting down idle worker
[2024-10-03T15:38:02Z INFO  actix_server::worker] shutting down idle worker
[2024-10-03T15:38:02Z INFO  actix_server::worker] shutting down idle worker
[2024-10-03T15:38:02Z INFO  actix_server::worker] shutting down idle worker
emersion commented 1 month ago

Hm, interesting. I'm still getting the panic with a fresh build.

[gateway]      | thread '<unnamed>' panicked at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.38.1/src/runtime/time/entry.rs:568:9:
[gateway]      | A Tokio 1.x context was found, but it is being shutdown.
[gateway]      | note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace