-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Fully Compatible
-
ALL
-
42
-
None
-
3
-
None
-
None
-
None
-
None
-
None
-
None
This can cause a MaxTimeMS timeout that involves $where or a JavaScript function to return "Interrupted" rather than "MaxTimeMSExpired", causing our server_status_with_time_out_cursors.js concurrency test to fail sporadically.
A quick fix for server_status_with_time_out_cursors.js is being made under SERVER-46225, which will add "Interrupted" to the accepted error list. This ticket will be used to fix the root cause and remove the quick fix.
This is caused by the "_mr._thread.get_id() == stdx::this_thread::get_id()" comparison on the following conditional:
if (_mr._thread.get_id() == stdx::this_thread::get_id() && _inOp > 0 && _opCtx) {
_killStatus = _opCtx->checkForInterruptNoAssert();
}
"_mr._thread" is never initialized, so the "id" it holds will never be equal to that of the current thread. Failing this check means we will not check the OperationContext for kill reason and substitute with a more generic "Interrupted" error code.
The failing check is here: https://github.com/mongodb/mongo/blob/3f529eeb89a3821604012ea86e9ef7d6fb962a24/src/mongo/scripting/mozjs/implscope.cpp#L155-L159
- is related to
-
SERVER-42736 Fix memory leak in PosixNSPR.cpp when PR_JoinThread() throws exception
-
- Closed
-
- related to
-
SERVER-46225 Add Interrupted to timeout codes accepted by server_status_with_time_out_cursors.js
-
- Closed
-