lightningnetwork/lnd

[bug]: sync failed: remote's next commit height is 199442, while we believe it is 199442!

zapomatic opened this issue · 1 comments

Background

Just got a force-close triggered from my end when a peer reconnected after migrating their node. They shut down clean, no pending HTLCs, copied their channels.db to the new machine, and on reconnect, we got this:

2024-05-26 22:34:11.643 [INF] HSWC: ChannelLink(2a621932f...:1): received re-establishment message from remote side
2024-05-26 22:34:11.644 [ERR] LNWL: ChannelPoint(2a621932f...:1): sync failed: remote's next commit height is 199442, while we believe it is 199442!
2024-05-26 22:34:11.644 [WRN] HSWC: ChannelLink(2a621932f...:1): error when syncing channel states: possible remote commitment state data loss
2024-05-26 22:34:11.644 [ERR] HSWC: ChannelLink(2a621932f...:1): failing link: unable to synchronize channel states: possible remote commitment state data loss with error: sync error
2024-05-26 22:34:11.644 [INF] HSWC: ChannelLink(2a621932f...:1): exited
2024-05-26 22:34:11.644 [INF] HSWC: ChannelLink(2a621932f...:1): stopping
2024-05-26 22:34:11.644 [INF] HSWC: Removing channel link with ChannelID(2a621932f...)
2024-05-26 22:34:11.644 [WRN] PEER: Peer(037ff29695...): Force closing link(828724:165:1)

This might just be a logging logic bug where maybe it's mis-representing the comparison. It looks like we are in agreement according to this log (199442 vs 199442). Is it trying to say that my node thinks the current height is 199442 and the next would be 199443? Or is LND failing to realize that these values are in sync?

Your environment

force-close initiator side that detected the issue is running 0.17.4-beta and the other side is on the newer 0.17.5-beta

This was a logging but, fixed in 0.18: #8307