Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-994

Geospatial Bounding box query giving point not in range error

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.5.2
    • Affects Version/s: 1.4.0, 1.5.0
    • Component/s: None
    • None
    • Environment:
      linux x86-64

      I ran across the case where the bounding box query would sometimes give me a "point not in range" error with no discernible reason that I can find. You can recreate the issue with the following:

      db.foo.insert({ point :

      { x : -15000000, y : 10000000 }

      })
      db.foo.ensureIndex(

      { point : "2d" }

      ,

      { min : -21000000 , max : 21000000 }

      )
      db.foo.find({point: {"$within":

      {"$box": [[-20000000, 7000000], [0, 15000000]]}

      } })

      The console shows:
      error:

      { "$err" : "point not in range" }

      The mongod log shows:
      Sun Apr 11 00:50:35 User Exception 13027:point not in range
      Sun Apr 11 00:50:35 Assertion: 10362:point not in range
      0x505bb4 0x56219c 0x5fa2da 0x5feb2f 0x6a9a72 0x6bbde0 0x7f372ecb03ba 0x7f372e272fcd
      bin/mongod(_ZN5mongo11msgassertedEiPKc+0x204) [0x505bb4]
      bin/mongod(_ZN5mongo8runQueryERNS_7MessageERNS_12QueryMessageERNS_5CurOpE+0x182c) [0x56219c]
      bin/mongod [0x5fa2da]
      bin/mongod(_ZN5mongo16assembleResponseERNS_7MessageERNS_10DbResponseERK11sockaddr_in+0x118f) [0x5feb2f]
      bin/mongod(_ZN5mongo10connThreadEv+0x242) [0x6a9a72]
      bin/mongod(thread_proxy+0x80) [0x6bbde0]
      /lib/libpthread.so.0 [0x7f372ecb03ba]
      /lib/libc.so.6(clone+0x6d) [0x7f372e272fcd]
      Sun Apr 11 00:50:35 Caught Assertion in runQuery ns:test.foo massert:point not in range
      Sun Apr 11 00:50:35 ntoskip:0 ntoreturn:0
      Sun Apr 11 00:50:35 query:{ point: { $within: { $box: { 0:

      { 0: -20000000.0, 1: 7000000.0 }

      , 1:

      { 0: 0.0, 1: 15000000.0 }

      } } } }
      Sun Apr 11 00:50:35 query test.foo ntoreturn:0 exception 1ms

      However running the query with a different bounding box like so:
      db.foo.find({point: {"$within":

      {"$box": [[-20000000, 0], [0, 15000000]]}

      } })
      WIll find the point as expected.

      I've run into quite a few of these that act the same way with various bounding boxes and data, any help will be greatly appreciated!

            Assignee:
            richard.kreuter Richard Kreuter (Inactive)
            Reporter:
            ereptor Gavin R.
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: