Conversation
…eadlines After l1 stopped, the old stub dialled l1's now-free gRPC port while l2 listened on a different one, so the test never checked a foreign certificate against a live node. Its gRPC calls also had no deadline: when the client keeps retrying a handshake the server rejects, the call blocked forever and hung the test. Start l2 on l1's port, connect to 127.0.0.1 explicitly, and give every call a deadline. The call with the wrong credentials may now end in DEADLINE_EXCEEDED as well as UNAVAILABLE; both mean it was refused. Changelog-None Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
hash_nodeid() read the 33-byte node id through a size_t pointer. That is undefined behaviour, and at -O3 the compiler is entitled to hoist that load above the `bias->node = *node` copy in set_node_bias(), since a u8 array and a size_t cannot alias. The entry then went into the table under the hash of uninitialised memory and later lookups missed it, so every load of a persistent layer created a second node_biases entry for the same node. With load_node_bias() now setting the two directions in two calls, the second call trips the NODUPS assertion in node_bias_hash_add() and askrene, an important plugin, takes lightningd down with it. Hash the whole key with siphash, as hash_str() below already does. Changelog-Fixed: askrene: node biases on a persistent layer were duplicated on every restart, and could abort the plugin when loading a layer. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
cdecker
marked this pull request as ready for review
September 28, 2026 13:18
daywalker90
previously approved these changes
Sep 28, 2026
The file is no longer used by any pipeline and has gone stale. Changelog-None Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
cdecker
enabled auto-merge (rebase)
September 28, 2026 16:29
This branch has not been deployed
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
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.
A couple of small fixes collected in one place:
test_grpc_wrong_authcross the wires on one port, with deadlines. After l1 stopped, the old stub dialled l1's now-free gRPC port while l2 listened elsewhere, so the test never checked a foreign certificate against a live node. Its calls also had no deadline, so a client retrying a rejected handshake could hang the test forever. l2 now starts on l1's port, the client connects to 127.0.0.1 explicitly, and every call has a deadline.hash_nodeid()read the 33-byte node id through asize_tpointer. That's undefined behaviour, and at -O3 the load can be hoisted above the copy inset_node_bias(), so a persistent layer's node biases were duplicated on every restart and could trip theNODUPSassertion when loading the layer. The key is now hashed with siphash, likehash_str().🤖 Generated with Claude Code