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 possible leak (W.i.P.) #3194

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

cupakob
Copy link
Contributor

@cupakob cupakob commented Oct 30, 2024

Not closing os.File must not, but may lead to a leak. It is better to close it manually instead of waiting for the next GC to be triggered

Summary

Related issue(s)

Fixes #

Release Notes

NONE

@kcp-ci-bot kcp-ci-bot added release-note-none Denotes a PR that doesn't merit a release note. dco-signoff: yes Indicates the PR's author has signed the DCO. labels Oct 30, 2024
@kcp-ci-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign mjudeikis for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kcp-ci-bot kcp-ci-bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Oct 30, 2024
@kcp-ci-bot
Copy link
Contributor

Hi @cupakob. Thanks for your PR.

I'm waiting for a kcp-dev member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@embik
Copy link
Member

embik commented Oct 30, 2024

/ok-to-test

@kcp-ci-bot kcp-ci-bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Oct 30, 2024
@kcp-ci-bot kcp-ci-bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Oct 30, 2024
@cupakob
Copy link
Contributor Author

cupakob commented Oct 30, 2024

/retest

1 similar comment
@cupakob
Copy link
Contributor Author

cupakob commented Nov 1, 2024

/retest

@embik
Copy link
Member

embik commented Nov 1, 2024

Hi @cupakob, I'm not sure this is a flaky test. Have you verified that the same test works for you locally?

@cupakob
Copy link
Contributor Author

cupakob commented Nov 1, 2024

Hi @cupakob, I'm not sure this is a flaky test. Have you verified that the same test works for you locally?

nope, in the log output I dont really see a problem related to my changes

i will run it localy, maybe I will see more

@kcp-ci-bot kcp-ci-bot added dco-signoff: no Indicates the PR's author has not signed the DCO. and removed dco-signoff: yes Indicates the PR's author has signed the DCO. labels Nov 5, 2024
@kcp-ci-bot kcp-ci-bot added dco-signoff: yes Indicates the PR's author has signed the DCO. and removed dco-signoff: no Indicates the PR's author has not signed the DCO. labels Nov 5, 2024
@cupakob cupakob changed the title 🐛 Fix possible leak W.i.P. 🐛 Fix possible leak Nov 5, 2024
@cupakob cupakob changed the title W.i.P. 🐛 Fix possible leak 🐛 Fix possible leak (W.i.P.) Nov 5, 2024
@cupakob
Copy link
Contributor Author

cupakob commented Nov 5, 2024

/retest

@cupakob cupakob force-pushed the fix-possible-leak branch 3 times, most recently from cf1b7c8 to 59a7301 Compare November 5, 2024 14:12
@kcp-ci-bot kcp-ci-bot added the dco-signoff: no Indicates the PR's author has not signed the DCO. label Nov 10, 2024
@kcp-ci-bot kcp-ci-bot removed the dco-signoff: yes Indicates the PR's author has signed the DCO. label Nov 10, 2024
@kcp-ci-bot kcp-ci-bot added dco-signoff: yes Indicates the PR's author has signed the DCO. and removed dco-signoff: no Indicates the PR's author has not signed the DCO. labels Nov 10, 2024
@cupakob cupakob force-pushed the fix-possible-leak branch 2 times, most recently from a3e813e to 396cdd8 Compare November 10, 2024 19:22
Not closing os.File must not, but may lead to a leak. It is better to close it manually instead of waiting for the next GC to be triggered

Signed-off-by: Atanas Alexandrov <sirakov@gmail.com>
Signed-off-by: Atanas Alexandrov <sirakov@gmail.com>
Signed-off-by: Atanas Alexandrov <sirakov@gmail.com>
Signed-off-by: Atanas Alexandrov <sirakov@gmail.com>
Signed-off-by: Atanas Alexandrov <sirakov@gmail.com>
@cupakob
Copy link
Contributor Author

cupakob commented Nov 13, 2024

@embik currently i don't have any changes in the branch (all changes are commented), but the tests are still failing...it looks like flaky tests somehow, right?

@embik
Copy link
Member

embik commented Nov 13, 2024

@embik currently i don't have any changes in the branch (all changes are commented), but the tests are still failing...it looks like flaky tests somehow, right?

I think you're right, the test occasionally flakes. You can see in older runs that it used to fail sometimes before this PR. Apologies for the confusion caused by it.

I think the consistent failures we saw earlier in this PR had a differentiation though: They ran into the 2h timeout, so those jobs were running for much longer. The flakes are usually happening within the first 15-20 minutes.

@cupakob
Copy link
Contributor Author

cupakob commented Nov 14, 2024

I think you're right, the test occasionally flakes. You can see in older runs that it used to fail sometimes before this PR. Apologies for the confusion caused by it.

all good, not a problem at all ;)

I think the consistent failures we saw earlier in this PR had a differentiation though: They ran into the 2h timeout, so those jobs were running for much longer. The flakes are usually happening within the first 15-20 minutes.

okay, but I don't have an explination, how the defer function, where I close the file, can cause a 2h timeout...any hints are welcome.

Signed-off-by: Atanas Alexandrov <sirakov@gmail.com>
@cupakob
Copy link
Contributor Author

cupakob commented Nov 14, 2024

/retest

Signed-off-by: Atanas Alexandrov <sirakov@gmail.com>
@kcp-ci-bot
Copy link
Contributor

@cupakob: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-kcp-test-e2e-sharded 56c5b82 link true /test pull-kcp-test-e2e-sharded

Full PR test history

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dco-signoff: yes Indicates the PR's author has signed the DCO. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants