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
rpc_net.py intemittent failure / assert_equal(len(getrawaddrman[table_name]), len(table_info["entries"])) #28964
Comments
I'm taking a look at this. |
seems like this didn't work: bitcoin/test/functional/rpc_net.py Lines 492 to 504 in 8cf2137
Did (still investigating) |
I think that the problem is a rare collision in the tried table:
|
@mzumsande is there a reason why Lines 981 to 987 in 7bc8c53
|
I don't think there is a reason, but returning |
Improving |
Same or similar issue? test 2024-02-28T10:08:07.041000Z TestFramework (ERROR): Assertion failed
Traceback (most recent call last):
File "/ci_container_base/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/test/functional/test_framework/test_framework.py", line 131, in main
self.run_test()
File "/ci_container_base/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/test/functional/rpc_net.py", line 63, in run_test
self.test_getpeerinfo()
File "/ci_container_base/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/test/functional/rpc_net.py", line 123, in test_getpeerinfo
assert_equal(
File "/ci_container_base/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/test/functional/test_framework/util.py", line 57, in assert_equal
raise AssertionError("not(%s)" % " == ".join(str(arg) for arg in (thing1, thing2) + args))
AssertionError: not({'id': 2, 'network': 'not_publicly_routable', 'services': '0000000000000000', 'servicesnames': [], 'relaytxes': False, 'lastsend': 1709114886, 'lastrecv': 1709114886, 'last_transaction': 0, 'last_block': 0, 'conntime': 1709114886, 'timeoffset': 0, 'version': 0, 'subver': '', 'inbound': True, 'bip152_hb_to': False, 'bip152_hb_from': False, 'startingheight': -1, 'presynced_headers': -1, 'synced_headers': -1, 'synced_blocks': -1, 'inflight': [], 'addr_relay_enabled': False, 'addr_processed': 0, 'addr_rate_limited': 0, 'permissions': [], 'minfeefilter': Decimal('0E-8'), 'bytessent_per_msg': {}, 'bytesrecv_per_msg': {}, 'connection_type': 'inbound', 'transport_protocol_type': 'detecting', 'session_id': ''} == {'addr_processed': 0, 'addr_rate_limited': 0, 'addr_relay_enabled': False, 'bip152_hb_from': False, 'bip152_hb_to': False, 'bytesrecv_per_msg': {}, 'bytessent_per_msg': {}, 'connection_type': 'inbound', 'conntime': 1709114886, 'id': 2, 'inbound': True, 'inflight': [], 'last_block': 0, 'last_transaction': 0, 'lastrecv': 1709114886, 'lastsend': 1709114886, 'minfeefilter': Decimal('0E-8'), 'network': 'not_publicly_routable', 'permissions': [], 'presynced_headers': -1, 'relaytxes': False, 'services': '0000000000000000', 'servicesnames': [], 'session_id': 'b6552478f74e655b236cd192c85c9831b69221681ad1f971fb99a1451391b159', 'startingheight': -1, 'subver': '', 'synced_blocks': -1, 'synced_headers': -1, 'timeoffset': 0, 'transport_protocol_type': 'v2', 'version': 0}) CI run: https://cirrus-ci.com/task/4559353030639616?logs=ci#L3823 |
It is in a different line, so it seems different. Unrelated, I think it would be useful if the assert helper would sort and pretty-print dictionaries. Otherwise it is hard to spot the difference. |
yes, it's a different issue, most likely related to #29358 - @stratospher and I are looking into it. |
Gotcha. I have since been able to get what looks like the same issue. node1 2024-02-28T14:39:06.105966Z (mocktime: 2024-02-28T14:39:05Z) [C:\Users\Max\source\bitcoin\src\logging\timer.h:58] [Log] [addrman] CheckAddrman: completed (0.03ms)
node1 2024-02-28T14:39:06.105977Z (mocktime: 2024-02-28T14:39:05Z) [C:\Users\Max\source\bitcoin\src\logging\timer.h:58] [Log] [addrman] CheckAddrman: new 3, tried 1, total 4 started
test 2024-02-28T14:39:06.106000Z TestFramework (ERROR): Assertion failed
Traceback (most recent call last):
File "C:\Users\Max\source\bitcoin\test\functional\test_framework\test_framework.py", line 131, in main
self.run_test()
File "C:\Users\Max\source\bitcoin/test/functional/rpc_net.py", line 72, in run_test
self.test_getrawaddrman()
File "C:\Users\Max\source\bitcoin/test/functional/rpc_net.py", line 512, in test_getrawaddrman
check_getrawaddrman_entries(expected)
File "C:\Users\Max\source\bitcoin/test/functional/rpc_net.py", line 430, in check_getrawaddrman_entries
assert_equal(len(getrawaddrman[table_name]), len(table_info["entries"]))
File "C:\Users\Max\source\bitcoin\test\functional\test_framework\util.py", line 57, in assert_equal
raise AssertionError("not(%s)" % " == ".join(str(arg) for arg in (thing1, thing2) + args))
AssertionError: not(3 == 2)
node1 2024-02-28T14:39:06.106021Z (mocktime: 2024-02-28T14:39:05Z) [C:\Users\Max\source\bitcoin\src\logging\timer.h:58] [Log] [addrman] CheckAddrman: completed (0.04ms)
node1 2024-02-28T14:39:06.106033Z (mocktime: 2024-02-28T14:39:05Z) [C:\Users\Max\source\bitcoin\src\logging\timer.h:58] [Log] [addrman] CheckAddrman: new 3, tried 1, total 4 started |
99954f9 test: fix test to ensure hidden RPC is present in detailed help (stratospher) 0d01f6f test: remove unused mocktime in test_addpeeraddress (0xb10c) 6205466 rpc: "addpeeraddress tried" return error on failure (0xb10c) Pull request description: When trying to add an address to the IP address manager tried table, it's first added to the new table and then moved to the tried table. Previously, adding a conflicting address to the address manager's tried table with test-only `addpeeraddress tried=true` RPC would return `{ "success": true }`. However, the address would not be added to the tried table, but would remain in the new table. This caused, e.g., issue #28964. This is fixed by new returning `{ "success": false, "error": "..." }` for failed tried table additions. Since the address remaining in the new table can't be removed (the address manager interface does not support removing addresses at the moment and adding this seems to be a bigger effort), an error message is returned. This indicates to a user why the RPC failed and allows accounting for the extra address in the new table. This is done in the functional test for the `getrawaddrman` RPC. Fixes #28964 ACKs for top commit: achow101: ACK 99954f9 stratospher: reACK 99954f9. 🚀 brunoerg: utACK 99954f9 Tree-SHA512: 2f1299410c0582ebc2071271ba789a8abed905f9a510821f77afbcf2a555ec31397578ea55cbcd162fb828be27afedd3246c7b13ad8883f2f745bb8e04364a76
https://cirrus-ci.com/task/5884375213015040?logs=ci#L4022
The text was updated successfully, but these errors were encountered: