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

crash in renepay plugin #6493

Closed
endothermicdev opened this issue Aug 3, 2023 · 10 comments · Fixed by #6523
Closed

crash in renepay plugin #6493

endothermicdev opened this issue Aug 3, 2023 · 10 comments · Fixed by #6523
Assignees
Labels
Milestone

Comments

@endothermicdev
Copy link
Collaborator

endothermicdev commented Aug 3, 2023

Issue and Steps to Reproduce

ran lightning-cli renepay <bolt 11> 50000 40000 to test a 50sat payment
which lead to the following crash:

2023-08-03T14:34:18.711Z UNUSUAL plugin-cln-renepay: onion error WIRE_INCORRECT_CLTV_EXPIRY from node #1 791381x1127x0: failed: WIRE_INCORRECT_CLTV_EXPIRY (reply from remote)
2023-08-03T14:34:18.732Z **BROKEN** plugin-cln-renepay: Underflow subtracting flow->amounts[0] (367309429976msat) from &p->total_sent (0msat)
2023-08-03T14:34:18.763Z INFO    plugin-cln-renepay: Killing plugin: exited during normal operation
2023-08-03T14:34:18.763Z **BROKEN** plugin-cln-renepay: Plugin marked as important, shutting down lightningd!

Running 23.08rc1

@vincenzopalazzo
Copy link
Collaborator

vincenzopalazzo commented Aug 3, 2023

We should not make renepay marked as important, I do not think it has enough tests to do it?

Maybe this underflow is easier for @Lagrang3 to debug? assigning to it till I will be away from my desk

@vincenzopalazzo vincenzopalazzo added this to the v23.08 milestone Aug 3, 2023
@Lagrang3
Copy link
Collaborator

Lagrang3 commented Aug 3, 2023

First thing I notice is that invoice string comes before the payment parameters otherwise the parser will not let you continue.

Can you upload more details of the logs, to simplify maybe just the lines containing renepay?

@endothermicdev
Copy link
Collaborator Author

Sorry, I did get the BOLT11 in before the parameters in the actual test. The report is updated to reflect that.

That was all the log output I received - there was no traceback available. Will see if I can up the logging level and get some more details.

@Lagrang3
Copy link
Collaborator

Lagrang3 commented Aug 3, 2023

Actually, I think I don't need any more log messages. I seems like the flow destructor is called twice. I'm looking into it.

@Lagrang3
Copy link
Collaborator

Lagrang3 commented Aug 4, 2023

We should not make renepay marked as important, I do not think it has enough tests to do it?

Maybe this underflow is easier for @Lagrang3 to debug? assigning to it till I will be away from my desk

As a builtin plugin, the bool important flag is true by default. I am not sure if I can flip it at will. There are conflicting definitions of struct plugin in lightningd/plugin.h and plugins/libplugin.c, the first contains a bool important, the second does not.

@vincenzopalazzo
Copy link
Collaborator

If there is no possibility to do it, we should add it. Till now, all the plugins built-in are important (except grpc one), but we should have the possibility to say, "it is fine if this plugin dies"

@Lagrang3
Copy link
Collaborator

Lagrang3 commented Aug 7, 2023

@rustyrussell just PR this #6523 to avoid crashing the node.

@Lagrang3
Copy link
Collaborator

Lagrang3 commented Aug 7, 2023

@rustyrussell there is also the fix to the underflow that triggered this issue #6505

@vincenzopalazzo
Copy link
Collaborator

My fault I was assuming that this was already merged

@rustyrussell
Copy link
Contributor

I believe this should be fixed by #6538

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants