util: Add missing fstatfs to syscall sandbox #23555

pull MarcoFalke wants to merge 1 commits into bitcoin:master from MarcoFalke:2111-sand changing 1 files +2 −1
  1. MarcoFalke commented at 4:19 pm on November 19, 2021: member

    Looks like this is used by boost 1.77 in ./test/functional/wallet_backup.py --descriptors.

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

  2. util: Add missing fstatfs to syscall sandbox fade4b3aca
  3. DrahtBot added the label Utils/log/libs on Nov 19, 2021
  4. fanquake approved
  5. fanquake commented at 7:24 am on November 21, 2021: member

    ACK fade4b3aca5b78b6a8021289433616df9d06a87f - reproduced the failure on Tumbleweed:

     09815713497c5:/bitcoin # ./test/functional/wallet_backup.py --descriptors
     12021-11-21T07:11:10.648000Z TestFramework (INFO): Initializing test directory /tmp/bitcoin_func_test_ma4r2esy
     22021-11-21T07:11:11.514000Z TestFramework (INFO): Generating initial blockchain
     32021-11-21T07:11:15.931000Z TestFramework (INFO): Creating transactions
     42021-11-21T07:11:30.282000Z TestFramework (INFO): Backing up
     52021-11-21T07:11:30.303000Z TestFramework (INFO): More transactions
     62021-11-21T07:11:43.899000Z TestFramework (INFO): Restoring wallets on node 3 using backup files
     72021-11-21T07:11:44.287000Z TestFramework (ERROR): Unexpected exception caught during testing
     8Traceback (most recent call last):
     9  File "/bitcoin/test/functional/test_framework/authproxy.py", line 108, in _request
    10    return self._get_response()
    11  File "/bitcoin/test/functional/test_framework/authproxy.py", line 166, in _get_response
    12    http_response = self.__conn.getresponse()
    13  File "/usr/lib64/python3.8/http/client.py", line 1348, in getresponse
    14    response.begin()
    15  File "/usr/lib64/python3.8/http/client.py", line 316, in begin
    16    version, status, reason = self._read_status()
    17  File "/usr/lib64/python3.8/http/client.py", line 285, in _read_status
    18    raise RemoteDisconnected("Remote end closed connection without"
    19http.client.RemoteDisconnected: Remote end closed connection without response
    20
    21During handling of the above exception, another exception occurred:
    22
    23Traceback (most recent call last):
    24  File "/bitcoin/test/functional/test_framework/test_framework.py", line 132, in main
    25    self.run_test()
    26  File "./test/functional/wallet_backup.py", line 186, in run_test
    27    self.nodes[3].restorewallet("res0", backup_file_0)
    28  File "/bitcoin/test/functional/test_framework/coverage.py", line 49, in __call__
    29    return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
    30  File "/bitcoin/test/functional/test_framework/authproxy.py", line 142, in __call__
    31    response, status = self._request('POST', self.__url.path, postdata.encode('utf-8'))
    32  File "/bitcoin/test/functional/test_framework/authproxy.py", line 113, in _request
    33    self.__conn.request(method, path, postdata, headers)
    34  File "/usr/lib64/python3.8/http/client.py", line 1256, in request
    35    self._send_request(method, url, body, headers, encode_chunked)
    36  File "/usr/lib64/python3.8/http/client.py", line 1302, in _send_request
    37    self.endheaders(body, encode_chunked=encode_chunked)
    38  File "/usr/lib64/python3.8/http/client.py", line 1251, in endheaders
    39    self._send_output(message_body, encode_chunked=encode_chunked)
    40  File "/usr/lib64/python3.8/http/client.py", line 1011, in _send_output
    41    self.send(msg)
    42  File "/usr/lib64/python3.8/http/client.py", line 951, in send
    43    self.connect()
    44  File "/usr/lib64/python3.8/http/client.py", line 922, in connect
    45    self.sock = self._create_connection(
    46  File "/usr/lib64/python3.8/socket.py", line 808, in create_connection
    47    raise err
    48  File "/usr/lib64/python3.8/socket.py", line 796, in create_connection
    49    sock.connect(sa)
    50ConnectionRefusedError: [Errno 111] Connection refused
    512021-11-21T07:11:44.339000Z TestFramework (INFO): Stopping nodes
    522021-11-21T07:11:44.343000Z TestFramework.node3 (ERROR): Unable to stop node.
    53Traceback (most recent call last):
    54  File "/bitcoin/test/functional/test_framework/test_node.py", line 335, in stop_node
    55    self.stop(wait=wait)
    56  File "/bitcoin/test/functional/test_framework/coverage.py", line 49, in __call__
    57    return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
    58  File "/bitcoin/test/functional/test_framework/authproxy.py", line 142, in __call__
    59    response, status = self._request('POST', self.__url.path, postdata.encode('utf-8'))
    60  File "/bitcoin/test/functional/test_framework/authproxy.py", line 107, in _request
    61    self.__conn.request(method, path, postdata, headers)
    62  File "/usr/lib64/python3.8/http/client.py", line 1256, in request
    63    self._send_request(method, url, body, headers, encode_chunked)
    64  File "/usr/lib64/python3.8/http/client.py", line 1267, in _send_request
    65    self.putrequest(method, url, **skips)
    66  File "/usr/lib64/python3.8/http/client.py", line 1093, in putrequest
    67    raise CannotSendRequest(self.__state)
    68http.client.CannotSendRequest: Request-sent
    69Traceback (most recent call last):
    70  File "./test/functional/wallet_backup.py", line 238, in <module>
    71    WalletBackupTest().main()
    72  File "/bitcoin/test/functional/test_framework/test_framework.py", line 155, in main
    73    exit_code = self.shutdown()
    74  File "/bitcoin/test/functional/test_framework/test_framework.py", line 304, in shutdown
    75    self.stop_nodes()
    76  File "/bitcoin/test/functional/test_framework/test_framework.py", line 555, in stop_nodes
    77    node.stop_node(wait=wait, wait_until_stopped=False)
    78  File "/bitcoin/test/functional/test_framework/test_node.py", line 349, in stop_node
    79    raise AssertionError("Unexpected stderr {} != {}".format(stderr, expected_stderr))
    80AssertionError: Unexpected stderr ERROR: The syscall "fstatfs" (syscall number 138) is not allowed by the syscall sandbox in thread "httpworker.2". Please report.
    81terminate called without an active exception != 
    82[node 3] Cleaning up leftover process
    83[node 2] Cleaning up leftover process
    84[node 1] Cleaning up leftover process
    85[node 0] Cleaning up leftover process
    

    Confirmed this patch fixes the issue.

  6. MarcoFalke requested review from practicalswift on Nov 21, 2021
  7. fanquake merged this on Nov 21, 2021
  8. fanquake closed this on Nov 21, 2021

  9. MarcoFalke deleted the branch on Nov 21, 2021
  10. sidhujag referenced this in commit a9be71b2be on Nov 21, 2021
  11. sidhujag referenced this in commit e95aaab15a on Nov 23, 2021
  12. DrahtBot locked this on Nov 21, 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: 2024-12-19 06:12 UTC

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