qa: Make swap_magic_bytes in p2p_invalid_messages atomic #15697

pull MarcoFalke wants to merge 1 commits into bitcoin:master from MarcoFalke:1904-qaMagicAtomic changing 1 files +11 −3
  1. MarcoFalke commented at 5:41 PM on March 29, 2019: member

    Otherwise, this will lead to errors logged in the network thread:

    https://travis-ci.org/MarcoFalke/bitcoin/jobs/513076282#L2765

  2. DrahtBot added the label Tests on Mar 29, 2019
  3. MarcoFalke force-pushed on Mar 29, 2019
  4. MarcoFalke force-pushed on Mar 29, 2019
  5. DrahtBot commented at 6:57 PM on March 29, 2019: member

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #15197 (Refactor and slightly stricter p2p message processing by jonasschnelli)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  6. qa: Make swap_magic_bytes in p2p_invalid_messages atomic faca95effd
  7. MarcoFalke force-pushed on Apr 4, 2019
  8. MarcoFalke merged this on Apr 23, 2019
  9. MarcoFalke closed this on Apr 23, 2019

  10. MarcoFalke deleted the branch on Apr 23, 2019
  11. MarcoFalke referenced this in commit 40a720acb8 on Apr 23, 2019
  12. sidhujag referenced this in commit 5d87bb7137 on Apr 24, 2019
  13. deadalnix referenced this in commit 294237a627 on Jun 8, 2020
  14. MarcoFalke commented at 4:58 PM on June 12, 2020: member

    The link in OP is no longer valid. New link https://travis-ci.org/github/MarcoFalke/bitcoin-core/jobs/513076282#L2765

    excerpt:

    2019-03-29T15:48:29.764000Z TestFramework (INFO): Tests successful
    
    stderr:
    
    --- Logging error ---
    
    Traceback (most recent call last):
    
      File "/home/travis/build/MarcoFalke/bitcoin/build/bitcoin-x86_64-unknown-linux-gnu/test/functional/test_framework/mininode.py", line 174, in _on_data
    
        raise ValueError("magic bytes mismatch: {} != {}".format(repr(self.magic_bytes), repr(self.recvbuf)))
    
    ValueError: magic bytes mismatch: b'\x00\x11"2' != b'\xfa\xbf\xb5\xdafeefilter\x00\x00\x00\x08\x00\x00\x00\xe8\x0f\xd1\x9f'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
    
      File "/usr/lib/python3.6/logging/__init__.py", line 994, in emit
    
        msg = self.format(record)
    
      File "/usr/lib/python3.6/logging/__init__.py", line 840, in format
    
        return fmt.format(record)
    
      File "/usr/lib/python3.6/logging/__init__.py", line 577, in format
    
        record.message = record.getMessage()
    
      File "/usr/lib/python3.6/logging/__init__.py", line 338, in getMessage
    
        msg = msg % self.args
    
    TypeError: not all arguments converted during string formatting
    
    Call stack:
    
      File "/usr/lib/python3.6/threading.py", line 884, in _bootstrap
    
        self._bootstrap_inner()
    
      File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    
        self.run()
    
      File "/home/travis/build/MarcoFalke/bitcoin/build/bitcoin-x86_64-unknown-linux-gnu/test/functional/test_framework/mininode.py", line 444, in run
    
        self.network_event_loop.run_forever()
    
      File "/usr/lib/python3.6/asyncio/base_events.py", line 427, in run_forever
    
        self._run_once()
    
      File "/usr/lib/python3.6/asyncio/base_events.py", line 1440, in _run_once
    
        handle._run()
    
      File "/usr/lib/python3.6/asyncio/events.py", line 145, in _run
    
        self._callback(*self._args)
    
      File "/usr/lib/python3.6/asyncio/selector_events.py", line 732, in _read_ready
    
        self._protocol.data_received(data)
    
      File "/home/travis/build/MarcoFalke/bitcoin/build/bitcoin-x86_64-unknown-linux-gnu/test/functional/test_framework/mininode.py", line 161, in data_received
    
        self._on_data()
    
      File "/home/travis/build/MarcoFalke/bitcoin/build/bitcoin-x86_64-unknown-linux-gnu/test/functional/test_framework/mininode.py", line 196, in _on_data
    
        logger.exception('Error reading message:', repr(e))
    
    Message: 'Error reading message:'
    
    Arguments: ('ValueError(\'magic bytes mismatch: b\\\'\\\\x00\\\\x11"2\\\' != b\\\'\\\\xfa\\\\xbf\\\\xb5\\\\xdafeefilter\\\\x00\\\\x00\\\\x00\\\\x08\\\\x00\\\\x00\\\\x00\\\\xe8\\\\x0f\\\\xd1\\\\x9f\\\'\',)',)
    
    --- Logging error ---
    
    Traceback (most recent call last):
    
      File "/home/travis/build/MarcoFalke/bitcoin/build/bitcoin-x86_64-unknown-linux-gnu/test/functional/test_framework/mininode.py", line 174, in _on_data
    
        raise ValueError("magic bytes mismatch: {} != {}".format(repr(self.magic_bytes), repr(self.recvbuf)))
    
    ValueError: magic bytes mismatch: b'\x00\x11"2' != b'\xfa\xbf\xb5\xdafeefilter\x00\x00\x00\x08\x00\x00\x00\xe8\x0f\xd1\x9f'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
    
      File "/usr/lib/python3.6/logging/__init__.py", line 994, in emit
    
        msg = self.format(record)
    
      File "/usr/lib/python3.6/logging/__init__.py", line 840, in format
    
        return fmt.format(record)
    
      File "/usr/lib/python3.6/logging/__init__.py", line 577, in format
    
        record.message = record.getMessage()
    
      File "/usr/lib/python3.6/logging/__init__.py", line 338, in getMessage
    
        msg = msg % self.args
    
    TypeError: not all arguments converted during string formatting
    
    Call stack:
    
      File "/usr/lib/python3.6/threading.py", line 884, in _bootstrap
    
        self._bootstrap_inner()
    
      File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    
        self.run()
    
      File "/home/travis/build/MarcoFalke/bitcoin/build/bitcoin-x86_64-unknown-linux-gnu/test/functional/test_framework/mininode.py", line 444, in run
    
        self.network_event_loop.run_forever()
    
      File "/usr/lib/python3.6/asyncio/base_events.py", line 427, in run_forever
    
        self._run_once()
    
      File "/usr/lib/python3.6/asyncio/base_events.py", line 1440, in _run_once
    
        handle._run()
    
      File "/usr/lib/python3.6/asyncio/events.py", line 145, in _run
    
        self._callback(*self._args)
    
      File "/usr/lib/python3.6/asyncio/selector_events.py", line 732, in _read_ready
    
        self._protocol.data_received(data)
    
      File "/home/travis/build/MarcoFalke/bitcoin/build/bitcoin-x86_64-unknown-linux-gnu/test/functional/test_framework/mininode.py", line 161, in data_received
    
        self._on_data()
    
      File "/home/travis/build/MarcoFalke/bitcoin/build/bitcoin-x86_64-unknown-linux-gnu/test/functional/test_framework/mininode.py", line 196, in _on_data
    
        logger.exception('Error reading message:', repr(e))
    
    Message: 'Error reading message:'
    
    Arguments: ('ValueError(\'magic bytes mismatch: b\\\'\\\\x00\\\\x11"2\\\' != b\\\'\\\\xfa\\\\xbf\\\\xb5\\\\xdafeefilter\\\\x00\\\\x00\\\\x00\\\\x08\\\\x00\\\\x00\\\\x00\\\\xe8\\\\x0f\\\\xd1\\\\x9f\\\'\',)',)
    
    Exception in callback _SelectorSocketTransport._read_ready()
    
    handle: <Handle _SelectorSocketTransport._read_ready()>
    
    Traceback (most recent call last):
    
      File "/usr/lib/python3.6/asyncio/events.py", line 145, in _run
    
        self._callback(*self._args)
    
      File "/usr/lib/python3.6/asyncio/selector_events.py", line 732, in _read_ready
    
        self._protocol.data_received(data)
    
      File "/home/travis/build/MarcoFalke/bitcoin/build/bitcoin-x86_64-unknown-linux-gnu/test/functional/test_framework/mininode.py", line 161, in data_received
    
        self._on_data()
    
      File "/home/travis/build/MarcoFalke/bitcoin/build/bitcoin-x86_64-unknown-linux-gnu/test/functional/test_framework/mininode.py", line 174, in _on_data
    
        raise ValueError("magic bytes mismatch: {} != {}".format(repr(self.magic_bytes), repr(self.recvbuf)))
    
    ValueError: magic bytes mismatch: b'\x00\x11"2' != b'\xfa\xbf\xb5\xdafeefilter\x00\x00\x00\x08\x00\x00\x00\xe8\x0f\xd1\x9f'
    
    
  15. random-zebra referenced this in commit bffe509aed on Jun 28, 2021
  16. kittywhiskers referenced this in commit f1d2652f80 on Aug 5, 2021
  17. kittywhiskers referenced this in commit 3d7a668d7e on Aug 5, 2021
  18. kittywhiskers referenced this in commit af6a871308 on Aug 9, 2021
  19. kittywhiskers referenced this in commit 861ab6e89d on Aug 12, 2021
  20. kittywhiskers referenced this in commit fdcd58b0a7 on Aug 22, 2021
  21. kittywhiskers referenced this in commit 019df0c578 on Aug 30, 2021
  22. kittywhiskers referenced this in commit ad70ade648 on Nov 1, 2021
  23. kittywhiskers referenced this in commit a5445a4584 on Nov 3, 2021
  24. pravblockc referenced this in commit bb80da410e on Nov 18, 2021
  25. DrahtBot locked this on Feb 15, 2022
Contributors
Labels

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-17 06:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me