[SERVER-17886] dbKillCursors op asserts on mongos when at log level 3 Created: 03/Apr/15  Updated: 05/Feb/16  Resolved: 25/Aug/15

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 2.4.11, 2.6.8, 3.0.1
Fix Version/s: 2.6.12, 3.0.7, 3.1.8

Type: Bug Priority: Major - P3
Reporter: James Wahlin Assignee: J Rassi
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-20101 mongos cursors cannot be killed if se... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Completed:
Steps To Reproduce:
  1. Start a 2.6.8 sharded cluster
  2. Raise the mongos log level to 3
  3. Execute the following Python script against mongos

    from pymongo import MongoClient
     
     
    client = MongoClient("localhost:27017" )
    db = client.test
     
    for x in range(0, 20):
        db.test.save({'x': x})
     
    cursor = db.test.find({'x': {'$gte': 1}}).batch_size(5)
     
    for item in cursor:
        break
     
    cursor.close()
    

Sprint: Quint Iteration 7, QuInt 8 08/28/15
Participants:

 Description   

With mongos running at log level 3, a dbKillCursors request will assert due to a missing namespace.

The log statement calling getNs() (which then asserts) is here:
https://github.com/mongodb/mongo/blob/r2.6.8/src/mongo/s/request.cpp#L93

The assertion is generated by a "verify" statement here:
https://github.com/mongodb/mongo/blob/r2.6.8/src/mongo/db/dbmessage.cpp#L82



 Comments   
Comment by Githook User [ 26/Aug/15 ]

Author:

{u'username': u'jrassi', u'name': u'Jason Rassi', u'email': u'rassi@10gen.com'}

Message: SERVER-17886 Don't call Request::getns() if message doesn't include ns

(cherry picked from commit 32eb4dbe6fb78f7697f72b1406f1d8efaaedd378)
Branch: v2.6
https://github.com/mongodb/mongo/commit/2abbaa67383f64d8b5e6cd747c5b0abf5f370335

Comment by Githook User [ 26/Aug/15 ]

Author:

{u'username': u'jrassi', u'name': u'Jason Rassi', u'email': u'rassi@10gen.com'}

Message: SERVER-17886 Don't call Request::getns() if message doesn't include ns

(cherry picked from commit 8a3599471a6910c3005c3c7f011176a37bd19f62)
Branch: v3.0
https://github.com/mongodb/mongo/commit/32eb4dbe6fb78f7697f72b1406f1d8efaaedd378

Comment by Githook User [ 25/Aug/15 ]

Author:

{u'username': u'jrassi', u'name': u'Jason Rassi', u'email': u'rassi@10gen.com'}

Message: SERVER-17886 Don't call Request::getns() if message doesn't include ns
Branch: master
https://github.com/mongodb/mongo/commit/8a3599471a6910c3005c3c7f011176a37bd19f62

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