Page MenuHomePhabricator

Fix rpc_bind flakiness
ClosedPublic

Authored by Fabien on Nov 10 2020, 09:54.

Details

Reviewers
PiRK
Group Reviewers
Restricted Project
Commits
rABC3779f54af708: Fix rpc_bind flakiness
Summary

Attempt to fix the rpc_bind.py flakiness:

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/rpc_bind.py", line 136, in run_test
    self._run_nonloopback_tests()
  File "/work/test/functional/rpc_bind.py", line 171, in
_run_nonloopback_tests
    [(self.non_loopback_ip, self.defaultport)])
  File "/work/test/functional/rpc_bind.py", line 72, in run_bind_test
    assert_equal(set(get_bind_addrs(pid)), set(expected))
  File "/work/test/functional/test_framework/netutil.py", line 87, in
get_bind_addrs
    inodes = get_socket_inodes(pid)
  File "/work/test/functional/test_framework/netutil.py", line 37, in
get_socket_inodes
    target = os.readlink(os.path.join(base, item))
FileNotFoundError: [Errno 2] No such file or directory:
'/proc/7775/fd/26'

This diff catches the case where a file descriptor is removed between
the time the content directory is listed and the time each link is
parsed. This can happen under normal circumstances and should not
cause the tests to fail.

Test Plan
./test/functional/test_runner.py rpc_bind

Diff Detail

Repository
rABC Bitcoin ABC
Branch
fix_rpc_bind_flakiness
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 15086
Build 30122: Build Diffbuild-diff · build-debug · build-without-wallet · build-clang-tidy · build-clang
Build 30121: arc lint + arc unit

Event Timeline

Fabien requested review of this revision.Nov 10 2020, 09:54
Fabien planned changes to this revision.
Fabien requested review of this revision.Nov 10 2020, 13:29
Fabien retitled this revision from [WIP] Fix rpc_bind flakiness to Fix rpc_bind flakiness.

Ran successfully 10x the linux 32 build which is one of the most frequent failure. It doesn't prove the the issue is fixed but it doesn't make it worst.

Fabien planned changes to this revision.Nov 10 2020, 15:01
Fabien edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Feb 3 2021, 12:19
This revision was automatically updated to reflect the committed changes.