Authenticating against 2.4 with 2.6-style users causes weird error message and stack dump

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Won't Fix
    • Priority: Major - P3
    • None
    • Affects Version/s: 2.4.8
    • Component/s: Security, Usability
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      To reproduce:

      • Bring up a node as 2.6
      • Add a user
      • Restart the node as 2.4.8
      • Try authenticating as the user

      The command will fail with the weird error message

      Error: 13111 { errmsg: "exception: field not found, expected type 2", code: 13111, ok: 0.0 }
      

      and the mongod will dump stack.

       m27000| Mon Dec 16 14:04:20.059 [conn1] Assertion: 13111:field not found, expected type 2
       m27000| 0x10044c60b 0x100425fbe 0x10042607d 0x100401320 0x1004013a9 0x1000f85d1 0x100147965 0x1001487a2 0x10014915c 0x1002408de 0x1002410df 0x1001ee10f 0x10000b682 0x100441fd9 0x10047f1a5 0x7fff8e75b899 0x7fff8e75b72a 0x7fff8e75ffc9
       m27000|  0   mongod-2.4.8                        0x000000010044c60b _ZN5mongo15printStackTraceERSo + 43
       m27000|  1   mongod-2.4.8                        0x0000000100425fbe _ZN5mongo11msgassertedEiPKc + 174
       m27000|  2   mongod-2.4.8                        0x000000010042607d _ZN5mongo11msgassertedEiRKSs + 29
       m27000|  3   mongod-2.4.8                        0x0000000100401320 _ZNK5mongo11BSONElement3chkEi + 800
       m27000|  4   mongod-2.4.8                        0x00000001004013a9 _ZNK5mongo11BSONElement6StringEv + 41
       m27000|  5   mongod-2.4.8                        0x00000001000f85d1 _ZN5mongo15CmdAuthenticate3runERKSsRNS_7BSONObjEiRSsRNS_14BSONObjBuilderEb + 1971
       m27000|  6   mongod-2.4.8                        0x0000000100147965 _ZN5mongo12_execCommandEPNS_7CommandERKSsRNS_7BSONObjEiRSsRNS_14BSONObjBuilderEb + 37
       m27000|  7   mongod-2.4.8                        0x00000001001487a2 _ZN5mongo7Command11execCommandEPS0_RNS_6ClientEiPKcRNS_7BSONObjERNS_14BSONObjBuilderEb + 2282
       m27000|  8   mongod-2.4.8                        0x000000010014915c _ZN5mongo12_runCommandsEPKcRNS_7BSONObjERNS_11_BufBuilderINS_16TrivialAllocatorEEERNS_14BSONObjBuilderEbi + 1036
       m27000|  9   mongod-2.4.8                        0x00000001002408de _ZN5mongo11runCommandsEPKcRNS_7BSONObjERNS_5CurOpERNS_11_BufBuilderINS_16TrivialAllocatorEEERNS_14BSONObjBuilderEbi + 46
       m27000|  10  mongod-2.4.8                        0x00000001002410df _ZN5mongo8runQueryERNS_7MessageERNS_12QueryMessageERNS_5CurOpES1_ + 1551
       m27000|  11  mongod-2.4.8                        0x00000001001ee10f _ZN5mongo16assembleResponseERNS_7MessageERNS_10DbResponseERKNS_11HostAndPortE + 1519
       m27000|  12  mongod-2.4.8                        0x000000010000b682 _ZN5mongo16MyMessageHandler7processERNS_7MessageEPNS_21AbstractMessagingPortEPNS_9LastErrorE + 198
       m27000|  13  mongod-2.4.8                        0x0000000100441fd9 _ZN5mongo17PortMessageServer17handleIncomingMsgEPv + 1657
       m27000|  14  mongod-2.4.8                        0x000000010047f1a5 thread_proxy + 229
       m27000|  15  libsystem_pthread.dylib             0x00007fff8e75b899 _pthread_body + 138
       m27000|  16  libsystem_pthread.dylib             0x00007fff8e75b72a _pthread_struct_init + 0
       m27000|  17  libsystem_pthread.dylib             0x00007fff8e75ffc9 thread_start + 13
      Error: 13111 { errmsg: "exception: field not found, expected type 2", code: 13111, ok: 0.0 }
      0
       m27000| Mon Dec 16 14:04:20.063 [signalProcessingThread] got signal 15 (Terminated: 15), will terminate after current cmd ends
       m27000| Mon Dec 16 14:04:20.063 [signalProcessingThread] now exiting
      

      Attached is a js file that will reproduce.

            Assignee:
            Unassigned
            Reporter:
            sam.helman@10gen.com
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: