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

Fix plugin startup crash #7673

Merged

Conversation

rustyrussell
Copy link
Contributor

Thanks to @m-schmoock for the excellent bug report.

Fixes: #7671

We modify broken.py to be able to fail at different points,
and test that during startup.

Signed-off-by: Rusty Russell <[email protected]>
Thanks to Michael Schmook for the excellent bug report.

Fixes: ElementsProject#7671
Changelog-Fixed: lightningd: no longer crash if a plugin dies during lightningd startup.
Signed-off-by: Rusty Russell <[email protected]>
@rustyrussell rustyrussell added this to the v24.08.1 milestone Sep 17, 2024
@m-schmoock m-schmoock self-requested a review September 17, 2024 07:15
Copy link
Collaborator

@m-schmoock m-schmoock left a comment

Choose a reason for hiding this comment

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

ACK e13d34c

Thanks. Does what its supposed to do.
Now I know it was the backup plugin that crashed with

2024-09-17T06:20:27.651Z UNUSUAL plugin-backup-cli: Killing plugin: Invalid/missing result tok in '{"jsonrpc": "2.0","id": 19,"error": {"code":-4, "message":"Plugin terminated before replying to RPC call."}}'

Anyway, the daemon was able to do the database update and the backup plugin came online just normal after that.

The test runs fine on my development machine ( x86_64 ) but I can't run it on the Raspberry ( aarch64 ) likely for unrelated reasons:

FAILED tests/test_plugin.py::test_plugin_fail_on_startup - jsonschema.exceptions.ValidationError: 0msat is not of type 'msat

@m-schmoock
Copy link
Collaborator

Ah nevermind, found out the issue on my Raspberry. It was using the 23.0.8 pyln-client for some reason and the v24 pyln-testing

@ShahanaFarooqui
Copy link
Collaborator

ACK e13d34c

@ShahanaFarooqui ShahanaFarooqui merged commit f0cf088 into ElementsProject:master Sep 17, 2024
38 checks passed
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 this pull request may close these issues.

Nullpointer crash lightningd/plugin.c line 878
3 participants