[SERVER-11523] Roles with many duplicate linked roles assert, without nice error message Created: 01/Nov/13  Updated: 10/Dec/14  Resolved: 04/Nov/13

Status: Closed
Project: Core Server
Component/s: Security
Affects Version/s: 2.5.4
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Samantha Ritter (Inactive) Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: 26qa
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File dup_role_test.js    
Issue Links:
Duplicate
duplicates SERVER-11525 Provide nicer message when converting... Closed
Related
Operating System: ALL
Participants:

 Description   

> var duplicateRoles = [ "a", "a", "a", "a", ... "a" ];
> db.runCommand(

{ createRole: "dup", privileges: [], roles: duplicateRoles }

);

> db.runCommand(

{ grantRolesToRole: "empty", privileges: [], roles: duplicateRoles }

);

In both cases, when the duplicateRoles array becomes very large (>16mb) we get an error and a stack trace from mongo:

Assertion: 10334:BSONObj size: 19888945 (0x12F7B31) is invalid.

Instead, I would expect one of two things: a graceful failure with a nice error message, or a successful insert, since the linked roles will (in theory) be de-duped before the parent role is stored in the db.



 Comments   
Comment by Daniel Pasette (Inactive) [ 04/Nov/13 ]

duplicate: SERVER-11525

Comment by Samantha Ritter (Inactive) [ 01/Nov/13 ]

So, the stack trace is basically identical to the one in SERVER-11520, and I'm almost positive that it's only coming from the shell and doesn't reach the server at all.

Comment by Spencer Brody (Inactive) [ 01/Nov/13 ]

I'm pretty sure all of these are actually just SERVER-11525. Can you confirm that the assertion is coming from the shell, not the server?

Comment by Samantha Ritter (Inactive) [ 01/Nov/13 ]

The same thing affects duplicate actions listed within a single privilege. When trying to add the privilege to a role, assert and stack trace.

Generated at Thu Feb 08 03:26:00 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.