Closed heyambob closed 2 years ago
I'm looking at this line "lightningd/htlc_end.c:205 (htlc_out_check) 0x558c893ba352"
if (hout->in->failonion)
return corrupt(abortstr,
"Output failmsg, input failonion");
Not sure why "hout->in->failonion" is so dangerous that we have to stop the daemon. Is possible that there's some missing record/field in my db causing "failonion" ? If so, is there a way to do sanity check and find out which records in which tables are causing trouble ?
Edit - Ha . that's me using different laptop
This check does seem overzealous. It was added just before rc1. I will loosen it once I get to my laptop...
Please check https://github.com/ElementsProject/lightning/pull/5193, or just do the same thing locally remove lines 206-209 of lightningd/htlc_end.c:
diff --git a/lightningd/htlc_end.c b/lightningd/htlc_end.c
index bd80eecde..d9a80ac1b 100644
--- a/lightningd/htlc_end.c
+++ b/lightningd/htlc_end.c
@@ -201,9 +201,6 @@ struct htlc_out *htlc_out_check(const struct htlc_out *hout,
return corrupt(abortstr,
"Output failmsg, input preimage");
} else if (hout->failmsg) {
- if (hout->in->failonion)
- return corrupt(abortstr,
- "Output failmsg, input failonion");
if (hout->in->preimage)
return corrupt(abortstr,
"Output failmsg, input preimage");
Thank you. That works. What does the failonion failonion do ? Should we write the log if it's useful somehow ?
Also, on the check_already_failed
We've had a bug report about not failing incoming HTLCs. This does a sanity check, if we think we've already failed this HTLC
Where does this refer to ?
We actually found the real bug, in this case. But I put a whole pile of new checks in the code at various points around where the failure was; this one was too strict.
In detail: onchaind can tell us "this HTLC can be failed now" but if we're restarting, that might be old news. We now do extra checks to make sure it failed the same way, but this isn't actually guaranteed, nor a problem. Hence, we tripped up on that check.
Issue and Steps to Reproduce
I was on "v0.11.0rc2-2-g9a8bc77-modded", thought I should update myself to rc3. I didn't shutdown the node while I was compiling & make install, because that's what I used to do all the time. (restarting node after make install)
This is from the terminal:
This is from the crash log
After that I went back to the old rc2, didn't work showing similar errors, then I restored from the backup and still no luck.
So my guess is it's not about rc2/3, it's just some funky data was written on the db when it crashed, and it got replicated to the backup.
All is lost ? What is my next step ?
getinfo
output