[SERVER-54214] Interrupted canonicalization can cause crash Created: 02/Feb/21  Updated: 29/Oct/23  Resolved: 26/Feb/21

Status: Closed
Project: Core Server
Component/s: Stability
Affects Version/s: 4.9.0
Fix Version/s: 4.9.0

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

Issue Links:
Cloners
is cloned by SERVER-54211 Interrupted canonicalization can caus... Closed
is cloned by SERVER-54212 Interrupted canonicalization can caus... Closed
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Steps To Reproduce:

Either interrupt the following query (this may require several tries), or add a failpoint to the canonicalization step to force a failure:

db.coll.distinct( "a", {"b" : 1})

Sprint: Query Optimization 2021-02-22, Query Optimization 2021-03-08
Participants:
Linked BF Score: 9

 Description   

If a query gets interrupted during canonicalization which does not have a project, it is possible that the server will crash.

This is due to "getExecutorWithoutProjection" not checking the "canonicalize" return status.



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

Author:

{'name': 'Joel Redman', 'email': 'joel.redman@mongodb.com', 'username': 'joredman'}

Message: SERVER-54214 Check canonicalization status during distinct operation
Branch: master
https://github.com/mongodb/mongo/commit/fec9518d618512254f61afa94129241874eb7b19

Comment by Joel Redman (Inactive) [ 26/Feb/21 ]

LGTM from all required reviewers

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