test_announce_and_connect_via_dns binds a fixed port that other tests' nodes can be handed
维护者通常 2 天内回复
评估
调研方向
在集成测试代码中找到 test_announce_and_connect_via_dns 和 reserve_unused_port() helper。查看测试如何设置第一个节点的 bind-addr 和 announce-addr,然后对该端口使用共享的端口预留机制。运行受影响的测试,并确认节点启动时没有固定端口导致的 bind 冲突。
由索引模型根据 Issue 内容生成。
描述
test_announce_and_connect_via_dns fails intermittently because its first node cannot bind port 12345 and never starts:
lightningd-1 2026-10-19T16:39:14.533Z **BROKEN** connectd: Failed to bind socket for 127.0.0.1:12345: Address already in use
TimeoutError: Unable to find "[re.compile('Server started with public key')]" in logs.
Seen on master at 898688817 in Test CLN liquid Full Integration, run 39278670232 (2026-10-19, https://github.com/ElementsProject/lightning/actions/runs/39278670232).
Cause: the test hard-codes 12345 for the first node's bind-addr and announce-addr. Every other node in the suite gets its ports from reserve_unused_port(), which draws from the range below the OS ephemeral floor (1024 to 32767 on Linux) and coordinates only its own allocations through lock files. A node of a test running on another worker can be handed 12345, and this test's node then fails to start. connectd sets SO_REUSEADDR, so this is a live listener, not a lingering socket.
Fix: reserve the port through reserve_unused_port() as well, so the pool knows about it.
Part of #9222.
- 主要语言
- C
- 星标
- 3.1k
- 派生
- 1k
- 平均合并
- 4 天 13 小时
- 30 天内合并 PR
- 29
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
ElementsProject/lightning 的其他 Issue
-
test_splice_rbf_htlc_sigs reads htlc_sigs before the splice lock-in commits可能已有人在做 @ksedgwic 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
ElementsProject/lightning#9640 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 66/100
ElementsProject/lightning#9634 ·
维护者通常 2 天内回复
-
plugins/recover: missing comma in nodes_for_gossip concatenates two bootstrap addresses into invalid address可能已有人在做 @bhuvan-somisetty 于 6 天前认领。 未关闭
难度 1/5 1 小时以内 新手友好度 88/100
ElementsProject/lightning#9630 ·
维护者通常 2 天内回复
-
common/json_parse: json_to_bitcoin_amount fails to detect overflow and accepts negative/empty inputs可能已有人在做 @bhuvan-somisetty 于 11 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 62/100
ElementsProject/lightning#9617 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 66/100
ElementsProject/lightning#9616 · 1 条评论 ·
维护者通常 2 天内回复
查看 ElementsProject/lightning 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 76/100
valkey-io/valkey#4979 · 1 个 reaction ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
colbymchenry/codegraph#2770 ·
维护者通常 1 天内回复
-
area/ysql kind/enhancement priority/medium status/awaiting-triage
难度 2/5 1-3 小时 新手友好度 73/100
yugabyte/yugabyte-db#35578 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 66/100
维护者通常 1 天内回复
-
Bug Status: Needs Triage
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复