[qa] Fix race conditions in p2p-compactblocks.py and sendheaders.py #8882

pull sdaftuar wants to merge 2 commits into bitcoin:master from sdaftuar:fix-race-again changing 2 files +48 −44
  1. sdaftuar commented at 7:56 PM on October 4, 2016: member

    Sorry for the code churn in this test; this is another attempt to resolve the test failure reported in #8842.

    In #8854 I added a sync_with_ping() with the idea of making sure that we'd processed all the block announcements from the node before continuing in the test; however that is insufficient for making sure that the node had actually tried sending all the block announcements it's going to eventually send. My guess is that the test failures are happening in situations where the block announcements from the generate(101) call don't finish arriving until after the sync_with_ping(), throwing off the later tests.

    So I replaced the sync_with_ping with an explicit check that the node's tip has been announced, before continuing on with the test. Hopefully this resolves the lingering issues.

  2. [qa] Another attempt to fix race condition in p2p-compactblocks.py
    sync_with_ping() only guarantees that the node has processed messages
    it's received from the peer, not that block announcements from the node have
    made it back to the peer.  Replace sync_with_ping() with an explicit check that
    the node's tip has been announced.
    6976db2f46
  3. fanquake added the label Tests on Oct 5, 2016
  4. fanquake cross-referenced this on Oct 5, 2016 from issue [0.13] Backports by MarcoFalke
  5. MarcoFalke commented at 7:43 AM on October 5, 2016: member

    utACK 6976db2

  6. MarcoFalke added the label Needs backport on Oct 5, 2016
  7. MarcoFalke added this to the milestone 0.13.1 on Oct 5, 2016
  8. MarcoFalke referenced this in commit b73f0653f3 on Oct 5, 2016
  9. sdaftuar commented at 1:20 PM on October 6, 2016: member

    I suspect the failure in sendheaders may have the same underlying cause:a generate() call where the block announcements might be arriving later than expected. I'll try to fix that up in this PR as well.

  10. [qa] Fix race condition in sendheaders.py
    Also de-duplicates code that has been moved to mininode
    b55d9411e7
  11. sdaftuar renamed this:
    [qa] Another attempt to fix race condition in p2p-compactblocks.py
    [qa] Fix race conditions in p2p-compactblocks.py and sendheaders.py
    on Oct 6, 2016
  12. sdaftuar commented at 6:42 PM on October 6, 2016: member

    I believe I've addressed the occasional test failure in sendheaders.py as well now.

  13. MarcoFalke referenced this in commit d6c83b95cf on Oct 6, 2016
  14. MarcoFalke commented at 7:33 PM on October 8, 2016: member

    utACK b55d941

  15. instagibbs commented at 8:46 AM on October 10, 2016: member

    utACK b55d9411e7e1aa36ddabba3b942f2e1c736c1bd9

  16. btcdrak commented at 5:39 PM on October 10, 2016: contributor

    utACK d6c83b95cff2ff290533593719d6501ecf128f13

  17. MarcoFalke merged this on Oct 11, 2016
  18. MarcoFalke closed this on Oct 11, 2016

  19. MarcoFalke referenced this in commit d075479969 on Oct 11, 2016
  20. MarcoFalke removed the label Needs backport on Oct 13, 2016
  21. jnewbery cross-referenced this on Oct 24, 2016 from issue p2p-compactblocks.py fails randomly by jl2012
  22. ryanofsky referenced this in commit 186bd1de8e on Oct 25, 2016
  23. ryanofsky referenced this in commit d05cfd9d2c on Nov 1, 2016
  24. ryanofsky referenced this in commit 47e9659ecf on Nov 3, 2016
  25. MarcoFalke referenced this in commit 2ba5d78427 on Nov 20, 2016
  26. codablock cross-referenced this on Feb 8, 2018 from issue Backports from compact block related Bitcoin PRs by codablock
  27. gladcow cross-referenced this on Mar 1, 2018 from issue Backport compact blocks functionality from bitcoin by gladcow
  28. gladcow referenced this in commit f15b41f746 on Mar 2, 2018
  29. gladcow referenced this in commit dd85a5ed46 on Mar 13, 2018
  30. gladcow referenced this in commit 282ea81f59 on Mar 14, 2018
  31. gladcow referenced this in commit bf70ade22a on Mar 15, 2018
  32. gladcow referenced this in commit 0027f189a6 on Mar 15, 2018
  33. gladcow referenced this in commit 4ed8cc9425 on Mar 15, 2018
  34. gladcow referenced this in commit 77737a714f on Mar 24, 2018
  35. gladcow referenced this in commit 50858ef9e7 on Apr 4, 2018
  36. UdjinM6 referenced this in commit bc45a2f87a on Apr 11, 2018
  37. lateminer referenced this in commit 531d15ea84 on Oct 21, 2018
  38. andvgal referenced this in commit fd5c50bc2b on Jan 6, 2019
  39. CryptoCentric referenced this in commit dd3fd51204 on Feb 28, 2019
  40. bitcoin locked this on Sep 8, 2021

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-05-20 06:55 UTC