-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Fix potential leaks in executePipedCommands #12478
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
base: 4.20
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.20 #12478 +/- ##
=========================================
Coverage 16.24% 16.24%
- Complexity 13393 13394 +1
=========================================
Files 5657 5657
Lines 499107 499123 +16
Branches 60574 60577 +3
=========================================
+ Hits 81069 81080 +11
- Misses 409001 409004 +3
- Partials 9037 9039 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@blueorangutan package |
|
@abh1sar a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 16455 |
…dstack into libvirt-pipe-leak
DaanHoogland
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clgtm
|
@blueorangutan package |
|
can you add some testing advice to the description, @abh1sar ? |
This is more of a defensive fix that follows the existing pattern in the file and kills any processes that were spawned by the piped command after timeout. I couldn't reproduce or test process leaks deterministically. I think smokes and some regression testing should do. |
|
@blueorangutan test |
|
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
@blueorangutan package |
|
@abh1sar a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
nvazquez
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM - thanks @abh1sar
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 16470 |
Description
This PR fixes a potential process and stream leaks during piped command execution by ensuring proper cleanup of all processes created during piped command execution by tracking the full process pipeline and cleaning it up in a finally block. This prevents intermediate processes from being left running on timeouts or failures, reducing the risk of resource and file-descriptor leaks.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?