Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-11433

group() fails with undefined assertion when namespace does not exist

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.5.4
    • Affects Version/s: 2.5.3
    • Component/s: None
    • Labels:
      None
    • ALL

      In the latest nightly group() only seems to work if the namespace exists:

      > use test
      switched to db test
      > db.test.insert({})
      > db.runCommand({group: {$reduce: func, ns: 'test', cond: {}, key: {}, initial: {count: 0}}})
      {
      	"retval" : [
      		{
      			"count" : 1
      		}
      	],
      	"count" : 1,
      	"keys" : 1,
      	"ok" : 1
      }
      > db.test.drop()
      true
      > db.runCommand({group: {$reduce: func, ns: 'test', cond: {}, key: {}, initial: {count: 0}}})
      {
      	"errmsg" : "exception: assertion src/mongo/db/query/new_find.cpp:186",
      	"code" : 0,
      	"ok" : 0
      }
      > db.version()
      2.5.4-pre-
      

      From the mongod log:

      2013-10-28T16:31:23.817-0700 [initandlisten] MongoDB starting : pid=14212 port=27017 dbpath=/Users/behackett/data/db 64-bit host=airtop.local
      2013-10-28T16:31:23.818-0700 [initandlisten] 
      2013-10-28T16:31:23.818-0700 [initandlisten] ** NOTE: This is a development version (2.5.4-pre-) of MongoDB.
      2013-10-28T16:31:23.818-0700 [initandlisten] **       Not recommended for production.
      2013-10-28T16:31:23.818-0700 [initandlisten] 
      2013-10-28T16:31:23.818-0700 [initandlisten] ** WARNING: soft rlimits too low. Number of files is 256, should be at least 1000
      2013-10-28T16:31:23.818-0700 [initandlisten] 
      2013-10-28T16:31:23.818-0700 [initandlisten] db version v2.5.4-pre-
      2013-10-28T16:31:23.818-0700 [initandlisten] git version: 7844d0500166db2ebb49d866bdd2d2f2af8c3b09
      2013-10-28T16:31:23.818-0700 [initandlisten] OpenSSL version: OpenSSL 0.9.8y 5 Feb 2013
      2013-10-28T16:31:23.818-0700 [initandlisten] build info: Darwin airtop.local 12.5.0 Darwin Kernel Version 12.5.0: Sun Sep 29 13:33:47 PDT 2013; root:xnu-2050.48.12~1/RELEASE_X86_64 x86_64 BOOST_LIB_VERSION=1_49
      ...
      ...
      2013-10-28T16:54:12.249-0700 [conn1] test.test Assertion failure collection src/mongo/db/query/new_find.cpp 186
      2013-10-28T16:54:12.255-0700 [conn1] test.test 0x100718e50 0x1006c6abb 0x1006b4a93 0x100454348 0x100183bc6 0x100182d54 0x100200005 0x100200f7b 0x100201bcb 0x10038ad6d 0x100392901 0x1002fa4bb 0x100010307 0x1006d4b41 0x100750c91 0x7fff8d767772 0x7fff8d7541a1 
       0   mongod                              0x0000000100718e50 _ZN5mongo15printStackTraceERSo + 64
       1   mongod                              0x00000001006c6abb _ZN5mongo10logContextEPKc + 155
       2   mongod                              0x00000001006b4a93 _ZN5mongo12verifyFailedEPKcS1_j + 435
       3   mongod                              0x0000000100454348 _ZN5mongo9getRunnerEPNS_14CanonicalQueryEPPNS_6RunnerE + 1928
       4   mongod                              0x0000000100183bc6 _ZN5mongo12GroupCommand5groupERKSsS2_RKNS_7BSONObjES3_S2_S2_PKcS3_S2_RSsRNS_14BSONObjBuilderE + 1190
       5   mongod                              0x0000000100182d54 _ZN5mongo12GroupCommand3runERKSsRNS_7BSONObjEiRSsRNS_14BSONObjBuilderEb + 2260
       6   mongod                              0x0000000100200005 _ZN5mongo12_execCommandEPNS_7CommandERKSsRNS_7BSONObjEiRSsRNS_14BSONObjBuilderEb + 37
       7   mongod                              0x0000000100200f7b _ZN5mongo7Command11execCommandEPS0_RNS_6ClientEiPKcRNS_7BSONObjERNS_14BSONObjBuilderEb + 2715
       8   mongod                              0x0000000100201bcb _ZN5mongo12_runCommandsEPKcRNS_7BSONObjERNS_11_BufBuilderINS_16TrivialAllocatorEEERNS_14BSONObjBuilderEbi + 875
       9   mongod                              0x000000010038ad6d _ZN5mongo11runCommandsEPKcRNS_7BSONObjERNS_5CurOpERNS_11_BufBuilderINS_16TrivialAllocatorEEERNS_14BSONObjBuilderEbi + 45
       10  mongod                              0x0000000100392901 _ZN5mongo8runQueryERNS_7MessageERNS_12QueryMessageERNS_5CurOpES1_ + 1569
       11  mongod                              0x00000001002fa4bb _ZN5mongo16assembleResponseERNS_7MessageERNS_10DbResponseERKNS_11HostAndPortE + 1659
       12  mongod                              0x0000000100010307 _ZN5mongo16MyMessageHandler7processERNS_7MessageEPNS_21AbstractMessagingPortEPNS_9LastErrorE + 183
       13  mongod                              0x00000001006d4b41 _ZN5mongo17PortMessageServer17handleIncomingMsgEPv + 913
       14  mongod                              0x0000000100750c91 thread_proxy + 177
       15  libsystem_c.dylib                   0x00007fff8d767772 _pthread_start + 327
       16  libsystem_c.dylib                   0x00007fff8d7541a1 thread_start + 13
      

            Assignee:
            eliot Eliot Horowitz (Inactive)
            Reporter:
            bernie@mongodb.com Bernie Hackett
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: