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

Avoid killing oneself if redis gets stuck dieing #194

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tyrken
Copy link

@tyrken tyrken commented Aug 16, 2024

I confirm that this contribution is made under the terms of the license found in the root directory of this repository's source tree and that I have the authority necessary to make this contribution on behalf of its copyright owner.

When running redislite under GitHub Actions in an container (rather than directly on the runner) I see pytest die with exit code 137.

After some debugging I realised it's as GHA runs containers with tail as PID=1 which doesn't process signals correctly, so the daemonized redis-server goes <defunct> aka Zombie when it exits. This sends redislite through a series of timeouts resulting in a final SIGTERM using self.pid which while non-zero at the start becomes zero by the time of the SIGTERM (I assume via some callback action inside the redis library this package extends), leading to a suicide. Switching to use process.pid seems better for this situation & avoids the self-kill.

@codecov-commenter
Copy link

codecov-commenter commented Aug 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.73%. Comparing base (802f8a0) to head (83ccc7f).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #194      +/-   ##
==========================================
- Coverage   98.75%   98.73%   -0.02%     
==========================================
  Files           5        5              
  Lines         322      317       -5     
  Branches       52       52              
==========================================
- Hits          318      313       -5     
  Partials        4        4              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tyrken tyrken force-pushed the fix-stuck-term-kill branch from ea48b19 to 83ccc7f Compare August 16, 2024 10:24
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.

2 participants