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

fassert() in BSONObj::_validateUnownedSize

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.9.0-rc1
    • Affects Version/s: 4.9.0-alpha4
    • Component/s: None
    • Labels:
      None
    • Fully Compatible
    • OS X
    • Security 2021-02-22, Security 2021-03-08, Security 2021-03-22, Security 2021-04-05, Security 2021-04-19, Security 2021-05-03

      "msg":"BSONObj::_validateUnownedSize() - size {size} of unowned BSONObj is invalid and differs from previously validated size.","attr":{"size":0} 

      We hit this assertion during testing of mongosh. This only happens on macOS, with the latest server alpha (4.9.0-alpha4-271-g7d5cf02, downloaded through http://downloads.10gen.com/osx/mongodb-macos-x86_64-enterprise-latest.tgz).

      The full mongod log file is attached. Steps to reproduce are fairly straightforward:

      • Install Node.js 14
      • Spin up a mongod using the version mentioned above, e.g. mkdir -p db && ./mongodb-darwin-none-x64-latest-alpha/bin/mongod --dbpath db
      • Put the following script in a folder and run npm install mongodb@4.0.0-beta.1, then run it repeatedly using node scriptname.js:
      const { MongoClient } = require('mongodb');
      
      (async() => {
        const c = await MongoClient.connect(
              'mongodb://localhost/',
              {
                auth: { username: 'anna', password: 'pwd' },
                authSource: 'test',
                connectTimeoutMS: 1000
              }
            );
        await c.close();
      })()
      

      This usually crashes the server during the first 3 attempts.

      Let me know if there's more data that we can gather for you. This is not particularly urgent for us.

            Assignee:
            ben.caimano@mongodb.com Benjamin Caimano (Inactive)
            Reporter:
            anna.henningsen@mongodb.com Anna Henningsen
            Votes:
            0 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved: