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

Forbid $text inside $nor

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 2.5.4
    • Fix Version/s: 2.5.5
    • Component/s: Text Search
    • Labels:
    • Operating System:
      ALL
    • Steps To Reproduce:
      Hide

      >use whatever
      >db.test.ensureIndex({words: "text"})
      >db.test.find({$nor: [
        { $text: { $search: "whatever" } },
        { num: 1 }
      ]})
      Error: error doing query: failed
      2013-12-18T11:20:25.784-0500 trying reconnect to 127.0.0.1:27017
      2013-12-18T11:20:25.784-0500 warning: Failed to connect to 127.0.0.1:27017, reason: errno:61 Connection refused
      2013-12-18T11:20:25.784-0500 reconnect 127.0.0.1:27017 failed couldn't connect to server 127.0.0.1:27017

      Show
      >use whatever >db.test.ensureIndex({words: "text" }) >db.test.find({$nor: [ { $text: { $search: "whatever" } }, { num: 1 } ]}) Error: error doing query: failed 2013-12-18T11:20:25.784-0500 trying reconnect to 127.0.0.1:27017 2013-12-18T11:20:25.784-0500 warning: Failed to connect to 127.0.0.1:27017, reason: errno:61 Connection refused 2013-12-18T11:20:25.784-0500 reconnect 127.0.0.1:27017 failed couldn't connect to server 127.0.0.1:27017

      Description

      $text needs to be forbidden inside $nor, since all $text queries in 2.6 must be resolvable from the text index.

      Original ticket description:

      Mongo crashes when you do a query with a $nor that contains $text, see repro box to see how it's done.

      Invalid access at address: 0x10 from thread: conn1
      Got signal: 11 (Segmentation fault: 11).
      Backtrace:
      0x100739b20 0x100007c56 0x100007fae 0x7fff9443e5aa 0x106897938 0x100463a86 0x10047a05f 0x1002fc9eb 0x10000fdd7 0x1006f5371 0x10076f611 0x7fff8973e899 0x7fff8973e72a 0x7fff89742fc9 
       0   mongod                              0x0000000100739b20 _ZN5mongo15printStackTraceERSo + 64
       1   mongod                              0x0000000100007c56 _ZN5mongo10abruptQuitEi + 422
       2   mongod                              0x0000000100007fae _ZN5mongo24abruptQuitWithAddrSignalEiP9__siginfoPv + 334
       3   libsystem_platform.dylib            0x00007fff9443e5aa _sigtramp + 26
       4   ???                                 0x0000000106897938 0x0 + 4404640056
       5   mongod                              0x0000000100463a86 _ZN5mongo9getRunnerEPNS_14CanonicalQueryEPPNS_6RunnerEm + 2710
       6   mongod                              0x000000010047a05f _ZN5mongo11newRunQueryERNS_7MessageERNS_12QueryMessageERNS_5CurOpES1_ + 1855
       7   mongod                              0x00000001002fc9eb _ZN5mongo16assembleResponseERNS_7MessageERNS_10DbResponseERKNS_11HostAndPortE + 1659
       8   mongod                              0x000000010000fdd7 _ZN5mongo16MyMessageHandler7processERNS_7MessageEPNS_21AbstractMessagingPortEPNS_9LastErrorE + 183
       9   mongod                              0x00000001006f5371 _ZN5mongo17PortMessageServer17handleIncomingMsgEPv + 913
       10  mongod                              0x000000010076f611 thread_proxy + 177
       11  libsystem_pthread.dylib             0x00007fff8973e899 _pthread_body + 138
       12  libsystem_pthread.dylib             0x00007fff8973e72a _pthread_struct_init + 0
       13  libsystem_pthread.dylib             0x00007fff89742fc9 thread_start + 13

        Attachments

          Activity

            People

            Assignee:
            rassi J Rassi
            Reporter:
            tyler@10gen.com Tyler Brock
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: