-
Type: Bug
-
Resolution: Gone away
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Optimization
-
ALL
-
QO 2024-07-22
-
0
A jstestfuzz generated a testInternalTransactions command that triggered a debug-only assertions (e.g. if (kDebugBuild) {crash();} ) on invalid input because lsid was improperly defined.
{
testInternalTransactions: 1,
commandInfos: [{
dbName: dbName,
command: {insert: collName, lsid: [{$undefined: true}]}
}]
}
testInternalTransactions gets a commandInfos object that specifies the command to be run inside the transaction. In the processing of the command, the transaction code primes the transaction, appends relevant fields to the commandInfo(clientsession, lsid, txnNumber, etc.) and attempts to serialize the opMsg. This debug-only fassert fails while serializing the opMsg complaining of a duplicate fieldname: lsid.
Add a check in testInternalTransactions to ensure lsid is properly defined(if present in the commandInfo) before attempting to serialize the opMsg to avoid hitting the fassert.