[SERVER-2748] Uncaught internal exception (assertion db/geo/2d.cpp:236) on geo query Created: 11/Mar/11  Updated: 30/Mar/12  Resolved: 31/Mar/11

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 1.8.0-rc0
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Andreas Kalsch Assignee: Greg Studer
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File geo11.js    
Operating System: Linux
Participants:

 Description   

2 examples:

> db.nrwi.find(

{c:[288115985.5,0]}

)
error:

{ "$err" : "assertion db/geo/2d.cpp:236" }

> db.nrwi.find({c:{$within:{$box:[[288115985.5,0],[288115986.5,1]]}}}).explain()
Sat Mar 12 00:04:32 uncaught exception: error:

{ "$err" : "assertion db/geo/2d.cpp:236" }

The dataset's size is several GBs, and this is how the data looks like:

{ "_id" : ObjectId("4d7a97c0ed7cd785fe37804d"), "p" : "n", "id" : 20973869, "c" : [ 288174269, 1024.00003 ], "r" : 890 } { "_id" : ObjectId("4d7a97c0ed7cd785fe37804e"), "p" : "n", "id" : 20973895, "c" : [ 288174614, 1024.00003 ], "r" : 41 }

This is the index:

db.nrwi.ensureIndex(

{ c: '2d', r: 1 }

,

{ min: 0, max: Math.pow(2, 30) }

)

To use this large 2d min/max work as explained in this post: http://groups.google.com/group/mongodb-user/browse_thread/thread/ef9047d0c94c0667



 Comments   
Comment by Greg Studer [ 14/Mar/11 ]

Doesn't seem to fail for the rc0 either, probably unrelated to rc version in any case, as not much geo code has changed.

Comment by Greg Studer [ 14/Mar/11 ]

Hmm... can't seem to reproduce this one with the latest 1.8.0 rc, do you get the error using the simple attached test case on a later rc? This may be related to SERVER-2388, but you don't seem to be near min values here.

Also, what platform/OS are you running on... maybe that's the difference?

Comment by Andreas Kalsch [ 12/Mar/11 ]

To gat a valid box, I need a range of 16 (=2^4) for both d_x and d_y.
This means that - with d(min..max) = 2^30 - the resolution of the index is only 2^30/2^4 = 2^26

Comment by Andreas Kalsch [ 12/Mar/11 ]

Additional unexpected error:

> db.bri.find({c:{$within:{$box:[[288115984,1],[288115986,1000]]}}}).explain()
Sat Mar 12 19:50:08 uncaught exception: error:

{ "$err" : "need an area > 0 ", "code" : 13064 }
Generated at Thu Feb 08 03:01:05 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.