[SERVER-13258] Crash on geowithin query Created: 18/Mar/14  Updated: 11/Jul/16  Resolved: 19/Mar/14

Status: Closed
Project: Core Server
Component/s: Geo
Affects Version/s: 2.6.0-rc1
Fix Version/s: 2.6.0-rc2

Type: Bug Priority: Major - P3
Reporter: Mike W1 Assignee: Greg Studer
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Operating System: ALL
Steps To Reproduce:

feedbacks.find({ loc: { '$geoWithin': { '$geometry': { coordinates: [ [ [ 50.243472, -3.8665 ], [ 50.243472, -3.8665 ], [ 50.243472, -3.8665 ], [ 50.243472, -3.8665 ], [ 50.243472, -3.8665 ] ] ], type: 'Polygon' } } }, display: true }) { fields: { ts: 1, photo: 1, heading: 1, comments: 1, words: 1, rating: 1, loc: 1 }, safe: undefined, sort: [ [ 'ts', -1 ] ], limit: 100, skip: 0 }

Participants:

 Description   

I'm using Mongo from Node.js using the Mongoose driver. Latest version of Mongo (RC1). When running a certain GeoWithin query the server crashes.
Error produced in the log is:

[conn14] SEVERE: src/third_party/s2/s2loop.h:116:  Check failed: (i) < ((2 * num_vertices_))



 Comments   
Comment by Githook User [ 19/Mar/14 ]

Author:

{u'username': u'gregstuder', u'name': u'Greg Studer', u'email': u'greg@10gen.com'}

Message: SERVER-13258 ensure S2 poly loops have 3 points after dedup'ing
(cherry picked from commit 16be7b9840df1df12421ed7ef009005c7d321ec7)
Branch: v2.6
https://github.com/mongodb/mongo/commit/05aa222eb586991d10858dbad66365cfffe5201a

Comment by Githook User [ 19/Mar/14 ]

Author:

{u'username': u'gregstuder', u'name': u'Greg Studer', u'email': u'greg@10gen.com'}

Message: SERVER-13258 ensure S2 poly loops have 3 points after dedup'ing
Branch: master
https://github.com/mongodb/mongo/commit/16be7b9840df1df12421ed7ef009005c7d321ec7

Comment by Greg Studer [ 18/Mar/14 ]

Thanks for the submission. Issue is the polygon validation happens before point deduplication, so a second check is needed when actually constructing S2 polys.

Generated at Thu Feb 08 03:31:09 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.