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:

    9815713497c5:/bitcoin # ./test/functional/wallet_backup.py --descriptors
    2021-11-21T07:11:10.648000Z TestFramework (INFO): Initializing test directory /tmp/bitcoin_func_test_ma4r2esy
    2021-11-21T07:11:11.514000Z TestFramework (INFO): Generating initial blockchain
    2021-11-21T07:11:15.931000Z TestFramework (INFO): Creating transactions
    2021-11-21T07:11:30.282000Z TestFramework (INFO): Backing up
    2021-11-21T07:11:30.303000Z TestFramework (INFO): More transactions
    2021-11-21T07:11:43.899000Z TestFramework (INFO): Restoring wallets on node 3 using backup files
    2021-11-21T07:11:44.287000Z TestFramework (ERROR): Unexpected exception caught during testing
    Traceback (most recent call last):
      File "/bitcoin/test/functional/test_framework/authproxy.py", line 108, in _request
        return self._get_response()
      File "/bitcoin/test/functional/test_framework/authproxy.py", line 166, in _get_response
        http_response = self.__conn.getresponse()
      File "/usr/lib64/python3.8/http/client.py", line 1348, in getresponse
        response.begin()
      File "/usr/lib64/python3.8/http/client.py", line 316, in begin
        version, status, reason = self._read_status()
      File "/usr/lib64/python3.8/http/client.py", line 285, in _read_status
        raise RemoteDisconnected("Remote end closed connection without"
    http.client.RemoteDisconnected: Remote end closed connection without response
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/bitcoin/test/functional/test_framework/test_framework.py", line 132, in main
        self.run_test()
      File "./test/functional/wallet_backup.py", line 186, in run_test
        self.nodes[3].restorewallet("res0", backup_file_0)
      File "/bitcoin/test/functional/test_framework/coverage.py", line 49, in __call__
        return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
      File "/bitcoin/test/functional/test_framework/authproxy.py", line 142, in __call__
        response, status = self._request('POST', self.__url.path, postdata.encode('utf-8'))
      File "/bitcoin/test/functional/test_framework/authproxy.py", line 113, in _request
        self.__conn.request(method, path, postdata, headers)
      File "/usr/lib64/python3.8/http/client.py", line 1256, in request
        self._send_request(method, url, body, headers, encode_chunked)
      File "/usr/lib64/python3.8/http/client.py", line 1302, in _send_request
        self.endheaders(body, encode_chunked=encode_chunked)
      File "/usr/lib64/python3.8/http/client.py", line 1251, in endheaders
        self._send_output(message_body, encode_chunked=encode_chunked)
      File "/usr/lib64/python3.8/http/client.py", line 1011, in _send_output
        self.send(msg)
      File "/usr/lib64/python3.8/http/client.py", line 951, in send
        self.connect()
      File "/usr/lib64/python3.8/http/client.py", line 922, in connect
        self.sock = self._create_connection(
      File "/usr/lib64/python3.8/socket.py", line 808, in create_connection
        raise err
      File "/usr/lib64/python3.8/socket.py", line 796, in create_connection
        sock.connect(sa)
    ConnectionRefusedError: [Errno 111] Connection refused
    2021-11-21T07:11:44.339000Z TestFramework (INFO): Stopping nodes
    2021-11-21T07:11:44.343000Z TestFramework.node3 (ERROR): Unable to stop node.
    Traceback (most recent call last):
      File "/bitcoin/test/functional/test_framework/test_node.py", line 335, in stop_node
        self.stop(wait=wait)
      File "/bitcoin/test/functional/test_framework/coverage.py", line 49, in __call__
        return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
      File "/bitcoin/test/functional/test_framework/authproxy.py", line 142, in __call__
        response, status = self._request('POST', self.__url.path, postdata.encode('utf-8'))
      File "/bitcoin/test/functional/test_framework/authproxy.py", line 107, in _request
        self.__conn.request(method, path, postdata, headers)
      File "/usr/lib64/python3.8/http/client.py", line 1256, in request
        self._send_request(method, url, body, headers, encode_chunked)
      File "/usr/lib64/python3.8/http/client.py", line 1267, in _send_request
        self.putrequest(method, url, **skips)
      File "/usr/lib64/python3.8/http/client.py", line 1093, in putrequest
        raise CannotSendRequest(self.__state)
    http.client.CannotSendRequest: Request-sent
    Traceback (most recent call last):
      File "./test/functional/wallet_backup.py", line 238, in <module>
        WalletBackupTest().main()
      File "/bitcoin/test/functional/test_framework/test_framework.py", line 155, in main
        exit_code = self.shutdown()
      File "/bitcoin/test/functional/test_framework/test_framework.py", line 304, in shutdown
        self.stop_nodes()
      File "/bitcoin/test/functional/test_framework/test_framework.py", line 555, in stop_nodes
        node.stop_node(wait=wait, wait_until_stopped=False)
      File "/bitcoin/test/functional/test_framework/test_node.py", line 349, in stop_node
        raise AssertionError("Unexpected stderr {} != {}".format(stderr, expected_stderr))
    AssertionError: Unexpected stderr ERROR: The syscall "fstatfs" (syscall number 138) is not allowed by the syscall sandbox in thread "httpworker.2". Please report.
    terminate called without an active exception != 
    [node 3] Cleaning up leftover process
    [node 2] Cleaning up leftover process
    [node 1] Cleaning up leftover process
    [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: 2026-05-02 18:14 UTC

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