Page MenuHomePhabricator

rpc: Remove unused boost::this_thread::interruption_point
ClosedPublic

Authored by PiRK on Nov 4 2020, 07:59.

Details

Reviewers
majcosta
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Restricted Project
Commits
rABC96027f8aeee3: rpc: Remove unused boost::this_thread::interruption_point
Summary

There are predefined interruption points for boost::thread: https://www.boost.org/doc/libs/1_71_0/doc/html/thread/thread_management.html#interruption_points

However, the rpc threads are std::thread, which does not have an std::thread::interrupt member function to request interruption: https://dev.visucore.com/bitcoin/doxygen/httpserver_8cpp.html#ae1a63374e18b9abd348eb74e4243ea34

Thus, the interruption points can be removed.

This is a backport of Core PR17382

Test Plan

ninja all check-all

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Owners added a reviewer: Restricted Owners Package.Nov 4 2020, 07:59
PiRK requested review of this revision.Nov 4 2020, 07:59
PiRK retitled this revision from rpc: Remove unused boost::this_thread::interruption_point > There are predefined interruption points for boost::thread: https://www.boost.org/doc/libs/1_71_0/doc/html/thread/thread_management.html#interruption_points > > However, the rpc threads... to rpc: Remove unused boost::this_thread::interruption_point.

Failed tests logs:

====== Bitcoin ABC functional tests: p2p_invalid_messages.py ======

------- Stdout: -------
2020-11-04T08:17:33.822000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-without-wallet/test/tmp/test_runner_₿₵_  _20201104_081650/p2p_invalid_messages_197
2020-11-04T08:17:35.614000Z TestFramework.utils (ERROR): wait_until() failed. Predicate: ''''
        def test_function(): return not self.is_connected
'''
2020-11-04T08:17:35.614000Z TestFramework (ERROR): Assertion failed
Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_framework.py", line 120, in main
    self.run_test()
  File "/work/test/functional/p2p_invalid_messages.py", line 47, in run_test
    self.test_size()
  File "/work/test/functional/p2p_invalid_messages.py", line 197, in test_size
    conn.wait_for_disconnect(timeout=1)
  File "/work/test/functional/test_framework/mininode.py", line 435, in wait_for_disconnect
    wait_until(test_function, timeout=timeout, lock=mininode_lock)
  File "/work/test/functional/test_framework/util.py", line 269, in wait_until
    "Predicate {} not true after {} seconds".format(predicate_source, timeout))
AssertionError: Predicate ''''
        def test_function(): return not self.is_connected
''' not true after 1 seconds
2020-11-04T08:17:35.666000Z TestFramework (INFO): Stopping nodes
2020-11-04T08:17:36.270000Z TestFramework (WARNING): Not cleaning up dir /work/abc-ci-builds/build-without-wallet/test/tmp/test_runner_₿₵_  _20201104_081650/p2p_invalid_messages_197
2020-11-04T08:17:36.270000Z TestFramework (ERROR): Test failed. Test logging available at /work/abc-ci-builds/build-without-wallet/test/tmp/test_runner_₿₵_  _20201104_081650/p2p_invalid_messages_197/test_framework.log
2020-11-04T08:17:36.270000Z TestFramework (ERROR): Hint: Call /work/test/functional/combine_logs.py '/work/abc-ci-builds/build-without-wallet/test/tmp/test_runner_₿₵_  _20201104_081650/p2p_invalid_messages_197' to consolidate all logs

Each failure log is accessible here:
Bitcoin ABC functional tests: p2p_invalid_messages.py

Failed tests logs:

====== Bitcoin ABC functional tests: p2p_invalid_messages.py ======

Cannot reproduce locally.

$ ninja && test/functional/test_runner.py p2p_invalid_messages
[56/56] Linking CXX executable src/qt/bitcoin-qt
Starting Bitcoin ABC functional tests
Temporary test directory at /home/pierre/git/bitcoin-abc/build/test/tmp/test_runner_₿₵_🏃_20201104_111321
p2p_invalid_messages.py started
p2p_invalid_messages.py passed, Duration: 6 s

TEST                    | STATUS    | DURATION

p2p_invalid_messages.py | ✓ Passed  | 6 s

ALL                     | ✓ Passed  | 6 s (accumulated) 
Runtime: 6 s
This revision is now accepted and ready to land.Nov 4 2020, 16:29