...
BugZero found this defect 2726 days ago.
The MockStream class used in network_interface_asio_test works by pausing itself as certain key Events occur (like reading, writing, connecting) to allow the test thread to investigate the state of the connection. The MockStream contains a set of states that show where it has paused itself (kBlockedBeforeConnect, kBlockedBeforeRead, kBlockedAfterWrite, kCanceled). We have made an assumption that the state of the stream will not change while it is paused. However, it is perfectly valid for the NIA to call cancel() on the MockStream while we have it paused. Currently, if this happens, we may invariant. The methods that operate on MockStream while it is paused (pushRead(), popWrite()) should account for possible cancellation by the NIA.
xgen-internal-githook commented on Mon, 10 Apr 2017 00:43:26 +0000: Author: {u'username': u'samantharitter', u'name': u'samantharitter', u'email': u'samantha.ritter@10gen.com'} Message: SERVER-28489 MockStream hook methods may still be used if the stream gets canceled (cherry picked from commit 0230175542488b48a2976e87d9c24e720f2488c4) Branch: v3.2 https://github.com/mongodb/mongo/commit/ff4f28367d83e9b4b7a0629aa6c7a6b919c5ecba xgen-internal-githook commented on Mon, 10 Apr 2017 00:43:25 +0000: Author: {u'username': u'samantharitter', u'name': u'samantharitter', u'email': u'samantha.ritter@10gen.com'} Message: SERVER-28489 Add documentation to mock stream framework (cherry picked from commit cdf2e4cc29f7df5a702ceb62102ac28c589e7e0d) Branch: v3.2 https://github.com/mongodb/mongo/commit/bf7687a12861291447d8e0e2a021ed8f44408021 xgen-internal-githook commented on Sun, 9 Apr 2017 21:45:27 +0000: Author: {u'username': u'samantharitter', u'name': u'samantharitter', u'email': u'samantha.ritter@10gen.com'} Message: SERVER-28489 MockStream hook methods may still be used if the stream gets canceled (cherry picked from commit 0230175542488b48a2976e87d9c24e720f2488c4) Branch: v3.4 https://github.com/mongodb/mongo/commit/9a2d97742f34b54a35360b8f711d0b1e3e547202 xgen-internal-githook commented on Sun, 9 Apr 2017 21:45:26 +0000: Author: {u'username': u'samantharitter', u'name': u'samantharitter', u'email': u'samantha.ritter@10gen.com'} Message: SERVER-28489 Add documentation to mock stream framework (cherry picked from commit cdf2e4cc29f7df5a702ceb62102ac28c589e7e0d) Branch: v3.4 https://github.com/mongodb/mongo/commit/9661c01fac46b8541e7a491a4b018de9ee41a5c3 xgen-internal-githook commented on Fri, 24 Mar 2017 21:21:46 +0000: Author: {u'username': u'samantharitter', u'name': u'samantharitter', u'email': u'samantha.ritter@10gen.com'} Message: SERVER-28489 MockStream hook methods may still be used if the stream gets canceled Branch: master https://github.com/mongodb/mongo/commit/0230175542488b48a2976e87d9c24e720f2488c4 xgen-internal-githook commented on Fri, 24 Mar 2017 21:21:45 +0000: Author: {u'username': u'samantharitter', u'name': u'samantharitter', u'email': u'samantha.ritter@10gen.com'} Message: SERVER-28489 Add documentation to mock stream framework Branch: master https://github.com/mongodb/mongo/commit/cdf2e4cc29f7df5a702ceb62102ac28c589e7e0d