Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Chiusa Adatta ai principianti
#9,642 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@ksedgwic ci sta già lavorando.

Dal 21/10/2026.

  • #9643 di @ksedgwic — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
83/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
c, python
Ambito
testing

Direzione di ricerca

Trova test_announce_and_connect_via_dns e l’helper reserve_unused_port() nel codice dei test di integrazione. Leggi come il test imposta bind-addr e announce-addr del primo nodo, poi usa la prenotazione condivisa della porta per quella porta. Esegui il test interessato e conferma che il nodo si avvia senza il conflitto di binding causato dalla porta fissa.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
C
Stelle
3.1k
Fork
1k
Merge medio
4g 5h
PR unite (30g)
32

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ElementsProject/lightning

Tutte le issue di ElementsProject/lightning

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.