[SERVER-56971] handleHeartbeatResponse_forTest puts an invalid handle on the heartbeats list Created: 14/May/21  Updated: 29/Oct/23  Resolved: 12/Jun/21

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

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

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v5.0
Sprint: Repl 2021-06-14
Participants:
Linked BF Score: 144

 Description   

The invalid handle is on the list only for a very short period, but the period spans two critical sections so there is an opportunity for another thread to get in and do something. If the "something" involves calling cancelAllHeartbeats, the test will crash due to canceling an invalid handle.

We should fix this, probably by using a valid dummy handle (e.g. to a do-nothing lambda).



 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 [ 17/Jun/21 ]

Author:

{'name': 'Vesselina Ratcheva', 'email': 'vesselina.ratcheva@10gen.com', 'username': 'vessy-mongodb'}

Message: SERVER-56971 Create a valid heartbeat handle in handleHeartbeatResponse_forTest

(cherry picked from commit e2a3ba458a82547101976aa80ee7242598e5d43e)
Branch: v5.0
https://github.com/mongodb/mongo/commit/84d30141c85b4ddbf6171ff481b9d1dea3dfad93

Comment by Githook User [ 12/Jun/21 ]

Author:

{'name': 'Vesselina Ratcheva', 'email': 'vesselina.ratcheva@10gen.com', 'username': 'vessy-mongodb'}

Message: SERVER-56971 Create a valid heartbeat handle in handleHeartbeatResponse_forTest
Branch: master
https://github.com/mongodb/mongo/commit/e2a3ba458a82547101976aa80ee7242598e5d43e

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