Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qa: fix p2p_invalid_messages on macOS #14812

Merged
merged 2 commits into from Nov 26, 2018

Conversation

Projects
None yet
5 participants
@jamesob
Copy link
Member

commented Nov 26, 2018

Infinite mea culpa for the number of problems with this test.

This change bumps the acceptable RSS increase threshold from 3% to 50% when spamming the test node with junk 4MB messages. On @MarcoFalke's macOS test build we see RSS grow ~14% from ~71MB to 81MB, so a 50% increase threshold should be more than sufficient to avoid spurious failures.

@jamesob

This comment has been minimized.

Copy link
Member Author

commented Nov 26, 2018

Fixes #14710

@MarcoFalke MarcoFalke merged commit 5a1f576 into bitcoin:master Nov 26, 2018

1 of 2 checks passed

continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

MarcoFalke added a commit that referenced this pull request Nov 26, 2018

Merge #14812: qa: fix p2p_invalid_messages on macOS
5a1f576 qa: clean up assert_memory_usage_stable utility (James O'Beirne)
0cf1632 qa: fix p2p_invalid_messages on macOS (James O'Beirne)

Pull request description:

  Infinite mea culpa for the number of problems with this test.

  This change bumps the acceptable RSS increase threshold from 3% to 50% when spamming the test node with junk 4MB messages. On [@MarcoFalke's macOS test build](https://travis-ci.org/MarcoFalke/btc_nightly) we see RSS grow ~14% from ~71MB to 81MB, so a 50% increase threshold should be more than sufficient to avoid spurious failures.

Tree-SHA512: 150a7b88080fd883c7a5d0b9ffa470f61a97c4885fccc1a06fde6260aaef15640a7c1de7e89c581b245df7807d617ec3d86775330386ec5149ad567492fc5d31

@fanquake fanquake added the Tests label Nov 26, 2018

@kallewoof

This comment has been minimized.

Copy link
Member

commented Nov 27, 2018

Post-merge (that was quick btw, but I guess ok since it's only tests): I assume error is unrelated?

2018-11-27T07:29:34.685000Z TestFramework (INFO): Initializing test directory /var/folders/b8/znqr8hj918772gfmd875gzgdd3ypz1/T/testzl4oubll
2018-11-27T07:29:35.945000Z TestFramework (INFO): Sending a bunch of large, junk messages to test memory exhaustion. May take a bit...
2018-11-27T07:29:40.680000Z TestFramework (INFO): Waiting for node to drop junk messages.
Fatal write error on socket transport
protocol: <test_framework.mininode.P2PDataStore object at 0x10f38d240>
transport: <_SelectorSocketTransport fd=10 read=polling write=<idle, bufsize=0>>
Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/selector_events.py", line 868, in write
    n = self._sock.send(data)
OSError: [Errno 41] Protocol wrong type for socket
2018-11-27T07:29:40.799000Z TestFramework.mininode (WARNING): Connection lost to 127.0.0.1:14387 due to [Errno 41] Protocol wrong type for socket
2018-11-27T07:29:40.899000Z TestFramework (INFO): Sending a message with incorrect size of 2
2018-11-27T07:29:40.956000Z TestFramework.mininode (WARNING): Connection lost to 127.0.0.1:14387 due to [Errno 54] Connection reset by peer
2018-11-27T07:29:41.061000Z TestFramework (INFO): Sending a message with incorrect size of 77
2018-11-27T07:29:41.222000Z TestFramework (INFO): Sending a message with incorrect size of 78
2018-11-27T07:29:41.384000Z TestFramework (INFO): Sending a message with incorrect size of 79
2018-11-27T07:29:41.761000Z TestFramework (INFO): Stopping nodes
2018-11-27T07:29:42.346000Z TestFramework (INFO): Cleaning up /var/folders/b8/znqr8hj918772gfmd875gzgdd3ypz1/T/testzl4oubll on exit
2018-11-27T07:29:42.346000Z TestFramework (INFO): Tests successful
@AkioNak

This comment has been minimized.

Copy link
Contributor

commented Nov 27, 2018

I met the error that @kallewoof pointed out above, too.
(macbook pro/macos 10.13.6)

p2p_invalid_messages.py says Tests successful, but test_runner.py judges that it Failed.

$ ./test/functional/test_runner.py p2p_invalid_messages.py 
Temporary test directory at /var/folders/gy/zxy8j2k17yxfpdbs_td03mwjzvzqs2/T/test_runner_₿_🏃_20181127_164919
1/1 - p2p_invalid_messages.py failed, Duration: 6 s

stdout:
2018-11-27T07:49:20.102000Z TestFramework (INFO): Initializing test directory /var/folders/gy/zxy8j2k17yxfpdbs_td03mwjzvzqs2/T/test_runner_₿_🏃_20181127_164919/p2p_invalid_messages_0
2018-11-27T07:49:21.079000Z TestFramework (INFO): Sending a bunch of large, junk messages to test memory exhaustion. May take a bit...
2018-11-27T07:49:24.885000Z TestFramework (INFO): Waiting for node to drop junk messages.
2018-11-27T07:49:24.989000Z TestFramework.mininode (WARNING): Connection lost to 127.0.0.1:11000 due to [Errno 41] Protocol wrong type for socket
2018-11-27T07:49:25.098000Z TestFramework (INFO): Sending a message with incorrect size of 2
2018-11-27T07:49:25.153000Z TestFramework.mininode (WARNING): Connection lost to 127.0.0.1:11000 due to [Errno 54] Connection reset by peer
2018-11-27T07:49:25.258000Z TestFramework (INFO): Sending a message with incorrect size of 77
2018-11-27T07:49:25.314000Z TestFramework.mininode (WARNING): Connection lost to 127.0.0.1:11000 due to [Errno 54] Connection reset by peer
2018-11-27T07:49:25.420000Z TestFramework (INFO): Sending a message with incorrect size of 78
2018-11-27T07:49:25.579000Z TestFramework (INFO): Sending a message with incorrect size of 79
2018-11-27T07:49:25.960000Z TestFramework (INFO): Stopping nodes
2018-11-27T07:49:26.446000Z TestFramework (INFO): Cleaning up /var/folders/gy/zxy8j2k17yxfpdbs_td03mwjzvzqs2/T/test_runner_₿_🏃_20181127_164919/p2p_invalid_messages_0 on exit
2018-11-27T07:49:26.446000Z TestFramework (INFO): Tests successful


stderr:
Fatal write error on socket transport
protocol: <test_framework.mininode.P2PDataStore object at 0x10ae10a58>
transport: <_SelectorSocketTransport fd=10 read=polling write=<idle, bufsize=0>>
Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/selector_events.py", line 868, in write
    n = self._sock.send(data)
OSError: [Errno 41] Protocol wrong type for socket



TEST                    | STATUS    | DURATION

p2p_invalid_messages.py | ✖ Failed  | 6 s

ALL                     | ✖ Failed  | 6 s (accumulated) 
Runtime: 6 s

@MarcoFalke

This comment has been minimized.

Copy link
Member

commented Nov 27, 2018

Is that a deterministic failure due to one of the commits in this pull request? I doubt it, since I have seen it before, but please open a new issue about this.

@MarcoFalke

This comment has been minimized.

Copy link
Member

commented Nov 27, 2018

According to some other reports asyncio has issues with large buffers on macOS...

@kallewoof

This comment has been minimized.

Copy link
Member

commented Nov 28, 2018

Yeah this could be an error that would happen if the original error did not (i.e. the situation post-merge).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.