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

rust-consumer does not receive signals #6031

Open
doc-sheet opened this issue Jun 15, 2024 · 1 comment
Open

rust-consumer does not receive signals #6031

doc-sheet opened this issue Jun 15, 2024 · 1 comment
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@doc-sheet
Copy link

doc-sheet commented Jun 15, 2024

Environment

snuba 24.5.1 from https://github.com/getsentry/self-hosted

Steps to Reproduce

  1. run some rust-consumer, for example
snuba rust-consumer --storage spans --consumer-group snuba-spans-consumers --auto-offset-reset=latest --max-batch-time-ms 1000 --no-strict-offset-reset
  1. send SIGTERM to main process with kill -s SIGTERM <pid> or just do docker stop snuba-spans-consumer
  2. check exit code / docker events

Expected Result

Consumer gracefully stops

Actual Result

Container killed by sigkill

Looks like master process does not propagate signals to rust consumer.
For example python version has some handlers for it.

@untitaker
Copy link
Member

The handler for Rust is here:

ctrlc::set_handler(move || {

it seems it may only handle SIGINT and not SIGTERM, but it's not clear.

Patches welcome

@untitaker untitaker added bug Something isn't working good first issue Good for newcomers labels Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
Status: No status
Development

No branches or pull requests

2 participants