-
Notifications
You must be signed in to change notification settings - Fork 912
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
lightningd: make shutdown smoother and safer #4897
Merged
rustyrussell
merged 13 commits into
ElementsProject:master
from
SimonVrouwe:2021-10-30_close_subd-plugins-rpc_ignore_id-json
Nov 30, 2021
Merged
Changes from 2 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
aa92241
testing: test hook semantics is preserved in shutdown
SimonVrouwe d0e472d
lightningd: shutdown plugins after subdaemons and assert no write acc…
SimonVrouwe f0b5217
lightningd: cleanup, freeing jsonrpc in shutdown cannot trigger db wr…
SimonVrouwe 3e13833
testing: remove test_stop_pending_fundchannel
SimonVrouwe e8cceea
JSON RPC: In the shutdown loop, ignore plugin responses to JSON RPC r…
SimonVrouwe 92fa91b
JSON RPC: Calls made in shutdown loop receive error code -5: LIGHTNIN…
SimonVrouwe 9f1a014
testing: test that RPC calls made in shutdown fail and receive error …
SimonVrouwe d10f786
testing: fix test_closing_higherfee
SimonVrouwe 0a40623
testing: fix test_upgrade_statickey_onchaind
SimonVrouwe f613308
libplugin-pay: fix valgrind error
SimonVrouwe be6a49d
lightingd: removal of sigchild_handler in shutdown now also closes it…
SimonVrouwe 8dd9dd4
hsmtool: use flag TCSANOW when disabling tty ECHO, fixes rare hang in…
SimonVrouwe ff0d591
doc: update shutdown notification, changelog
SimonVrouwe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -113,7 +113,7 @@ struct plugins { | |
/* Blacklist of plugins from --disable-plugin */ | ||
const char **blacklist; | ||
|
||
/* Whether we are shutting down (`plugins_free` is called) */ | ||
/* Whether we are shutting down, blocks db write's */ | ||
bool shutdown; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This would be far neater as a enum lightningd_state, but we can patch that afterwards. |
||
|
||
/* Index to show what order they were added in */ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I theory this can break our debug tests is list_del_from() if a timer were to delete itself, but luckily we don't use that.