Skip to content

OCPBUGS-76451: [release-1.35] : fix: prevent panic on closed stopTimeoutChan in StopContainer#9814

Merged
openshift-merge-bot[bot] merged 1 commit into
cri-o:release-1.35from
openshift-cherrypick-robot:cherry-pick-9799-to-release-1.35
Apr 30, 2026
Merged

OCPBUGS-76451: [release-1.35] : fix: prevent panic on closed stopTimeoutChan in StopContainer#9814
openshift-merge-bot[bot] merged 1 commit into
cri-o:release-1.35from
openshift-cherrypick-robot:cherry-pick-9799-to-release-1.35

Conversation

@openshift-cherrypick-robot

Copy link
Copy Markdown

This is an automated cherry-pick of #9799

/assign bitoku

Fixed a panic when concurrent StopContainer calls race against the stop lifecycle completing.

A race condition occurs when a second StopContainer call arrives
after the container has already been marked as done stopping.
Specifically, SetAsDoneStopping closes the stopTimeoutChan, and
subsequent calls attempting to interact with or close this
channel result in a "panic: close of closed channel".

This patch adds a guard using the stopDone internal state within
WaitOnStopTimeout to ensure we return early if the stop lifecycle
has already completed, preventing redundant channel operations.

Addresses: OCPBUGS-76451
Signed-off-by: Sabuj Maity <samaity@redhat.com>
@openshift-ci openshift-ci Bot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Mar 13, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@openshift-cherrypick-robot: Could not make automatic cherrypick of Jira Issue OCPBUGS-76451 for this PR as the target version is not set for this branch in the jira plugin config. Running refresh:
/jira refresh

/retitle [release-1.35] : fix: prevent panic on closed stopTimeoutChan in StopContainer

Details

In response to this:

This is an automated cherry-pick of #9799

/assign bitoku

Fixed a panic when concurrent StopContainer calls race against the stop lifecycle completing.

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci Bot added the dco-signoff: yes Indicates the PR's author has DCO signed all their commits. label Mar 13, 2026
@coderabbitai

coderabbitai Bot commented Mar 13, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: eded6151-0764-479d-9805-3bd9b0b9c66f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

You can make CodeRabbit's review stricter and more nitpicky using the `assertive` profile, if that's what you prefer.

Change the reviews.profile setting to assertive to make CodeRabbit's nitpick more issues in your PRs.

@openshift-ci-robot openshift-ci-robot added jira/severity-moderate Referenced Jira bug's severity is moderate for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. labels Mar 13, 2026
@openshift-ci openshift-ci Bot changed the title [release-1.35] OCPBUGS-76451: fix: prevent panic on closed stopTimeoutChan in StopContainer [release-1.35] : fix: prevent panic on closed stopTimeoutChan in StopContainer Mar 13, 2026
@openshift-ci-robot openshift-ci-robot added the jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. label Mar 13, 2026
@openshift-ci openshift-ci Bot requested review from bitoku and littlejawa March 13, 2026 10:39
@openshift-ci-robot

Copy link
Copy Markdown

@openshift-ci-robot: This pull request references Jira Issue OCPBUGS-76451, which is invalid:

  • expected the bug to be in one of the following states: NEW, ASSIGNED, POST, but it is MODIFIED instead
  • release note text must be set and not match the template OR release note type must be set to "Release Note Not Required". For more information you can reference the OpenShift Bug Process.
  • expected Jira Issue OCPBUGS-76451 to depend on a bug in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but no dependents were found

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

@openshift-cherrypick-robot: Could not make automatic cherrypick of Jira Issue OCPBUGS-76451 for this PR as the target version is not set for this branch in the jira plugin config. Running refresh:
/jira refresh

/retitle [release-1.35] : fix: prevent panic on closed stopTimeoutChan in StopContainer

In response to this:

This is an automated cherry-pick of #9799

/assign bitoku

Fixed a panic when concurrent StopContainer calls race against the stop lifecycle completing.

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 openshift-eng/jira-lifecycle-plugin repository.

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot openshift-ci-robot removed jira/severity-moderate Referenced Jira bug's severity is moderate for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Mar 13, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@openshift-cherrypick-robot: No Jira issue is referenced in the title of this pull request.
To reference a jira issue, add 'XYZ-NNN:' to the title of this pull request and request another refresh with /jira refresh.

Details

In response to this:

This is an automated cherry-pick of #9799

/assign bitoku

Fixed a panic when concurrent StopContainer calls race against the stop lifecycle completing.

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 openshift-eng/jira-lifecycle-plugin repository.

@bitoku

bitoku commented Mar 13, 2026

Copy link
Copy Markdown
Contributor

/cherry-pick release-1.34

@openshift-cherrypick-robot

Copy link
Copy Markdown
Author

@bitoku: once the present PR merges, I will cherry-pick it on top of release-1.34 in a new PR and assign it to you.

Details

In response to this:

/cherry-pick release-1.34

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-sigs/prow repository.

@bitoku bitoku changed the title [release-1.35] : fix: prevent panic on closed stopTimeoutChan in StopContainer OCPBUGS-76451: [release-1.35] : fix: prevent panic on closed stopTimeoutChan in StopContainer Mar 13, 2026
@openshift-ci-robot openshift-ci-robot added jira/severity-moderate Referenced Jira bug's severity is moderate for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Mar 13, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@openshift-cherrypick-robot: This pull request references Jira Issue OCPBUGS-76451, which is invalid:

  • expected the bug to be in one of the following states: NEW, ASSIGNED, POST, but it is MODIFIED instead
  • release note text must be set and not match the template OR release note type must be set to "Release Note Not Required". For more information you can reference the OpenShift Bug Process.
  • expected Jira Issue OCPBUGS-76451 to depend on a bug in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but no dependents were found

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

This is an automated cherry-pick of #9799

/assign bitoku

Fixed a panic when concurrent StopContainer calls race against the stop lifecycle completing.

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 openshift-eng/jira-lifecycle-plugin repository.

@bitoku

bitoku commented Mar 13, 2026

Copy link
Copy Markdown
Contributor

/jira refresh

@openshift-ci-robot

Copy link
Copy Markdown

@bitoku: This pull request references Jira Issue OCPBUGS-76451, which is invalid:

  • release note text must be set and not match the template OR release note type must be set to "Release Note Not Required". For more information you can reference the OpenShift Bug Process.
  • expected Jira Issue OCPBUGS-76451 to depend on a bug in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but no dependents were found

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

Details

In response to this:

/jira refresh

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 openshift-eng/jira-lifecycle-plugin repository.

@bitoku

bitoku commented Mar 13, 2026

Copy link
Copy Markdown
Contributor

/jira refresh

@openshift-ci-robot openshift-ci-robot added the jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. label Mar 13, 2026
@codecov

codecov Bot commented Mar 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.82%. Comparing base (f998e4a) to head (f75bc6e).
⚠️ Report is 26 commits behind head on release-1.35.

Additional details and impacted files
@@               Coverage Diff                @@
##           release-1.35    #9814      +/-   ##
================================================
+ Coverage         67.53%   67.82%   +0.29%     
================================================
  Files               211      211              
  Lines             29161    30098     +937     
================================================
+ Hits              19693    20415     +722     
- Misses             7793     7974     +181     
- Partials           1675     1709      +34     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions

Copy link
Copy Markdown

A friendly reminder that this PR had no activity for 30 days.

@github-actions github-actions Bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 13, 2026
@bitoku bitoku closed this Apr 13, 2026
@bitoku bitoku reopened this Apr 13, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@openshift-cherrypick-robot: This pull request references Jira Issue OCPBUGS-76451. The bug has been updated to no longer refer to the pull request using the external bug tracker.

Details

In response to this:

This is an automated cherry-pick of #9799

/assign bitoku

Fixed a panic when concurrent StopContainer calls race against the stop lifecycle completing.

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot openshift-ci-robot added jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. and removed jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels Apr 13, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@openshift-cherrypick-robot: This pull request references Jira Issue OCPBUGS-76451, which is invalid:

  • expected the bug to be in one of the following states: NEW, ASSIGNED, POST, but it is ON_QA instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

This is an automated cherry-pick of #9799

/assign bitoku

Fixed a panic when concurrent StopContainer calls race against the stop lifecycle completing.

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 openshift-eng/jira-lifecycle-plugin repository.

@bitoku

bitoku commented Apr 13, 2026

Copy link
Copy Markdown
Contributor

@cri-o/cri-o-maintainers PTAL

@haircommander

Copy link
Copy Markdown
Member

/approve
/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Apr 13, 2026
@openshift-ci

openshift-ci Bot commented Apr 13, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: haircommander, openshift-cherrypick-robot

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

The pull request process is described here

Details 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

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 13, 2026
@github-actions github-actions Bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 14, 2026
@sabujmaity

Copy link
Copy Markdown
Contributor

/retest

4 similar comments
@sabujmaity

Copy link
Copy Markdown
Contributor

/retest

@bitoku

bitoku commented Apr 27, 2026

Copy link
Copy Markdown
Contributor

/retest

@bitoku

bitoku commented Apr 28, 2026

Copy link
Copy Markdown
Contributor

/retest

@bitoku

bitoku commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

/retest

@fgallott

Copy link
Copy Markdown

/test images

2 similar comments
@ashwindasr

Copy link
Copy Markdown

/test images

@fgallott

Copy link
Copy Markdown

/test images

@bitoku

bitoku commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

/retest

@openshift-merge-bot openshift-merge-bot Bot merged commit b7a5104 into cri-o:release-1.35 Apr 30, 2026
85 of 93 checks passed
@openshift-ci-robot

Copy link
Copy Markdown

@openshift-cherrypick-robot: Jira Issue OCPBUGS-76451: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-76451 has been moved to the MODIFIED state.

Details

In response to this:

This is an automated cherry-pick of #9799

/assign bitoku

Fixed a panic when concurrent StopContainer calls race against the stop lifecycle completing.

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-cherrypick-robot

Copy link
Copy Markdown
Author

@bitoku: #9814 failed to apply on top of branch "release-1.34":

Applying: fix: prevent panic on closed stopTimeoutChan in StopContainer
Using index info to reconstruct a base tree...
M	internal/oci/container.go
M	internal/oci/container_test.go
Falling back to patching base and 3-way merge...
Auto-merging internal/oci/container_test.go
CONFLICT (content): Merge conflict in internal/oci/container_test.go
Auto-merging internal/oci/container.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 fix: prevent panic on closed stopTimeoutChan in StopContainer

Details

In response to this:

/cherry-pick release-1.34

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-sigs/prow repository.

@openshift-ci

openshift-ci Bot commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

@openshift-cherrypick-robot: 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
ci/prow/e2e-aws-ovn f75bc6e link unknown /test e2e-aws-ovn

Full PR test history. Your PR dashboard.

Details

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-sigs/prow 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

approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. jira/severity-moderate Referenced Jira bug's severity is moderate for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants