[SERVER-82666] Race in DBClientGRPCTest::ShutdownBehavior Created: 01/Nov/23 Updated: 03/Nov/23 Resolved: 03/Nov/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 7.2.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Patrick Freed | Assignee: | Patrick Freed |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Backwards Compatibility: | Fully Compatible | ||||
| Operating System: | ALL | ||||
| Sprint: | Service Arch 2023-11-13 | ||||
| Participants: | |||||
| Linked BF Score: | 11 | ||||
| Description |
|
This test verifies that DBClientGRPCStream::shutdown properly closes the underlying gRPC stream. It does so by creating a DBClientGRPCStream, shutting it down, and then sending a ping command (implicitly reconnecting while doing so). It confirms this works as expected asserting that the first invocation of the server handler does not receive a ping command and that the second does. It guards which assertions to perform via the use of an atomic boolean flag that the handler marks as true after the first invocation. However, the reading and setting of this flag aren't performed atomically, so it is possible for the second invocation of the handler to also try to verify that no ping command has been received even though one will be, resulting in a failed test. One example failure: https://parsley.mongodb.com/resmoke/67d700a66b9c272f92abe76807a7103c/test/179194321692af2648a0deca6fd9b2a0?bookmarks=0,50&shareLine=27 |
| Comments |
| Comment by Githook User [ 03/Nov/23 ] |
|
Author: {'name': 'Patrick Freed', 'email': 'patrick.freed@mongodb.com', 'username': 'patrickfreed'}Message: |
| Comment by Patrick Freed [ 01/Nov/23 ] |
|
Note that the BFG for this failure was caught up in BF-29926's auto resolution rules, but I think this is a separate issue. |