drolbr / Overpass-API

A database engine to query the OpenStreetMap data.
http://overpass-api.de
GNU Affero General Public License v3.0
692 stars 90 forks source link

Infinite loop in is_in #670

Closed mmd-osm closed 2 years ago

mmd-osm commented 2 years ago

Based on this report https://forum.openstreetmap.org/viewtopic.php?id=75791, I've found out that the following query results in an infinite loop inside "is_in" (Coord_Query_Statement)

node(1192389996);
is_in;

In gdb, you can see that it's stuck somewhere in here:

    while (cur_it != input_set->nodes.end() || attic_it != input_set->attic_nodes.end())
    {
      Uint32_Index idx =
          (attic_it == input_set->attic_nodes.end() ||
              (cur_it != input_set->nodes.end() && !(attic_it->first < cur_it->first))) ? cur_it->first : attic_it->first;
      while (!tai.is_end() && tai.get_idx().val() < idx.val())
        tai.next();
      if (tai.is_end())
        continue;
drolbr commented 2 years ago

Fixed in b33c3320ea54db7aba1576d37dc4fee181237d58

mishari commented 1 year ago

Did this bug get reintroduced? The query doesn't seem to work anymore.

mmd-osm commented 1 year ago

Areas are currently re-created on one server (z.overpass-api.de) as part of #672, i.e. areas are currently unavailable. Maybe try again in a few hours.