Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

timeouts on train schedules summaries #10704

Open
Castavo opened this issue Feb 6, 2025 · 1 comment
Open

timeouts on train schedules summaries #10704

Castavo opened this issue Feb 6, 2025 · 1 comment
Labels
area:editoast Work on Editoast Service area:osrdyne kind:bug Something isn't working severity:minor Minor severity bug

Comments

@Castavo
Copy link
Contributor

Castavo commented Feb 6, 2025

What happened?

When launching the following code twice, the second call to /train_schedule/simulation_summary hangs indefinitely...

import json

import requests

EDITOAST_URL = "http://localhost:8090"
RAILJSON_PATH = "../osrd/tests/data/infras/small_infra/infra.json"
TRAIN_SCHEDULES_PATH = "1000_trains.json"

with open(RAILJSON_PATH) as f:
    small_infra = json.load(f)

# Load small infra
r = requests.post(f"{EDITOAST_URL}/infra/railjson?name=small_infra", json=small_infra)
r.raise_for_status()
infra_id = r.json()["infra"]

# Get a timetable with 1000 trains
with open(TRAIN_SCHEDULES_PATH) as f:
    timetable = json.load(f)

r = requests.post(f"{EDITOAST_URL}/timetable")
r.raise_for_status()
timetable_id = r.json()["timetable_id"]

r = requests.post(
    f"{EDITOAST_URL}/timetable/{timetable_id}/train_schedule", json=timetable
)
r.raise_for_status()
train_schedule_ids = [train_schedule["id"] for train_schedule in r.json()]
print(f"Got {len(train_schedule_ids)} train schedules")


# Call simulation summary
print(f"Calling for infra {infra_id}")
r = requests.post(f"{EDITOAST_URL}/infra/{infra_id}/load")
r.raise_for_status()

r = requests.post(
    f"{EDITOAST_URL}/train_schedule/simulation_summary",
    json={"infra_id": infra_id, "ids": train_schedule_ids},
)
r.raise_for_status()

Then the rabbitmq web interface shows that messages are stuck in queue

Image

When checking, there are indeed messages stuck in the core-orphan queue.
Also, a core instance with the right infra id is present and healthy when calling docker ps

What did you expect to happen?

I expected the call to not freeze

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

  1. Get this python script (should be the same code as above)
  2. Download the train schedules 1000_trains.json
  3. Maybe update the paths in the file to suit yourself
  4. docker compose up -d
  5. Launch the script twice
  6. Witness

On which environments the bug occurs?

Recette (SNCF), Local

On which browser the bug occurs?

Firefox

OSRD version (top right corner Account button > Informations)

13d0dd3

@Castavo Castavo added area:editoast Work on Editoast Service area:osrdyne kind:bug Something isn't working severity:minor Minor severity bug labels Feb 6, 2025
@flomonster
Copy link
Contributor

flomonster commented Feb 19, 2025

Since #10594 has been merged can we reproduce this bug?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:editoast Work on Editoast Service area:osrdyne kind:bug Something isn't working severity:minor Minor severity bug
Projects
None yet
Development

No branches or pull requests

2 participants