[flake]: itest peer_bootstrapping

Aperta Adatta ai principianti
#11,663 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
82/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
go, postgresql

Direzione di ricerca

Inizia da itest/lnd_graph.go e dal test peer_bootstrapping relativo a DisconnectNodes(dave, alice) e ai passaggi di riavvio di Dave. Conferma che il DescribeGraph di Dave contiene tutti e tre i nodi con indirizzi non vuoti prima della disconnessione, quindi riesegui il test di integrazione peer_bootstrapping con il backend bitcoind/PostgreSQL documentato. Fatto significa che Dave riesce a trovare un indirizzo di bootstrap dopo il riavvio e a connettersi correttamente a Carol senza il timeout di 1m30s.

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

Descrizione

test flake

Filed by the automated lnd flake agent.

Test: itest peer_bootstrapping (itest/lnd_graph.go)
Leg: Run itests (bitcoind-postgres-nativesql, backend=bitcoind dbbackend=postgres nativesql=true), linux, tranche01/79-of-385
Event: scheduled nightly
Occurrences:

Failing assertion

harness_assertion.go:1816 (via lnd_graph.go:74)
Carol not found in Dave's ListPeers
unable to connect Dave to Carol, got error: peers not connected within 1m30s

Diagnosis (from the logs-itest-bitcoind-postgres-nativesql node log artifacts)

The failure is in the last step, after Dave restarts with bootstrapping enabled. Dave's bootstrapper never finds an address to dial:

03:48:05.493 [INF] SRVR server.go:3406: Initializing peer network bootstrappers!
03:48:05.493 [INF] DISC bootstrapper.go:74: Attempting to bootstrap with: Authenticated Channel Graph
03:48:05.582 [ERR] SRVR server.go:3683: Unable to retrieve initial bootstrap peers: no addresses found
... same error at 03:48:07, :11, :19, :35, 03:49:07 ...

The first problem shows up about 7 seconds earlier. Dave connects to Carol at 03:47:57.684 and gossip-syncs the two edges plus the three NodeAnnouncements. Then ht.AssertNumEdges(dave, 2, false) passes. The test calls DisconnectNodes at 03:47:58.363 and restarts Dave at 03:47:58.776. Dave's gossiper is still writing the node announcements when that shutdown cancels them:

03:47:58.778 [ERR] DISC gossiper.go:2671: unable to add node 0382ddfe... to the graph: context canceled
03:47:58.779 [ERR] DISC gossiper.go:2671: unable to add node 0261724c... to the graph: context canceled
03:47:58.779 [ERR] DISC gossiper.go:2671: unable to add node 0376b8e7... to the graph: context canceled

After the restart Dave has both edges but no addresses for any node. The channel-graph bootstrapper needs those addresses, so it returns no addresses found every time. Dave never connects, and AssertConnected times out.

Likely cause (test side): the test uses an edge count to decide "Dave has synced the graph". Edges arrive before the node announcements, and the node announcements are what carry the addresses the bootstrapper needs. The test restarts Dave inside that window.

Candidate fix (not verified): before DisconnectNodes(dave, alice), also wait until Dave's DescribeGraph lists all three nodes with non-empty addresses. This waits on graph state the node reports; it does not wait for a fixed time. It cannot be reproduced locally because this agent has no chain backend.

Lingua principale
Go
Stelle
8.2k
Fork
2.3k
Merge medio
1g 11h
PR unite (30g)
103

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 lightningnetwork/lnd

Tutte le issue di lightningnetwork/lnd

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.