Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

test_announce_and_connect_via_dns binds a fixed port that other tests' nodes can be handed

未关闭 适合新手
#9,642 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 2 天内回复

@ksedgwic 已经在做这个了。

开始于 2026年10月21日。

  • #9643 来自 @ksedgwic —— 未关闭

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
83/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
c, python
领域
testing

调研方向

在集成测试代码中找到 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 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

ElementsProject/lightning 的其他 Issue

查看 ElementsProject/lightning 的全部 Issue

相似的 Issue

更多 C Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。