Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gossmap: don't crash if we see a duplicate channel_announce. #5593

Merged

Conversation

rustyrussell
Copy link
Contributor

Apparently we had two private channel announcements (the !private assert failed). While this shouldn't happen, don't crash because of it.

Fixes: #5578
Signed-off-by: Rusty Russell rusty@rustcorp.com.au
Changelog-Fixed: Plugins: topology plugin could crash when it sees duplicate private channel announcements.

Apparently we had two private channel announcements (the !private assert
failed).  While this shouldn't happen, don't crash because of it.

Fixes: ElementsProject#5578
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Fixed: Plugins: topology plugin could crash when it sees duplicate private channel announcements.
@cdecker
Copy link
Member

cdecker commented Sep 14, 2022

ACK ccede9d

Copy link
Collaborator

@vincenzopalazzo vincenzopalazzo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK ccede9d

@cdecker
Copy link
Member

cdecker commented Sep 14, 2022

Leaving open for now since it needs to be cherry-picked into v0.12.1

Copy link
Collaborator

@endothermicdev endothermicdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK ccede9d

@@ -414,11 +414,8 @@ static struct gossmap_chan *add_channel(struct gossmap *map,
* that's the only time we get duplicates */
scid.u64 = map_be64(map, cannounce_off + plus_scid_off);
chan = gossmap_find_chan(map, &scid);
if (chan) {
assert(chan->private);
assert(!private);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we know the cause of the duplicate private channel announcement? Maybe log this case with status_broken for visibility.

@niftynei niftynei merged commit 1121150 into ElementsProject:master Sep 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

crashed by an assertion in common/gossmap.c in v0.12.0
5 participants