[SERVER-3428] Geospatial index updates on replica servers on Ubuntu can crash the server Created: 13/Jul/11  Updated: 12/Jul/16  Resolved: 14/Jul/11

Status: Closed
Project: Core Server
Component/s: Geo, Replication
Affects Version/s: 1.8.2, 1.9.0
Fix Version/s: 1.8.3, 1.9.1

Type: Bug Priority: Major - P3
Reporter: Kevin Francis Assignee: Greg Studer
Resolution: Done Votes: 0
Labels: crash, replication
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Ubuntu 11.04, EC2 micro instance


Operating System: Linux
Participants:

 Description   

Given a newly set up server, configured to run in a replica set, the following steps in the mongo console will hang the server if running on Ubuntu:

rs.initiate()
<wait for the replica set>
use bug
db.map.ensureIndex(

{loc:"2d"}

)
db.map.update({loc:{$near:[1.0,2.0],$maxDistance:3.0}, people:{$exists:true}}, {$set:

{loc:[1.0,2.0]}

, $push:{people:"chris"}}, true)

At this point, the mongo database will become non-responsive and consume all available CPU. This appears to be an issue with the $set for the location being performed as an upsert from a distance query. Running on Windows or without a replica set does not appear to cause the problem.



 Comments   
Comment by Kevin Francis [ 14/Jul/11 ]

Wow, thanks for the quick turn around time! You guys rock.

Comment by Greg Studer [ 14/Jul/11 ]

Feel free to reopen if you continue to see the problem using the new builds.

Comment by Greg Studer [ 14/Jul/11 ]

Thanks for reporting, issue with querying an empty cursor. Added test and backported, so should appear in 1.8.3, 1.9.1.

Comment by auto [ 14/Jul/11 ]

Author:

{u'login': u'gregstuder', u'name': u'gregs', u'email': u'greg@10gen.com'}

Message: recheck ok() - fix for the fix SERVER-3428
Branch: master
https://github.com/mongodb/mongo/commit/f873cfb0b4b59265135caef883c720024d850137

Comment by auto [ 14/Jul/11 ]

Author:

{u'login': u'gregstuder', u'name': u'gregs', u'email': u'greg@10gen.com'}

Message: recheck ok() - fix for the fix SERVER-3428
Branch: v1.8
https://github.com/mongodb/mongo/commit/a85dd523b71ef5f364b527e6679476e942b7bd4c

Comment by auto [ 14/Jul/11 ]

Author:

{u'login': u'gregstuder', u'name': u'gregs', u'email': u'greg@10gen.com'}

Message: test case for SERVER-3428
Branch: v1.8
https://github.com/mongodb/mongo/commit/9134b167029adbe8682190854b88755929b14914

Comment by auto [ 14/Jul/11 ]

Author:

{u'login': u'gregstuder', u'name': u'gregs', u'email': u'greg@10gen.com'}

Message: don't advance iterator if empty/at end for geo cursor SERVER-3428
Branch: v1.8
https://github.com/mongodb/mongo/commit/e6299cf1d1dd63ebda4fd4cd2a7e52de21c8a90a

Comment by auto [ 14/Jul/11 ]

Author:

{u'login': u'gregstuder', u'name': u'gregs', u'email': u'greg@10gen.com'}

Message: test case for SERVER-3428
Branch: master
https://github.com/mongodb/mongo/commit/253f05dfb5692318103e84a364bfd07a22158d14

Comment by auto [ 14/Jul/11 ]

Author:

{u'login': u'gregstuder', u'name': u'gregs', u'email': u'greg@10gen.com'}

Message: don't advance iterator if empty/at end for geo cursor SERVER-3428
Branch: master
https://github.com/mongodb/mongo/commit/146ef71a1754a44ba6c3763ddeda0d69398fe458

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