Open 1Maxnet1 opened 6 months ago
Might be entirely unrelated but I also managed to produce an infinite loop (log output shows a continuous stream of operations between /lookup/geo_station
and /ppr/route
, ie. not a deadlock), on the Swiss national dataset when enabling car parking as one of the start modes. A single query between arbitrary coordinates is enough it seems, the only way to recover is killing the server then.
So hardening against that seems like a good idea indeed, although that might very well be easier said than done.
I guess those two problems are unrelated. The /lookup/geo_station <-> /ppr/route
loop seems more critical as this can make denial of service attacks very easy (and cannot be prevented with a simple rate limiting proxy).
The motis generate
problem is something I also hit, but it's easy to detect (query generation should take only a few seconds).
If someone feels like fixing it, those loops would require a breaking condition of maybe 10000 iterations until something like std::terminate
is called after printing some helpful message.
I would prioritize fixing the infinite loop that can occur in production way higher than the developer support tooling.
Thanks for the pointers, I'll see if I can break my loop with those.
Oops, I should not have mixed the issues. These loops are all in the motis generate
command. For the loop you describe, I would need to have a debugger somewhere in motis_call
to see who triggers those requests (and why):
When I execute the
motis generate
tool with a generate-config.ini as following:the tool gets stuck and doesn't finish, even if its only one query to generate. The GTFS dataset is newer and therefore does not provide trips for such an old date. Additionally the config.ini to run the server is also set to TODAY, instead of the outdated date.
Not a big deal (for me), as I figured out what the problem was, but for your information and in case someone else has a similar problem, this issue can be the reference on how to fix it. Additionally it would be nice to have a error message, explaining the issue, instead of just getting stuck.