-
Notifications
You must be signed in to change notification settings - Fork 961
More test flake fixes #8472
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
rustyrussell
merged 10 commits into
ElementsProject:master
from
rustyrussell:guilt/fix-flakes22
Sep 30, 2025
Merged
More test flake fixes #8472
rustyrussell
merged 10 commits into
ElementsProject:master
from
rustyrussell:guilt/fix-flakes22
Sep 30, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
endothermicdev
approved these changes
Aug 20, 2025
Collaborator
endothermicdev
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 2362d67
cb9e6b1 to
6be0982
Compare
…rnings. Signed-off-by: Rusty Russell <[email protected]>
This message is logged when connectd tries to shut down a peer connection but the transmit buffer remains full for too long, maybe because the peer has crashed or has lost connectivity. Logging this message at the BROKEN level is inappropriate because BROKEN is intended to flag logic errors that imply incorrect code in CLN. The error in question here is actually a runtime error, which does not imply incorrect code (at least on our side), so demote the log message to the UNUSUAL level. (Even this is still probably too severe, as this message is logged rather more frequently than "unusual" would suggest.) Changelog-None Closes: ElementsProject#5678
…d_chans_leases
```
FAILED tests/test_bookkeeper.py::test_bookkeeping_missed_chans_leases - AssertionError: assert [{'tag': 'channel_open', 'credit_msat': 506268000, 'debit_msat': 0}, {'tag': 'lease_fee', 'credit_msat': 0, 'debit_msat': 6268000}, {'tag': 'invoice', 'credit_msat': 0, 'debit_msat': 11000000}, {'tag': 'onchain_fee', 'credit_msat': 1314000, 'debit_msat': 0}] == [{'tag': 'channel_open', 'credit_msat': 506268000, 'debit_msat': 0}, {'tag': 'lease_fee', 'credit_msat': 0, 'debit_msat': 6268000}, {'tag': 'onchain_fee', 'credit_msat': 1314000, 'debit_msat': 0}, {'tag': 'invoice', 'credit_msat': 0, 'debit_msat': 11000000}]
At index 2 diff: {'tag': 'invoice', 'credit_msat': 0, 'debit_msat': 11000000} != {'tag': 'onchain_fee', 'credit_msat': 1314000, 'debit_msat': 0}
Full diff:
[
{
'credit_msat': 506268000,
'debit_msat': 0,
'tag': 'channel_open',
},
{
'credit_msat': 0,
'debit_msat': 6268000,
'tag': 'lease_fee',
},
{
+ 'credit_msat': 0,
+ 'debit_msat': 11000000,
+ 'tag': 'invoice',
+ },
+ {
'credit_msat': 1314000,
'debit_msat': 0,
'tag': 'onchain_fee',
},
- {
- 'credit_msat': 0,
- 'debit_msat': 11000000,
- 'tag': 'invoice',
- },
]
```
Signed-off-by: Rusty Russell <[email protected]>
Don't test installing a plugin under valgrind. There's no way to
increase reckless' (completely reasonable) 15 seconds timeout, and that
can happen under valgrind & CI:
```
def test_reckless_uv_install(node_factory):
node = get_reckless_node(node_factory)
node.start()
r = reckless([f"--network={NETWORK}", "-v", "install", "testpluguv"],
dir=node.lightning_dir)
> assert r.returncode == 0
E assert 1 == 0
E + where 1 = self.returncode, self.stdout, self.stderr.returncode
tests/test_reckless.py:359: AssertionError
...
***RECKLESS STDERR***
config file not found: /tmp/ltests-tui1vmrg/test_reckless_uv_install_1/lightning-1/regtest/config
press [Y] to create one now.
config file not found: /tmp/ltests-tui1vmrg/test_reckless_uv_install_1/lightning-1/reckless/regtest-reckless.conf
config file not found: /tmp/ltests-tui1vmrg/test_reckless_uv_install_1/lightning-1/reckless/.sources
Traceback (most recent call last):
File "/home/runner/work/lightning/lightning/tools/reckless", line 2091, in <module>
log.add_result(args.func(target))
File "/home/runner/work/lightning/lightning/tools/reckless", line 1524, in install
return _enable_installed(installed, plugin_name)
File "/home/runner/work/lightning/lightning/tools/reckless", line 1476, in _enable_installed
if enable(installed.name):
File "/home/runner/work/lightning/lightning/tools/reckless", line 1647, in enable
lightning_cli('plugin', 'start', path)
File "/home/runner/work/lightning/lightning/tools/reckless", line 1613, in lightning_cli
clncli = run(cmd, stdout=PIPE, stderr=PIPE, check=False, timeout=timeout)
File "/opt/hostedtoolcache/Python/3.10.18/x64/lib/python3.10/subprocess.py", line 505, in run
stdout, stderr = process.communicate(input, timeout=timeout)
File "/opt/hostedtoolcache/Python/3.10.18/x64/lib/python3.10/subprocess.py", line 1154, in communicate
stdout, stderr = self._communicate(input, endtime, timeout)
File "/opt/hostedtoolcache/Python/3.10.18/x64/lib/python3.10/subprocess.py", line 2022, in _communicate
self._check_timeout(endtime, orig_timeout, stdout, stderr)
File "/opt/hostedtoolcache/Python/3.10.18/x64/lib/python3.10/subprocess.py", line 1198, in _check_timeout
raise TimeoutExpired(
subprocess.TimeoutExpired: Command '['/home/runner/work/lightning/lightning/cli/lightning-cli', '--network=regtest', '--lightning-dir=/tmp/ltests-tui1vmrg/test_reckless_uv_install_1/lightning-1', 'plugin', 'start', '/tmp/ltests-tui1vmrg/test_reckless_uv_install_1/lightning-1/reckless/testpluguv/testpluguv.py']' timed out after 15 seconds
```
Signed-off-by: Rusty Russell <[email protected]>
868bc5d to
d26e490
Compare
…inmoves_unilateral_htlc_timeout
DER sigs! Normally, the commitment weight is:
```
Anchorspend for local commit tx fee 9751sat (w=722), commit_tx fee 4866sat (w=1284): package feerate 7286 perkw
Creating anchor spend for local commit tx 6a0816ca60d499edc70bfb786ebd164fb7a55d234c84d926102f5bd35087fd45: we're paying fee 9751sat
```
But if we're "lucky" the commitment tx is shorter:
```
Anchorspend for local commit tx fee 9744sat (w=722), commit_tx fee 4866sat (w=1283): package feerate 7286 perkw
Creating anchor spend for local commit tx acf78532a9448dd62a4e6319a3d2712189a88b6e59abc637260067d60df70782: we're paying fee 9744sat
```
The resulting failure:
```
2025-08-21T02:30:34.1906751Z > assert moves == expected
...
...
2025-08-21T02:30:34.1965346Z E {
2025-08-21T02:30:34.1965529Z E 'account_id': 'wallet',
2025-08-21T02:30:34.1965767Z E 'blockheight': 104,
2025-08-21T02:30:34.1965997Z E 'created_index': 6,
2025-08-21T02:30:34.1966229Z E - 'credit_msat': 15579000,
2025-08-21T02:30:34.1966467Z E ? ^^
2025-08-21T02:30:34.1966698Z E + 'credit_msat': 15586000,
2025-08-21T02:30:34.1966927Z E ? ^^
2025-08-21T02:30:34.1967150Z E 'debit_msat': 0,
2025-08-21T02:30:34.1967376Z E 'extra_tags': [],
2025-08-21T02:30:34.1967599Z E - 'output_msat': 15579000,
2025-08-21T02:30:34.1967832Z E ? ^^
2025-08-21T02:30:34.1968061Z E + 'output_msat': 15586000,
2025-08-21T02:30:34.1968294Z E ? ^^
2025-08-21T02:30:34.1968540Z E 'primary_tag': 'deposit',
2025-08-21T02:30:34.1968908Z E 'utxo': 'acf78532a9448dd62a4e6319a3d2712189a88b6e59abc637260067d60df70782:0',
2025-08-21T02:30:34.1969366Z E },
```
Signed-off-by: Rusty Russell <[email protected]>
1. Establish a channel with l3; we already have one with l2. 2. Don't bother generating 6 more blocks (fundchannel ensures it's mined). 3. Allow htlcs to be empty: Whitslack reported that happens for him 4. Use only_one() to access where we insist there is only one element in the list. 5. Tighten tests to assert the exact contents, not just test some. Signed-off-by: Rusty Russell <[email protected]> Fixes: ElementsProject#8497
Also, resulting log was huge, so suppress log level (will probably speed test)
```
2025-09-02T06:01:39.4881086Z > l1.rpc.plugin_start(os.path.join(os.getcwd(), 'plugins/cln-askrene'))
2025-09-02T06:01:39.4881090Z
2025-09-02T06:01:39.4881174Z tests/test_xpay.py:279:
...
2025-09-02T06:01:39.4883193Z > self.sock.connect(str(self.path))
2025-09-02T06:01:39.4883340Z E ConnectionRefusedError: [Errno 111] Connection refused
...
2025-09-02T06:01:41.7767610Z lightningd-1 2025-09-02T06:01:27.235Z **BROKEN** plugin-cln-xpay: askrene-age failed with {"code":-4, "message":"Plugin terminated before replying to RPC call."}
2025-09-02T06:01:41.7768127Z lightningd-1 2025-09-02T06:01:27.305Z INFO plugin-cln-xpay: Killing plugin: exited during normal operation
```
Signed-off-by: Rusty Russell <[email protected]>
We can stop listening on the incoming peer while we are closing, so we don't notice if they close: ``` ['lightningd-2 2025-09-03T09:48:19.555Z **BROKEN** 0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518-connectd: Peer did not close, forcing close', 'lightningd-2 2025-09-03T09:48:22.918Z **BROKEN** 0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518-connectd: Peer did not close, forcing close'] =========================== short test summary info ============================ ERROR tests/test_misc.py::test_even_sendcustommsg - ValueError: ``` Signed-off-by: Rusty Russell <[email protected]>
Something changed in Matt's example:
error: {'code': -32700, 'data': None, 'message': 'failed to fetch payment instructions: HrnResolutionError("Multiple TXT records existed for the HRN, which is invalid")'}
Signed-off-by: Rusty Russell <[email protected]>
``` 2025-09-30T00:07:37.3118831Z _________________ ERROR at teardown of test_route_by_old_scid __________________ ... 2025-09-30T00:07:37.3131523Z request.node.has_errors = True 2025-09-30T00:07:37.3131989Z > raise ValueError(str(errors)) 2025-09-30T00:07:37.3132834Z E ValueError: 2025-09-30T00:07:37.3133226Z E Node errors: 2025-09-30T00:07:37.3133632Z E - lightningd-1: had warning messages 2025-09-30T00:07:37.3134086Z E Global errors: ... 2025-09-30T00:07:37.5835258Z lightningd-2 2025-09-30T00:04:24.544Z TRACE 0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518-gossipd: Bad gossip order: channel_announcement: no unspent txout 109x1x1 2025-09-30T00:07:37.5835659Z lightningd-2 2025-09-30T00:04:24.544Z DEBUG 0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518-connectd: peer_out WIRE_WARNING ``` Signed-off-by: Rusty Russell <[email protected]>
3bb71ed to
1ca1813
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This contains a new magic string for CI to complain about, then steal's Matt's commit which reduces severity.
Closes #8466