test: assert_debug_log timeouts follow-up #34622

pull maflcko wants to merge 2 commits into bitcoin:master from maflcko:2602-test-adl-follow-up changing 2 files +7 −5
  1. maflcko commented at 2:17 pm on February 19, 2026: member

    Small fixups that fell through. See the commit messages for details.

    Can be tested via:

     0diff --git a/src/util/thread.cpp b/src/util/thread.cpp
     1index 0fde73c..4fcfe4f 100644
     2--- a/src/util/thread.cpp
     3+++ b/src/util/thread.cpp
     4@@ -8,2 +8,3 @@
     5 #include <util/log.h>
     6+#include <util/time.h>
     7 #include <util/threadnames.h>
     8@@ -18,2 +19,3 @@ void util::TraceThread(std::string_view thread_name, std::function<void()> threa
     9     util::ThreadRename(std::string{thread_name});
    10+    UninterruptibleSleep(999ms);
    11     try {
    12diff --git a/src/validationinterface.cpp b/src/validationinterface.cpp
    13index c7be6ab..3237aec 100644
    14--- a/src/validationinterface.cpp
    15+++ b/src/validationinterface.cpp
    16@@ -14,2 +14,3 @@
    17 #include <primitives/transaction.h>
    18+#include <random.h>
    19 #include <util/check.h>
    20@@ -156,2 +157,4 @@ void ValidationSignals::SyncWithValidationInterfaceQueue()
    21 
    22+static FastRandomContext g_rnd{};
    23+
    24 // Use a macro instead of a function for conditional logging to prevent
    25@@ -166,2 +169,3 @@ void ValidationSignals::SyncWithValidationInterfaceQueue()
    26             LOG_EVENT(fmt, local_name, __VA_ARGS__);           \
    27+            if(g_rnd.randrange(2)<1)UninterruptibleSleep(55ms);\
    28             event();                                           \
    

    With this diff and without the changes here, the touched tests fail. With this diff and with the changes here, the touched tests pass.

    Fixes https://github.com/bitcoin/bitcoin/issues/34621

  2. DrahtBot added the label Tests on Feb 19, 2026
  3. DrahtBot commented at 2:17 pm on February 19, 2026: contributor

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

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK hodlinator, achow101

    If your review is incorrectly listed, please copy-paste <!–meta-tag:bot-skip–> into the comment that the bot should ignore.

  4. fanquake added this to the milestone 31.0 on Feb 19, 2026
  5. test: Add missing syncwithvalidationinterfacequeue
    This is required to actually erase the orphan transaction when the
    BlockConnected event is handled in the background validation interface
    queue thread.
    faed837f27
  6. test: Fixup assert_debug_log timeouts in feature_config_args.py
    * The bitcoin.conf related checks do not need any timeout, because the
      logging happens in the main thread, before the node is fully started.
    * The net thread related checks do need a timeout, because the threads
      may be late to start after the node is fully started.
    fa4424fd98
  7. maflcko force-pushed on Feb 20, 2026
  8. hodlinator approved
  9. hodlinator commented at 1:08 pm on February 20, 2026: contributor

    ACK fa4424fd98b6b6998e1f55c707400dae53d2b9e9

    Repro diff in PR description does indeed expose the timing sensitivity of these 2 functional tests wrt thread startups and logging.

    Tested repro diff with and without PR changes.

  10. achow101 commented at 0:38 am on February 21, 2026: member
    ACK fa4424fd98b6b6998e1f55c707400dae53d2b9e9
  11. achow101 merged this on Feb 21, 2026
  12. achow101 closed this on Feb 21, 2026


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-02-22 18:12 UTC

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