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

FATAL SIGNAL on daemon.c in 24.02 and 24.05 #7486

Closed
btweenthebars opened this issue Jul 23, 2024 · 2 comments · Fixed by #7650
Closed

FATAL SIGNAL on daemon.c in 24.02 and 24.05 #7486

btweenthebars opened this issue Jul 23, 2024 · 2 comments · Fixed by #7650
Assignees
Milestone

Comments

@btweenthebars
Copy link

Issue and Steps to Reproduce

I keep seeing these errors on the log and console but it doesn't crash my node.

There are 2 variations:

lightning_channeld: FATAL SIGNAL 11 (version v24.05-modded)
0x5ed1c6727571 send_backtrace
common/daemon.c:33
0x5ed1c67275f6 crashdump
common/daemon.c:75
0x73fe53d16adf ???
???:0
0x5ed1c6719538 peer_reconnect
channeld/channeld.c:5205
0x5ed1c6719dab init_channel
channeld/channeld.c:5959
0x5ed1c6719f04 main
channeld/channeld.c:6005
0x73fe53cffc87 ???
???:0
0x73fe53cffd4b ???
???:0
0x5ed1c670e6f4 ???
???:0
0xffffffffffffffff ???
???:0

and

lightning_channeld: FATAL SIGNAL (version v24.05-modded)
0x5ed1c6727571 send_backtrace
common/daemon.c:33
0x5ed1c67322cc status_failed
common/status.c:221
0x5ed1c6732482 status_backtrace_exit
common/subdaemon.c:18
0x5ed1c67275fc crashdump
common/daemon.c:78
0x73fe53d16adf ???
???:0
0x5ed1c6719538 peer_reconnect
channeld/channeld.c:5205
0x5ed1c6719dab init_channel
channeld/channeld.c:5959
0x5ed1c6719f04 main
channeld/channeld.c:6005
0x73fe53cffc87 ???
???:0
0x73fe53cffd4b ???
???:0
0x5ed1c670e6f4 ???
???:0
0xffffffffffffffff ???
???:0

It's been going on since 24.02. I didn't have that in 23.11

getinfo output

"version": "v24.05-modded",
"blockheight": 853495,
"network": "bitcoin",
"fees_collected_msat": 111111,
"lightning-dir": "/cln/bitcoin",
"our_features": {
"init": "080000000000000000000000000008a0080a8a59a1",
"node": "080000000000000000000000000088a0080a8a59a1",
"channel": "",
"invoice": "02000002024100"
}

@cdecker
Copy link
Member

cdecker commented Jul 30, 2024

Sounds like we are dereferencing the initr pointer here:

lightning/channeld/channeld.c

Lines 5205 to 5209 in 11586ab

if (match_type(initr->desired_channel_type,
ninitr->current_channel_type)
|| match_type(initr->desired_channel_type,
ninitr->upgradable_channel_type))
type = initr->desired_channel_type;

How cound that be NULL? It looks as if either the send_tlvs or recv_tlvs is set to NULL. Git blame says @rustyrussell last edited the code here, so he might know how to address this best.

@rustyrussell rustyrussell self-assigned this Sep 4, 2024
@rustyrussell rustyrussell added this to the v24.11 milestone Sep 4, 2024
@rustyrussell
Copy link
Contributor

Good catch!

send_tlvs can indeed be NULL, with older peers.

rustyrussell added a commit to rustyrussell/lightning that referenced this issue Sep 7, 2024
send_tlvs is NULL if no special features are supported, and peer
sets `next_to_send` anyway:

```
0x5ed1c6719538 peer_reconnect
channeld/channeld.c:5205
0x5ed1c6719dab init_channel
channeld/channeld.c:5959
0x5ed1c6719f04 main
channeld/channeld.c:6005
```

Backport: v24.08
Fixes: ElementsProject#7486
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
s373nZ pushed a commit to s373nZ/lightning that referenced this issue Sep 7, 2024
send_tlvs is NULL if no special features are supported, and peer
sets `next_to_send` anyway:

```
0x5ed1c6719538 peer_reconnect
channeld/channeld.c:5205
0x5ed1c6719dab init_channel
channeld/channeld.c:5959
0x5ed1c6719f04 main
channeld/channeld.c:6005
```

Backport: v24.08
Fixes: ElementsProject#7486
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
@ShahanaFarooqui ShahanaFarooqui modified the milestones: v24.11, v24.08.1 Sep 12, 2024
ShahanaFarooqui pushed a commit to ShahanaFarooqui/lightning that referenced this issue Sep 17, 2024
send_tlvs is NULL if no special features are supported, and peer
sets `next_to_send` anyway:

```
0x5ed1c6719538 peer_reconnect
channeld/channeld.c:5205
0x5ed1c6719dab init_channel
channeld/channeld.c:5959
0x5ed1c6719f04 main
channeld/channeld.c:6005
```

Backport: v24.08
Fixes: ElementsProject#7486
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants