[SERVER-19674] Fatal error calling createIndex with 2dsphere Created: 30/Jul/15 Updated: 17/Feb/21 Resolved: 14/Aug/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Geo |
| Affects Version/s: | 3.0.5 |
| Fix Version/s: | 3.1.7 |
| Type: | Bug | Priority: | Critical - P2 |
| Reporter: | Denis Taniguchi | Assignee: | Kevin Albertson |
| Resolution: | Done | Votes: | 1 |
| Labels: | todo_in_code | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||||||||||||||
| Steps To Reproduce: |
|
||||||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||||||
| Description |
|
On Windows servers, I get the following error when trying to create a 2dsphere index in my collection with one document having a specific location coordinate values.
|
| Comments |
| Comment by Githook User [ 17/Feb/21 ] |
|
Author: {'name': 'Bynn Lee', 'email': 'bynn.lee@mongodb.com', 'username': 'bynn'}Message: |
| Comment by Kevin Albertson [ 14/Aug/15 ] |
|
This error has been changed to a warning as a workaround. SERVER-19913 has been created to solve the more general problem of fatal assertions potentially being triggered in S2 from numerical error. |
| Comment by Githook User [ 14/Aug/15 ] |
|
Author: {u'username': u'kevinAlbs', u'name': u'Kevin Albertson', u'email': u'kevin.albertson@10gen.com'}Message: |
| Comment by Eric Milkie [ 07/Aug/15 ] |
|
I don't think we have mpfloat.h anywhere so enabling the flag probably won't work, unfortunately. |
| Comment by Kevin Albertson [ 06/Aug/15 ] |
|
This seems to stem from two issues. Points may be represented slightly differently in Windows when converted from lat/lon representation (https://github.com/mongodb/mongo/blob/master/src/third_party/s2/s2latlng.cc#L25-L28). However, the difference is very small. This alone is not the sole reason of the fassert failure. If you substitute the exact representation of the points from the Windows failure in OSX, the same fassert can be triggered. This can be reproduced with this unit test https://gist.github.com/kevinAlbs/ef86dc8805580c52ab64 Based on this comment https://github.com/mongodb/mongo/blob/master/src/third_party/s2/s2.cc#L171-L178, it seems that the default ExpensiveCCW has some degenerate cases where it will incorrectly return 0. S2 holds the assumption that ExpensiveCCW will return 0 iff two points are exactly equal, which is not true for a set of points in this case. This is what leads to the later fassert failure. I'm going to try enabling the S2_USE_EXACTFLOAT flag to see if the other version of ExpensiveCCW resolves this issue. |
| Comment by Humberto [ 30/Jul/15 ] |
|
Got the same error on Windows 7 Professional 64 bits. Something related to longitude -45.0000 that crashes (I guess) the mongod server while trying to create a 2dsphere index. |