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

Assertion failure la <= 0xffffff db/btree.h when creating BtreeCursor with direction -1 and max/min bounds

    • ALL

      Doing something like this:

      var coll = db.getCollection( "foo.bar" )
      coll.drop()

      coll.insert(

      { blah : 30 }

      )

      coll.ensureIndex(

      { blah : 1 }

      )
      printjson( coll.find({}).sort(

      { blah : -1 }

      ).min(

      { blah : 1 }

      ).max(

      { blah : 30 }

      ).toArray() )

      ... triggers an Assertion. Stack trace:

      Tue Sep 6 14:16:33 [conn4] test.foo.bar Assertion failure la <= 0xffffff db/btree.h 241
      0x5497a1 0x55434f 0x678f2b 0x689399 0x68987c 0x689ac7 0x713a74 0x70f6e7 0x712a1f 0x7798b2 0x7d1e4c 0x7758ef 0x775b23 0x775faf 0x77c861 0x77eb93 0x77fc93 0x780cb0 0x7cc55a 0x745d42
      /home/greg/Workspaces/Mongo Workspace/mongo/mongod(mongo::sayDbContext(char const*)+0xc1) [0x5497a1]
      /home/greg/Workspaces/Mongo Workspace/mongo/mongod(mongo::asserted(char const*, char const*, unsigned int)+0xbf) [0x55434f]
      /home/greg/Workspaces/Mongo Workspace/mongo/mongod(mongo::DiskLoc56Bit::operator=(mongo::DiskLoc const&)+0x5b) [0x678f2b]
      /home/greg/Workspaces/Mongo Workspace/mongo/mongod(mongo::BtreeBucket<mongo::BtreeData_V1>::find(mongo::IndexDetails const&, mongo::KeyV1 const&, mongo::DiskLoc const&, mongo::Ordering const&, int&, bool) const+0x49) [0x689399]
      /home/greg/Workspaces/Mongo Workspace/mongo/mongod(mongo::BtreeBucket<mongo::BtreeData_V1>::locate(mongo::IndexDetails const&, mongo::DiskLoc const&, mongo::KeyV1 const&, mongo::Ordering const&, int&, bool&, mongo::DiskLoc const&, int) const+0x5c) [0x68987c]
      /home/greg/Workspaces/Mongo Workspace/mongo/mongod(mongo::BtreeBucket<mongo::BtreeData_V1>::locate(mongo::IndexDetails const&, mongo::DiskLoc const&, mongo::BSONObj const&, mongo::Ordering const&, int&, bool&, mongo::DiskLoc const&, int) const+0xb7) [0x689ac7]
      /home/greg/Workspaces/Mongo Workspace/mongo/mongod(mongo::BtreeCursorImpl<mongo::BtreeData_V1>::_locate(mongo::BSONObj const&, mongo::DiskLoc const&)+0x84) [0x713a74]
      /home/greg/Workspaces/Mongo Workspace/mongo/mongod(mongo::BtreeCursor::init()+0x157) [0x70f6e7]
      /home/greg/Workspaces/Mongo Workspace/mongo/mongod(mongo::BtreeCursor::make(mongo::NamespaceDetails*, int, mongo::IndexDetails const&, mongo::BSONObj const&, mongo::BSONObj const&, bool, int)+0x26f) [0x712a1f]
      /home/greg/Workspaces/Mongo Workspace/mongo/mongod(mongo::QueryPlan::newCursor(mongo::DiskLoc const&, int) const+0xd2) [0x7798b2]
      /home/greg/Workspaces/Mongo Workspace/mongo/mongod(mongo::UserQueryOp::_init()+0x12c) [0x7d1e4c]
      /home/greg/Workspaces/Mongo Workspace/mongo/mongod(mongo::QueryOp::init()+0x11f) [0x7758ef]
      /home/greg/Workspaces/Mongo Workspace/mongo/mongod(mongo::QueryPlanSet::Runner::initOp(mongo::QueryOp&)+0x23) [0x775b23]
      /home/greg/Workspaces/Mongo Workspace/mongo/mongod(mongo::QueryPlanSet::Runner::init()+0x2ff) [0x775faf]
      /home/greg/Workspaces/Mongo Workspace/mongo/mongod(mongo::QueryPlanSet::Runner::runUntilFirstCompletes()+0x21) [0x77c861]
      /home/greg/Workspaces/Mongo Workspace/mongo/mongod(mongo::QueryPlanSet::runOp(mongo::QueryOp&)+0x123) [0x77eb93]
      /home/greg/Workspaces/Mongo Workspace/mongo/mongod(mongo::MultiPlanScanner::runOpOnce(mongo::QueryOp&)+0x63) [0x77fc93]
      /home/greg/Workspaces/Mongo Workspace/mongo/mongod(mongo::MultiPlanScanner::runOp(mongo::QueryOp&)+0x20) [0x780cb0]
      /home/greg/Workspaces/Mongo Workspace/mongo/mongod(mongo::runQuery(mongo::Message&, mongo::QueryMessage&, mongo::CurOp&, mongo::Message&)+0xbea) [0x7cc55a]
      /home/greg/Workspaces/Mongo Workspace/mongo/mongod(mongo::assembleResponse(mongo::Message&, mongo::DbResponse&, mongo::HostAndPort const&)+0xa82) [0x745d42]

      Pretty sure the issue is first lines of BtreeBucket<V>::find(), assigning rl to recordLoc. rl in this case is maxDiskLoc = DiskLoc(0x7fffffff, 0x7fffffff). Not sure of the correct behavior here, special case this?

        1. server3766.js
          0.5 kB
          Benety Goh

            Assignee:
            Unassigned Unassigned
            Reporter:
            greg_10gen Greg Studer
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: