The new test_lost_service() introduced in bitcoin/bitcoin#36759 fails intermittently on many platforms.
Here is a log from openSUSE Leap 16.1:
267/507 - feature_torcontrol.py failed (exit code 1), Duration: 37 s
stdout:
2026-12-03T02:40:56.278641Z TestFramework (INFO): PRNG seed is: 1836777943722001449
2026-12-03T02:40:56.282762Z TestFramework (INFO): Initializing test directory /__w/bitcoin-core-nightly/bitcoin-core-nightly/test_runner_₿_🏃_20261203_023710/feature_torcontrol_261
2026-12-03T02:40:56.555831Z TestFramework (INFO): Test Tor control basic functionality
2026-12-03T02:40:56.981101Z TestFramework (INFO): Test a later ADD_ONION reply without a service ID
2026-12-03T02:41:00.044929Z TestFramework (INFO): Test that partial Tor control responses are buffered until complete
2026-12-03T02:41:03.487202Z TestFramework (INFO): Test that -torpassword is sent hex-encoded, so special characters survive
2026-12-03T02:41:04.849600Z TestFramework (INFO): Test that ADD_ONION retries without PoW on 512 error
2026-12-03T02:41:06.606066Z TestFramework (INFO): Test that Tor control does not disconnect with a MAX_LINE_LENGTH line.
2026-12-03T02:41:08.608711Z TestFramework (INFO): Test that Tor control disconnects with a MAX_LINE_LENGTH + 1 line
2026-12-03T02:41:10.998637Z TestFramework (INFO): Test that Tor control does not disconnect on receiving MAX_LINE_COUNT lines.
2026-12-03T02:41:13.013683Z TestFramework (INFO): Test that Tor control disconnects on receiving MAX_LINE_COUNT + 1 lines.
2026-12-03T02:41:15.026771Z TestFramework (INFO): Test an invalid service ID returned by ADD_ONION
2026-12-03T02:41:17.456783Z TestFramework (INFO): Test that a valid returned private key is cached and reused
2026-12-03T02:41:20.151979Z TestFramework (INFO): Test 'SIGNAL SHUTDOWN' injected through a returned private key
2026-12-03T02:41:21.558637Z TestFramework (INFO): Test 'SIGNAL SHUTDOWN' injected through a cached private key
2026-12-03T02:41:22.915493Z TestFramework (INFO): Test 'Flags=Detach' injected through a returned private key
2026-12-03T02:41:24.250932Z TestFramework (INFO): Test 'Flags=Detach' injected through a cached private key
2026-12-03T02:41:29.763393Z TestFramework (INFO): Test that a connection closed by Tor is re-established with backoff
2026-12-03T02:41:32.255362Z TestFramework (INFO): Test that failing to connect to an explicitly set -torcontrol is logged as a warning
2026-12-03T02:41:32.684029Z TestFramework (INFO): Test that losing an active onion service is logged
2026-12-03T02:41:32.838215Z TestFramework (ERROR): Unexpected exception:
Traceback (most recent call last):
File "/__w/bitcoin-core-nightly/bitcoin-core-nightly/test/functional/test_framework/test_framework.py", line 149, in main
self.run_test()
~~~~~~~~~~~~~^^
File "/__w/bitcoin-core-nightly/bitcoin-core-nightly/build/test/functional/feature_torcontrol.py", line 432, in run_test
self.test_lost_service()
~~~~~~~~~~~~~~~~~~~~~~^^
File "/__w/bitcoin-core-nightly/bitcoin-core-nightly/build/test/functional/feature_torcontrol.py", line 346, in test_lost_service
self.restart_with_mock(mock_tor)
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
File "/__w/bitcoin-core-nightly/bitcoin-core-nightly/build/test/functional/feature_torcontrol.py", line 134, in restart_with_mock
mock_tor.start()
~~~~~~~~~~~~~~^^
File "/__w/bitcoin-core-nightly/bitcoin-core-nightly/build/test/functional/feature_torcontrol.py", line 37, in start
self.sock.bind(('127.0.0.1', self.port))
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: [Errno 98] Address already in use
2026-12-03T02:41:32.895595Z TestFramework (INFO): Not stopping nodes as test failed. The dangling processes will be cleaned up later.
2026-12-03T02:41:32.895796Z TestFramework (WARNING): Not cleaning up dir /__w/bitcoin-core-nightly/bitcoin-core-nightly/test_runner_₿_🏃_20261203_023710/feature_torcontrol_261
2026-12-03T02:41:32.895871Z TestFramework (ERROR): Test failed. Test logging available at /__w/bitcoin-core-nightly/bitcoin-core-nightly/test_runner_₿_🏃_20261203_023710/feature_torcontrol_261/test_framework.log
2026-12-03T02:41:32.896003Z TestFramework (ERROR):
2026-12-03T02:41:32.896135Z TestFramework (ERROR): Hint: Call /__w/bitcoin-core-nightly/bitcoin-core-nightly/test/functional/combine_logs.py '/__w/bitcoin-core-nightly/bitcoin-core-nightly/test_runner_₿_🏃_20261203_023710/feature_torcontrol_261' to consolidate all logs
2026-12-03T02:41:32.896212Z TestFramework (ERROR):
2026-12-03T02:41:32.896266Z TestFramework (ERROR): If this failure happened unexpectedly or intermittently, please file a bug and provide a link or upload of the combined log.
2026-12-03T02:41:32.896386Z TestFramework (ERROR): https://github.com/bitcoin/bitcoin/issues
2026-12-03T02:41:32.896443Z TestFramework (ERROR):
stderr: