-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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(apf): not reset apf when panic #111850
Conversation
Please note that we're already in Test Freeze for the Fast forwards are scheduled to happen every 6 hours, whereas the most recent run was: Mon Aug 15 01:36:41 UTC 2022. |
Hi @leileiwan. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the 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. |
/assign @MikeSpreitzer @tkashem |
@@ -172,7 +172,7 @@ func (cfgCtlr *configController) Handle(ctx context.Context, requestDigest Reque | |||
defer func() { | |||
klog.V(7).Infof("Handle(%#+v) => fsName=%q, distMethod=%#+v, plName=%q, isExempt=%v, queued=%v, Finish() => panicking=%v idle=%v", | |||
requestDigest, fs.Name, fs.Spec.DistinguisherMethod, pl.Name, isExempt, queued, panicking, idle) | |||
if idle { | |||
if idle && !panicking { |
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.
We explicitly considered and rejected this behavior, see #97206 (comment) .
#111852 reports multiple mysteries, the problem likely lies in one or more of those.
OK, here's the real bug. The problem is normally masked because Finish always returns idle=false; the problem is exposed when a panic rips past Finish returning. The right fix is to make This does not explain why a syncOnce invocation took 12 minutes; that is a separate mystery. |
|
ok, fix maybeReap is better.
|
@@ -869,6 +869,10 @@ func (cfgCtlr *configController) maybeReap(plName string) { | |||
klog.V(7).Infof("plName=%s, plState==nil", plName) | |||
return | |||
} | |||
if plState.queues == nil { | |||
klog.V(7).Infof("plName=%s, plState.quiescing=%v, plState.numPending=%d, plState.queues==nil", plName, plState.quiescing, plState.numPending) |
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.
This log message should explicitly say that the priority level is exempt. BTW, for an exempt priority level it is certain that: it is not quiescing and it has no queues; there is no value in printing those things in a message that also explicitly says "exempt". The numPending
is not fixed, but also not relevant, so it would be fine to not print that either.
if plState.queues == nil { | ||
klog.V(7).Infof("plName=%s, plState.quiescing=%v, plState.numPending=%d, plState.queues==nil", plName, plState.quiescing, plState.numPending) | ||
return | ||
} | ||
if plState.queues != nil { |
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.
No need for an if
statement here, the condition is certainly true.
I am having trouble understanding the words in #111850 (comment) about the syncOne invocation that took 12 minutes. Certainly there are locks acquired during that time. They are all intended to be held for only a brief amount of time; it is hard to understand why there would be a noticeable wait to acquire any of them. Except for the locks in sample-and-watermark histograms. Normally those are held for only a short amount of time, but if it has been a long wall-clock time since the last update, then the next update can hold the lock for a long time. This was fixed for release 1.19 by #94146. Of course, I do not actually know if this is the explanation for that 12 minute syncOnce. |
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.
/lgtm
Thanks!
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: leileiwan, MikeSpreitzer The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/release-note-none |
@leileiwan : see https://github.com/kubernetes/community/blob/master/contributors/devel/sig-release/cherry-picks.md for how to propagate this back to supported earlier releases. |
issue: #111852