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

Creating columnstore index crashes the server when the document has duplicated fields

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Query Execution
    • Fully Compatible
    • ALL
    • Hide

      Insert into a collection a document with duplicated fields like this:

      {_id: 0, bad: {c: {obj: 42}, c: [42]}}

      (note: I don't know how to do it from the mongo shell but it looks like mongocxx driver can do that, at least, this is what I'm observing when using Genny that uses mongocxx).

      coll.createIndex({"$**": "columnstore"}) -> triggers an invariant in ColumnShredder::appendToArrayInfo (and, therefore, crashes the server).

       

      invariant(oldIt < oldPosition.end());
      oldPosition = {_data = 0x5651220464b0 "{", _size = 1}
      newPosition = {_data = 0x7f44d33e5df0 "{[", _size = 2}
      std::mismatch returns newIt set to "[" and oldIt set to oldPosition.end()
      

       

      Show
      Insert into a collection a document with duplicated fields like this: {_id: 0, bad: {c: {obj: 42}, c: [42]}} (note: I don't know how to do it from the mongo shell but it looks like mongocxx driver can do that, at least, this is what I'm observing when using Genny that uses mongocxx). coll.createIndex({"$**": "columnstore"}) -> triggers an invariant in ColumnShredder::appendToArrayInfo (and, therefore, crashes the server).   invariant(oldIt < oldPosition.end()); oldPosition = {_data = 0x5651220464b0 "{" , _size = 1} newPosition = {_data = 0x7f44d33e5df0 "{[" , _size = 2} std::mismatch returns newIt set to "[" and oldIt set to oldPosition.end()  
    • QE 2022-12-12, QE 2022-12-26

       

       

            Assignee:
            dianna.hohensee@mongodb.com Dianna Hohensee (Inactive)
            Reporter:
            irina.yatsenko@mongodb.com Irina Yatsenko (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: