Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đã đóng Phù hợp với người mới
#9,642 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@ksedgwic đang làm issue này rồi.

Từ ngày 21/10/2026.

  • #9643 của @ksedgwic — đang mở

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
83/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
c, python
Lĩnh vực
testing

Hướng nghiên cứu

Tìm test_announce_and_connect_via_dns và helper reserve_unused_port() trong mã kiểm thử tích hợp. Đọc cách kiểm thử thiết lập bind-addr và announce-addr của nút đầu tiên, sau đó dùng cơ chế đặt chỗ cổng dùng chung cho cổng đó. Chạy kiểm thử bị ảnh hưởng và xác nhận nút khởi động mà không gặp xung đột bind do cổng cố định.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
C
Star
3.1k
Fork
1k
Merge trung bình
4 ngày 5 giờ
Pull request đã merge (30 ngày)
32

Chuẩn bị môi trường

  • Có Dockerfile hoặc tệp Docker Compose
  • Có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của ElementsProject/lightning

Tất cả issue của ElementsProject/lightning

Issue tương tự

Thêm issue về C

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.