[SERVER-54508] fassert() in BSONObj::_validateUnownedSize Created: 12/Feb/21  Updated: 29/Oct/23  Resolved: 30/Apr/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 4.9.0-alpha4
Fix Version/s: 4.9.0-rc1

Type: Bug Priority: Major - P3
Reporter: Anna Henningsen Assignee: Benjamin Caimano (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File mongod.log    
Issue Links:
Related
is related to MONGOSH-592 Investigate CI failures with latest s... Closed
Backwards Compatibility: Fully Compatible
Operating System: OS X
Sprint: Security 2021-02-22, Security 2021-03-08, Security 2021-03-22, Security 2021-04-05, Security 2021-04-19, Security 2021-05-03
Participants:

 Description   

"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.



 Comments   
Comment by Githook User [ 25/Feb/21 ]

Author:

{'name': 'Ben Caimano', 'email': 'ben.caimano@10gen.com'}

Message: SERVER-54508 Speculative saslStart discards "options" subelement
Branch: master
https://github.com/mongodb/mongo/commit/583a1ee38db44d359df465f387b9371f9ad1001b

Generated at Thu Feb 08 05:33:44 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.