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 log server not exiting properly on SIGINT #2805

Merged
merged 2 commits into from
Sep 6, 2022

Conversation

gregoire-mullvad
Copy link
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
Contributor

roger2hk commented Sep 2, 2022

/gcbrun

server/admin/tree_gc.go Outdated Show resolved Hide resolved
@AlCutter
Copy link
Member

AlCutter commented Sep 5, 2022

/gcbrun

@AlCutter AlCutter merged commit 25255fa into google:master Sep 6, 2022
@AlCutter
Copy link
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