test: wallet_miniscript.py fails with thread sanitizer #28800

issue Sjors opened this issue on November 6, 2023
  1. Sjors commented at 3:28 AM on November 6, 2023: member

    Is there an existing issue for this?

    • I have searched the existing issues

    Current behaviour

    Using clang version 15.0.7 on Ubuntu and enabling the thread sanitizer, the wallet_miniscript.py --descriptors test consistently fails with a timeout.

    Expected behaviour

    Don't timeout.

    I could of course increate the timeouts, but this is the only test with that issue.

    As an aside, the log output contains extremely long descriptors which should probably be truncated.

    Steps to reproduce

    ./autogen
    ./configure CC=clang CXX=clang++ --enable-suppress-external-warnings --with-sanitizers=thread --without-gui
    make -j33
    test/functional/wallet_miniscript.py --descriptors
    

    Relevant log output

    Full log: https://termbin.com/p81f

    2023-11-06T03:18:08.275000Z TestFramework (ERROR): JSONRPC error
    Traceback (most recent call last):
      File "/home/sjors/dev/bitcoin/test/functional/test_framework/authproxy.py", line 151, in _get_response
        http_response = self.__conn.getresponse()
      File "/home/sjors/.pyenv/versions/3.9.18/lib/python3.9/http/client.py", line 1377, in getresponse
        response.begin()
      File "/home/sjors/.pyenv/versions/3.9.18/lib/python3.9/http/client.py", line 320, in begin
        version, status, reason = self._read_status()
      File "/home/sjors/.pyenv/versions/3.9.18/lib/python3.9/http/client.py", line 281, in _read_status
        line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
      File "/home/sjors/.pyenv/versions/3.9.18/lib/python3.9/socket.py", line 704, in readinto
        return self._sock.recv_into(b)
    socket.timeout: timed out
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/home/sjors/dev/bitcoin/test/functional/test_framework/test_framework.py", line 132, in main
        self.run_test()
      File "/home/sjors/dev/bitcoin/test/functional/wallet_miniscript.py", line 386, in run_test
        self.signing_test(desc, None, None, 1, 3, None)
      File "/home/sjors/dev/bitcoin/test/functional/wallet_miniscript.py", line 258, in signing_test
        res = self.ms_sig_wallet.importdescriptors(
      File "/home/sjors/dev/bitcoin/test/functional/test_framework/coverage.py", line 50, in __call__
        return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
      File "/home/sjors/dev/bitcoin/test/functional/test_framework/authproxy.py", line 127, in __call__
        response, status = self._request('POST', self.__url.path, postdata.encode('utf-8'))
      File "/home/sjors/dev/bitcoin/test/functional/test_framework/authproxy.py", line 106, in _request
        return self._get_response()
      File "/home/sjors/dev/bitcoin/test/functional/test_framework/authproxy.py", line 153, in _get_response
        raise JSONRPCException({
    test_framework.authproxy.JSONRPCException: 'importdescriptors' RPC took longer than 240.000000 seconds. Consider using larger timeout for calls that take longer to return. (-344)
    2023-11-06T03:18:08.335000Z TestFramework (INFO): Stopping nodes
    2023-11-06T03:18:08.335000Z TestFramework.node0 (ERROR): Unable to stop node.
    Traceback (most recent call last):
      File "/home/sjors/dev/bitcoin/test/functional/test_framework/test_node.py", line 361, in stop_node
        self.stop(wait=wait)
      File "/home/sjors/dev/bitcoin/test/functional/test_framework/coverage.py", line 50, in __call__
        return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
      File "/home/sjors/dev/bitcoin/test/functional/test_framework/authproxy.py", line 127, in __call__
        response, status = self._request('POST', self.__url.path, postdata.encode('utf-8'))
      File "/home/sjors/dev/bitcoin/test/functional/test_framework/authproxy.py", line 105, in _request
        self.__conn.request(method, path, postdata, headers)
      File "/home/sjors/.pyenv/versions/3.9.18/lib/python3.9/http/client.py", line 1285, in request
        self._send_request(method, url, body, headers, encode_chunked)
      File "/home/sjors/.pyenv/versions/3.9.18/lib/python3.9/http/client.py", line 1296, in _send_request
        self.putrequest(method, url, **skips)
      File "/home/sjors/.pyenv/versions/3.9.18/lib/python3.9/http/client.py", line 1122, in putrequest
        raise CannotSendRequest(self.__state)
    http.client.CannotSendRequest: Request-sent
    

    How did you obtain Bitcoin Core

    Compiled from source

    What version of Bitcoin Core are you using?

    master@953d302a242381ae13112ea42f87d57e6e796147

    Operating system and version

    Ubuntu 23.04

    Machine specifications

    AMD Ryzen 7950x /tmp is mounted to tmpfs

  2. Sjors commented at 3:29 AM on November 6, 2023: member

    I'll try if @theStack's #28799 helps.

    Update: it does! Test finishes in 45 seconds rather than timing out after 240 seconds.

  3. maflcko commented at 9:19 AM on November 6, 2023: member

    This also happens on the qemu-s390x and valgrind CI tasks

  4. achow101 closed this on Nov 6, 2023

  5. Julio-Rats referenced this in commit 0f5e31ce7d on Jan 26, 2024
  6. knst referenced this in commit cc5d25a895 on Aug 27, 2024
  7. knst referenced this in commit ad17c63a7c on Aug 28, 2024
  8. knst referenced this in commit bf46e7a8e1 on Aug 29, 2024
  9. knst referenced this in commit 319824c1c0 on Sep 6, 2024
  10. bitcoin locked this on Nov 5, 2024

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-04 12:13 UTC

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