[SERVER-8338] Socket library send/recv failpoints do not inhibit data transfer when activated Created: 25/Jan/13 Updated: 11/Jul/16 Resolved: 13/Feb/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code |
| Affects Version/s: | 2.3.2 |
| Fix Version/s: | 2.4.0-rc1 |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Andrew Morrow (Inactive) | Assignee: | Andrew Morrow (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | triage | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | ALL | ||||||||
| Participants: | |||||||||
| Description |
|
The socket library in util/net/sock.cpp provides failpoints for calls into its send and recv methods. However, when enabled, these failpoints do not actually prevent the syscall from executing: they only cause the return value of the send or recv syscall to be ignored and force a branch into the error handling logic. This makes the failpoints potentially not useful: A test trying to use the failpoints to simulate a network partition, for instance, would see a socket error in the caller, but the intended recipient would actually see the sent data. When enabled, the socket send/recv failpoints should inhibit data transfer. |
| Comments |
| Comment by auto [ 13/Feb/13 ] |
|
Author: {u'date': u'2013-02-07T16:58:39Z', u'name': u'Andrew Morrow', u'email': u'acm@10gen.com'}Message: |
| Comment by Andrew Morrow (Inactive) [ 07/Feb/13 ] |
|
So, it is pretty clear what the correct behavior is for the send side: if you try to send, and the failpoint is enabled, you get an exception and the data is not sent. The 'recv' side is harder, because there are two possible behaviors:
It is not clear what the correct choice here is. |