[SERVER-42922] failCommand + closeConnection can dereference a null session pointer Created: 20/Aug/19 Updated: 09/Oct/19 Resolved: 09/Oct/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Client, Internal Code, Networking |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Daniel Gottlieb (Inactive) | Assignee: | Mira Carey |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||
| Steps To Reproduce: |
|
||||||||||||||||||||
| Sprint: | Service Arch 2019-10-21 | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Description |
|
The conditions evaluated to reach this line are not sufficient to guarantee the session object exists on the client (note the type definition: using SessionHandle = std::shared_ptr<Session>;). Notably, the session may be null when using DBDirectClient such as inside the KeysCollectionClientDirect. |
| Comments |
| Comment by Mira Carey [ 09/Oct/19 ] |
|
The fix in |
| Comment by Daniel Gottlieb (Inactive) [ 20/Aug/19 ] |
|
Note that drivers use this failpoint extensively for testing. Their testing hits this on 4.0, though the reproducer will fire on master. |