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

Multishell support and add assertion on min. timeout (bugfix) #1654

Merged
merged 3 commits into from
Dec 12, 2024

Conversation

Hook25
Copy link
Collaborator

@Hook25 Hook25 commented Dec 12, 2024

Description

In the launchpad builder for Noble, the shell selected is sh. This is how I discovered that sh's kill doesn't actually support the tree kill (-PID semantic). This adds a fallback mechanism (that tries to use known working shells instead of the default one), then tries the default one and if it fails tries one last time to at least kill the direct child.

This also fixes a race condition, when join timeout is 0, in very unlucky circumstances the subprocess may not be up after the join, leading to the kill failing and the subprocess leaking free. Also, a timeout of 0 doesn't make sense.

Resolved issues

Fixes: CHECKBOX-1701

Documentation

N/A

Tests

Update tests

Copy link

codecov bot commented Dec 12, 2024

Codecov Report

Attention: Patch coverage is 81.81818% with 2 lines in your changes missing coverage. Please review.

Project coverage is 48.97%. Comparing base (aac167f) to head (c3972d9).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...eckbox-support/checkbox_support/helpers/timeout.py 81.81% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1654   +/-   ##
=======================================
  Coverage   48.96%   48.97%           
=======================================
  Files         371      371           
  Lines       40296    40306   +10     
  Branches     6808     6811    +3     
=======================================
+ Hits        19730    19738    +8     
- Misses      19846    19847    +1     
- Partials      720      721    +1     
Flag Coverage Δ
checkbox-support 61.10% <81.81%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

fernando79513
fernando79513 previously approved these changes Dec 12, 2024
Copy link
Collaborator

@fernando79513 fernando79513 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quite interesting discovery.
LGTM+1!

@Hook25 Hook25 merged commit 65da1f9 into main Dec 12, 2024
40 of 41 checks passed
@Hook25 Hook25 deleted the timeout_fix_v23 branch December 12, 2024 16:22
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