Skip to content

Fix log server not exiting properly on SIGINT#2805

Merged
AlCutter merged 2 commits intogoogle:masterfrom
gregoire-mullvad:fix-gc-exit
Sep 6, 2022
Merged

Fix log server not exiting properly on SIGINT#2805
AlCutter merged 2 commits intogoogle:masterfrom
gregoire-mullvad:fix-gc-exit

Conversation

@gregoire-mullvad
Copy link
Copy Markdown
Contributor

Make the tree garbage collection coroutine exit immediately when the context is cancelled.

This fixes an issue that appeared in 1.4.1: after receiving SIGINT trillian_log_server starts shutting down but seems to get stuck and needs to be killed.

Checklist

Make the tree garbage collection coroutine exit immediately when the
context is cancelled.
@gregoire-mullvad gregoire-mullvad requested a review from a team as a code owner September 2, 2022 06:23
@roger2hk
Copy link
Copy Markdown
Contributor

roger2hk commented Sep 2, 2022

/gcbrun

@AlCutter
Copy link
Copy Markdown
Member

AlCutter commented Sep 5, 2022

/gcbrun

@AlCutter AlCutter merged commit 25255fa into google:master Sep 6, 2022
@AlCutter
Copy link
Copy Markdown
Member

AlCutter commented Sep 6, 2022

Many thanks for the fix!

@gregoire-mullvad gregoire-mullvad deleted the fix-gc-exit branch September 7, 2022 06:08
sigsum-bot pushed a commit to sigsum/log-go that referenced this pull request Sep 9, 2022
Repeated kill is a workaround that can most likely be reverted once
google/trillian#2805 makes into into a
trillian release.

Uses SIGTERM rather than SIGINT, because (i) SIGTERM (the default kill
signal) seems more appropriate for scripted usage, while SIGINT is for
interactive usage, e.g., pressing Control-C in the terminal, and (ii)
SIGINT didn't work in my local tests.
sigsum-bot pushed a commit to sigsum/log-go that referenced this pull request Sep 9, 2022
Repeated kill is a workaround that can most likely be reverted once
google/trillian#2805 makes into into a
trillian release.

Uses SIGTERM rather than SIGINT, because (i) SIGTERM (the default kill
signal) seems more appropriate for scripted usage, while SIGINT is for
interactive usage, e.g., pressing Control-C in the terminal, and (ii)
SIGINT didn't work in my local tests.
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.

3 participants