Repository navigation
Closed
Description
test 2025-12-22T23:47:48.293698Z TestFramework.p2p (DEBUG): Received message from 127.0.0.1:12164: msg_pong(nonce=00000000)
test 2025-12-22T23:47:48.293794Z TestFramework.p2p (DEBUG): Received message from 127.0.0.1:12164: msg_pong(nonce=00000006)
test 2025-12-22T23:47:48.344658Z TestFramework (ERROR): Unexpected exception
Traceback (most recent call last):
File "/Users/runner/work/bitcoin/bitcoin/repo_archive/test/functional/test_framework/test_framework.py", line 142, in main
self.run_test()
~~~~~~~~~~~~~^^
File "/Users/runner/work/bitcoin/bitcoin/repo_archive/ci/scratch/build-aarch64-apple-darwin24.6.0/test/functional/p2p_addr_selfannouncement.py", line 67, in run_test
self.self_announcement_test(outbound=False, addrv2=True)
~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/runner/work/bitcoin/bitcoin/repo_archive/ci/scratch/build-aarch64-apple-darwin24.6.0/test/functional/p2p_addr_selfannouncement.py", line 135, in self_announcement_test
assert_equal(addr_receiver.self_announcements_received, last_self_announcements_received + 1)
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/runner/work/bitcoin/bitcoin/repo_archive/test/functional/test_framework/util.py", line 80, in assert_equal
raise AssertionError("not(%s)" % " == ".join(str(arg) for arg in (thing1, thing2) + args))
AssertionError: not(4 == 5)
test 2025-12-22T23:47:48.347601Z TestFramework (DEBUG): Closing down network thread Reacted by b10c
Metadata
Metadata
Assignees
Labels
No labels
Activity
0xB10C commentedon Dec 27, 2025
Will try to reproduce it. I suspect this is a addr message timestamp issue. Previously, I had something like this:
to catch them, but dropped it in #34039 (comment)
reproduce bitcoin#34159 ?
0xB10C commentedon Dec 28, 2025
can reproduce with b3fef39:
Self-announcement timestamp mismatch: got=2656803201 expected=2655075201naiyoma commentedon Dec 30, 2025
I haven’t been able to reproduce this, Is the time difference btwn
gotandexpected,consistently 20 day ?0xB10C commentedon Dec 30, 2025
Sorry, I didn't link to https://github.com/0xB10C/bitcoin/actions/runs/20546158233 - I'm not seeing the failure locally, just in CI.
I was playing around with it in 0xB10C#15, and I think one options is to be less strict about the timestamp similar to:
self.addr_messages_received += 1 for addr in message.addrs: self.addresses_received += 1 - if addr == self.expected: + if addr.time >= self.expected.time and addr.ip == self.expected.ip and addr.port == self.expected.port and addr.nServices == self.expected.nServices: self.self_announcements_received += 1hebasto commentedon Dec 31, 2025
On OmniOS, https://github.com/hebasto/bitcoin-core-nightly/actions/runs/20611492118/job/59196832666:
fanquake commentedon Dec 31, 2025
https://github.com/bitcoin/bitcoin/actions/runs/20546486544/job/59017686783?pr=34156#step:11:3758
naiyoma commentedon Dec 31, 2025
I think this happens when there's a delay between calling
bumpmocktime()and updatingexpected.time.tried this locally:
naiyoma commentedon Dec 31, 2025
got this with the diff above
naiyoma commentedon Dec 31, 2025
I'm not sure this is always the case. Is it possible that
addr.time <= self.expected.timecould occur ? i think checking ip,port,service is sufficient.hebasto commentedon Dec 31, 2025
On NetBSD 9.4, https://github.com/hebasto/bitcoin-core-nightly/actions/runs/20619499569/job/59218560248:
0xB10C commentedon Dec 31, 2025
that would work around the issue, but I think we should have coverage for the self-announcement timestamp being correct(ish).
An earlier version of #34039 didn't use
bumpmocktime(). We could revert to doing:to make sure the expected timestamp is set before bumping the mocktime.
fanquake commentedon Jan 2, 2026
https://github.com/bitcoin/bitcoin/actions/runs/20656499701/job/59310311647#step:9:3863
naiyoma commentedon Jan 2, 2026
Yeah, this is certainly a better option
test: fix intermittent failure in p2p_addr_selfannouncement
0xB10C commentedon Jan 5, 2026
doing this in #34204
Merge #34204: test: fix intermittent failure in p2p_addr_selfannounce…