test: bump test timeouts so that functional tests run in valgrind #17770

pull michiboo wants to merge 1 commits into bitcoin:master from michiboo:bump changing 9 files +22 −9
  1. michiboo commented at 6:56 AM on December 18, 2019: contributor

    ci/tests: Bump timeouts so all functional tests run on travis in valgrind #17763

  2. DrahtBot added the label Tests on Dec 18, 2019
  3. in test/functional/feature_block.py:551 in 0d6312d5b9 outdated
     547 | @@ -548,7 +548,7 @@ def run_test(self):
     548 |          tx.rehash()
     549 |          new_txs.append(tx)
     550 |          self.update_block(40, new_txs)
     551 | -        self.send_blocks([b40], success=False, reject_reason='bad-blk-sigops', reconnect=True)
     552 | +        self.send_blocks([b40], success=False, reject_reason='bad-blk-sigops', reconnect=True, timeout=200)
    


    MarcoFalke commented at 3:14 PM on December 18, 2019:

    You might just bump the default in def send_blocks(....

    However, feature_block.py might be the hardest to get right, as it includes a 1080 block reorg. Not sure how long that will take, but you might want to export TEST_RUNNER_EXTRA="--exclude feature_block for now.

  4. in test/functional/interface_rest.py:290 in f6fa5e0d8b outdated
     284 | @@ -285,9 +285,9 @@ def run_test(self):
     285 |  
     286 |          # Make 3 tx and mine them on node 1
     287 |          txs = []
     288 | -        txs.append(self.nodes[0].sendtoaddress(not_related_address, 11))
     289 | -        txs.append(self.nodes[0].sendtoaddress(not_related_address, 11))
     290 | -        txs.append(self.nodes[0].sendtoaddress(not_related_address, 11))
     291 | +        txs.append(self.nodes[0].sendtoaddress(not_related_address, 11, timeout=120))
     292 | +        txs.append(self.nodes[0].sendtoaddress(not_related_address, 11, timeout=120))
     293 | +        txs.append(self.nodes[0].sendtoaddress(not_related_address, 11, timeout=120))
    


    MarcoFalke commented at 5:03 PM on December 19, 2019:

    rpc calls don't have a timeout argument.

    Also, this test properly failed with an uninitialized read:

     node0 stderr ==27834== Thread 7 b-httpworker.2:
    
    ==27834== Conditional jump or move depends on uninitialised value(s)
    
    ==27834==    at 0x204563: rest_blockhash_by_height(HTTPRequest*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (rest.cpp:611)
    
    ==27834==    by 0x20B4C8: std::_Function_handler<bool (HTTPRequest*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&), bool (*)(HTTPRequest*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)>::_M_invoke(std::_Any_data const&, HTTPRequest*&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (std_function.h:301)
    
    ==27834==    by 0x3B90B4: operator() (std_function.h:706)
    
    ==27834==    by 0x3B90B4: HTTPWorkItem::operator()() (httpserver.cpp:55)
    
    ==27834==    by 0x3B988D: WorkQueue<HTTPClosure>::Run() (httpserver.cpp:114)
    
    ==27834==    by 0x3B5968: HTTPWorkQueueRun(WorkQueue<HTTPClosure>*, int) (httpserver.cpp:342)
    
    ==27834==    by 0x3BA1CA: __invoke_impl<void, void (*)(WorkQueue<HTTPClosure> *, int), WorkQueue<HTTPClosure> *, int> (invoke.h:60)
    
    ==27834==    by 0x3BA1CA: __invoke<void (*)(WorkQueue<HTTPClosure> *, int), WorkQueue<HTTPClosure> *, int> (invoke.h:95)
    
    ==27834==    by 0x3BA1CA: _M_invoke<0, 1, 2> (thread:234)
    
    ==27834==    by 0x3BA1CA: operator() (thread:243)
    
    ==27834==    by 0x3BA1CA: std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (*)(WorkQueue<HTTPClosure>*, int), WorkQueue<HTTPClosure>*, int> > >::_M_run() (thread:186)
    
    ==27834==    by 0x662A66E: ??? (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.25)
    
    ==27834==    by 0x54876DA: start_thread (pthread_create.c:463)
    
    ==27834==    by 0x6FCD88E: clone (clone.S:95)
    
    ==27834== 
    
    {
       Temporary suppression of uninitialized read in rest code
       Memcheck:Cond
       fun:_ZL24rest_blockhash_by_heightP11HTTPRequestRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
    } 
    

    Not sure how that could have happened, so you might want to add the suppression for now to the valgrind.supp file


    practicalswift commented at 9:31 PM on December 19, 2019:

    Hrmm, that is super weird. Valgrind false positives are very rare, but I'm unable to reproduce. How the heck was this triggered? :)

  5. in ci/test/00_setup_env_native_valgrind.sh:8 in f6fa5e0d8b outdated
       4 | @@ -5,11 +5,10 @@
       5 |  # file COPYING or http://www.opensource.org/licenses/mit-license.php.
       6 |  
       7 |  export LC_ALL=C.UTF-8
       8 | -
       9 | +export TEST_RUNNER_EXTRA="--exclude feature_block"
    


    MarcoFalke commented at 6:27 PM on December 19, 2019:

    temporarily, for faster ci runs, you can also export RUN_UNIT_TESTS=false

  6. in test/functional/interface_rest.py:167 in 2d373d1bbf outdated
     163 | @@ -164,7 +164,7 @@ def run_test(self):
     164 |          # found with or without /checkmempool.
     165 |  
     166 |          # do a tx and don't sync
     167 | -        txid = self.nodes[0].sendtoaddress(self.nodes[1].getnewaddress(), 0.1)
     168 | +        txid = self.nodes[0].sendtoaddress(self.nodes[1].getnewaddress(), 0.1, timeout=120)
    


    MarcoFalke commented at 2:09 PM on December 20, 2019:

    As mentioned previously, RPCs don't have timeout argument

  7. MarcoFalke commented at 1:04 AM on December 25, 2019: member

    Last failure: https://travis-ci.org/bitcoin/bitcoin/jobs/629019510#L3660

    Re-run ci, to see if it is reproducible.

  8. MarcoFalke closed this on Dec 25, 2019

  9. MarcoFalke reopened this on Dec 25, 2019

  10. in ci/test/00_setup_env_native_valgrind.sh:8 in 80b062cdf7 outdated
       4 | @@ -5,11 +5,11 @@
       5 |  # file COPYING or http://www.opensource.org/licenses/mit-license.php.
       6 |  
       7 |  export LC_ALL=C.UTF-8
       8 | -
       9 | +export TEST_RUNNER_EXTRA="--exclude feature_block"
    


    MarcoFalke commented at 12:19 PM on December 25, 2019:

    If the feature_abortnode test is causing issues that are non-trivial to fix, you might exclude it for now:

    export TEST_RUNNER_EXTRA="--exclude feature_block,feature_abortnode"
    
  11. in ci/test/00_setup_env_native_valgrind.sh:8 in b806e364dc outdated
       4 | @@ -5,11 +5,11 @@
       5 |  # file COPYING or http://www.opensource.org/licenses/mit-license.php.
       6 |  
       7 |  export LC_ALL=C.UTF-8
       8 | -
       9 | +export TEST_RUNNER_EXTRA="--exclude feature_block,feature_abortnode,wallet_createwallet"
    


    MarcoFalke commented at 11:46 AM on January 3, 2020:
    export TEST_RUNNER_EXTRA="--exclude feature_block,rpc_bind.py --ipv4,feature_abortnode,wallet_createwallet"
    

    Due to failure here: https://travis-ci.org/bitcoin/bitcoin/jobs/632228754#L2879

  12. in test/functional/feature_abortnode.py:45 in b806e364dc outdated
      39 | @@ -40,9 +40,9 @@ def run_test(self):
      40 |  
      41 |              # Check that node0 aborted
      42 |              self.log.info("Waiting for crash")
      43 | -            wait_until(lambda: self.nodes[0].is_node_stopped(), timeout=60)
      44 | +            wait_until(lambda: self.nodes[0].is_node_stopped(), timeout=200)
      45 |          self.log.info("Node crashed - now verifying restart fails")
      46 | -        self.nodes[0].assert_start_raises_init_error()
      47 | +        self.nodes[0].assert_start_raises_init_error(timeout=200)
    


    MarcoFalke commented at 11:47 AM on January 3, 2020:

    This does not have a timeout argument. Please reset the change.

  13. fanquake renamed this:
    bump test timeouts so all functional test run on CI (WIP)
    [WIP] test: bump test timeouts so all functional tests run on CI
    on Jan 8, 2020
  14. MarcoFalke commented at 11:04 PM on January 9, 2020: member

    To fix the wallet_groups timeout, you might need a diff that looks like:

    diff --git a/test/functional/wallet_groups.py b/test/functional/wallet_groups.py
    index 3cf8aaf3d..f2fa1d3e4 100755
    --- a/test/functional/wallet_groups.py
    +++ b/test/functional/wallet_groups.py
    @@ -16,7 +16,7 @@ class WalletGroupTest(BitcoinTestFramework):
             self.setup_clean_chain = True
             self.num_nodes = 3
             self.extra_args = [[], [], ['-avoidpartialspends']]
    -        self.rpc_timeout = 120
    +        self.rpc_timeout = 240
     
         def skip_test_if_missing_module(self):
             self.skip_if_no_wallet()
    
  15. DrahtBot commented at 9:34 AM on January 14, 2020: 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:

    • #16539 (wallet: lower -txmaxfee default from 0.1 to 0.01 BTC by Sjors)

    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.

  16. in ci/test/00_setup_env_native_valgrind.sh:8 in 0cbb3518c8 outdated
       4 | @@ -5,11 +5,11 @@
       5 |  # file COPYING or http://www.opensource.org/licenses/mit-license.php.
       6 |  
       7 |  export LC_ALL=C.UTF-8
       8 | -
       9 | +export TEST_RUNNER_EXTRA="--exclude feature_block,rpc_bind,feature_abortnode,wallet_createwallet"
    


    MarcoFalke commented at 7:41 PM on January 14, 2020:
    export TEST_RUNNER_EXTRA="--exclude feature_block,rpc_bind,feature_abortnode,wallet_createwallet,wallet_multiwallet"
    

    Maybe exclude this for now due to the failure https://travis-ci.org/bitcoin/bitcoin/jobs/636719655#L4607

  17. MarcoFalke commented at 4:24 PM on January 15, 2020: member

    Looks like feature_assumevalid needs the self.rpc_timeout = 240 bumped as well. Also, there are about 10 tests left which don't run. You could remove the --failfast in ci/test/06_script_b.sh temporarily to run them all even if one fails.

  18. MarcoFalke commented at 1:49 PM on January 20, 2020: member

    Ok, down to three failures :rocket:

    feature_assumevalid.py | ✖ Failed | 206 s feature_cltv.py | ✖ Failed | 205 s

    I think they can be excluded for now because they mine too many blocks

    feature_help.py | ✖ Failed | 5 s

    Timeout should be bumped here, probably

  19. practicalswift commented at 4:07 PM on January 21, 2020: contributor

    Concept ACK

    Nice first-time contribution! Welcome as a contributor @michiboo :)

  20. MarcoFalke commented at 5:32 PM on January 21, 2020: member

    ok, one more timeout on travis. Might want to bump that and remove the temporary workarounds in the ci files (failfast and UNIT_TESTS=false).

    Then it should be ready for merge.

  21. MarcoFalke renamed this:
    [WIP] test: bump test timeouts so all functional tests run on CI
    [WIP] test: bump test timeouts so that functional tests run in valgrind
    on Jan 21, 2020
  22. MarcoFalke renamed this:
    [WIP] test: bump test timeouts so that functional tests run in valgrind
    test: bump test timeouts so that functional tests run in valgrind
    on Jan 21, 2020
  23. MarcoFalke commented at 5:34 PM on January 21, 2020: member

    Also could adjust the commit title to match the pull request title, which is a bit more descriptive.

  24. michiboo commented at 5:32 AM on January 22, 2020: contributor

    Hi There is error: The job exceeded the maximum time limit for jobs, and has been terminated.

    Not sure how to avoid this.

  25. in ci/test/00_setup_env_native_valgrind.sh:8 in d0b228001c outdated
       4 | @@ -5,11 +5,10 @@
       5 |  # file COPYING or http://www.opensource.org/licenses/mit-license.php.
       6 |  
       7 |  export LC_ALL=C.UTF-8
       8 | -
       9 | +export TEST_RUNNER_EXTRA="--exclude feature_block,rpc_bind,feature_assumevalid,feature_cltv,feature_abortnode,wallet_createwallet,wallet_multiwallet"
    


    MarcoFalke commented at 9:50 PM on January 23, 2020:

    ok, then maybe revert the changes to this file altogether, but I'd still like to get this merged. The timeout changes help me running the valgrind tests on my own ci infrastructure. We can look into how to enable them on travis later on.

  26. MarcoFalke approved
  27. MarcoFalke commented at 9:50 PM on January 23, 2020: member

    ACK. Let's look at travis some time later, but I'd like to get the bumped timeouts in, so that I can start running valgrind on my infrastructure.

  28. bump test timeouts so that functional tests run in valgrind 2d23082cbe
  29. in ci/test/00_setup_env_native_valgrind.sh:12 in cc6e1121e8 outdated
       4 | @@ -5,11 +5,9 @@
       5 |  # file COPYING or http://www.opensource.org/licenses/mit-license.php.
       6 |  
       7 |  export LC_ALL=C.UTF-8
       8 | -
       9 |  export PACKAGES="valgrind clang llvm python3-zmq libevent-dev bsdmainutils libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-test-dev libboost-thread-dev libdb5.3++-dev libminiupnpc-dev libzmq3-dev"
      10 |  export USE_VALGRIND=1
      11 |  export NO_DEPENDS=1
      12 | -export TEST_RUNNER_EXTRA="p2p_segwit.py"  # Only run one test for now. TODO enable all and bump timeouts
    


    MarcoFalke commented at 2:05 PM on January 24, 2020:

    please reset all changes in this file to restore the inital state of the travis config

  30. MarcoFalke referenced this in commit c26b05c2b7 on Jan 25, 2020
  31. MarcoFalke merged this on Jan 25, 2020
  32. MarcoFalke closed this on Jan 25, 2020

  33. fanquake referenced this in commit d7120f7f78 on May 5, 2020
  34. MarcoFalke referenced this in commit 52ce396b2a on May 5, 2020
  35. sidhujag referenced this in commit df07326029 on May 5, 2020
  36. deadalnix referenced this in commit 4fa05d2a2a on Nov 18, 2020
  37. DrahtBot locked this on Feb 15, 2022

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-15 00:14 UTC

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