[SERVER-59190] IndexAccessMethod can be destructed during index build bulk load yield Created: 09/Aug/21  Updated: 29/Oct/23  Resolved: 20/Aug/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 5.1.0
Fix Version/s: 4.4.10, 5.0.4, 5.1.0-rc0

Type: Bug Priority: Major - P3
Reporter: Gregory Noma Assignee: Yuhong Zhang
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File SERVER-59190.diff    
Issue Links:
Backports
Depends
Related
related to SERVER-51806 bulk key insertion phase of index bui... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v5.0, v4.4
Sprint: Execution Team 2021-08-23, Execution Team 2021-09-06
Participants:
Linked BF Score: 137

 Description   

If an index build is aborted while it yields its locks during the bulk load phase, the AbstractIndexAccessMethod will be destructed. Then if we read any member state after this has occurred, for instance reading the _indexCatalogEntry member, this is undefined behavior.

Reproducer attached – run with UBSAN.



 Comments   
Comment by Vivian Ge (Inactive) [ 06/Oct/21 ]

Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you!

Comment by Githook User [ 27/Sep/21 ]

Author:

{'name': 'Yuhong Zhang', 'email': 'danielzhangyh@gmail.com', 'username': 'YuhongZhang98'}

Message: SERVER-51806 Enable lock yielding during the bulk load phase of index builds

(cherry picked from commit 935bd19)

SERVER-59190 IndexAccessMethod can be destructed during index build bulk load yield

(cherry picked from commit 50cc968)
Branch: v4.4
https://github.com/mongodb/mongo/commit/37df0008f516c595d6c413a151e69b9ec00f7437

Comment by Githook User [ 22/Sep/21 ]

Author:

{'name': 'Yuhong Zhang', 'email': 'danielzhangyh@gmail.com', 'username': 'YuhongZhang98'}

Message: SERVER-59190 IndexAccessMethod can be destructed during index build bulk load yield

(cherry picked from commit 50cc968124097b6f16ce6623431ae31a54d232ba)
Branch: v5.0
https://github.com/mongodb/mongo/commit/658513b292c9b73c756a6d3886a9c3b3df81e557

Comment by Githook User [ 20/Aug/21 ]

Author:

{'name': 'Yuhong Zhang', 'email': 'danielzhangyh@gmail.com', 'username': 'YuhongZhang98'}

Message: SERVER-59190 IndexAccessMethod can be destructed during index build bulk load yield
Branch: master
https://github.com/mongodb/mongo/commit/50cc968124097b6f16ce6623431ae31a54d232ba

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