[SERVER-46533] CmdUpdate should persist underlying BSON Created: 02/Mar/20 Updated: 29/Oct/23 Resolved: 11/Mar/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 4.7.0, 4.4.11 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Benjamin Caimano (Inactive) | Assignee: | Amirsaman Memaripour |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Operating System: | ALL | ||||||||||||
| Backport Requested: |
v4.4
|
||||||||||||
| Sprint: | Service Arch 2020-03-09, Service Arch 2020-03-23 | ||||||||||||
| Participants: | |||||||||||||
| Description |
|
It appears that CmdUpdate does not persist the BSONObj it uses to make its write_ops batch. This is fine when the CommandInvocation lives as long as the underlying OpMsgRequest, but causes use-after-free when the CommandInvocation can be used off thread. We need to either make a BSONObj member for the actual Invocation or for the batch object. There is a small chance that this is a non-issue and there is some other problem causing terminate style failure when updates are mirrored. |
| Comments |
| Comment by Githook User [ 19/Oct/21 ] |
|
Author: {'name': 'Amirsaman Memaripour', 'email': 'amirsaman.memaripour@mongodb.com', 'username': 'samanca'}Message: (cherry picked from commit 270bd8cb3def190b7a46b02a65cbbedacbed7a9c) |
| Comment by Githook User [ 11/Mar/20 ] |
|
Author: {'username': 'samanca', 'name': 'Amirsaman Memaripour', 'email': 'amirsaman.memaripour@mongodb.com'}Message: |