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
pkg/eventqueue: fix concurrent access of waitConsumeOffQueue #10137
Conversation
6ccefe3
to
f336373
Compare
spanStart of waitConsumeOffQueue could be read before being written in case the buffered event was executed before the execution of waitConsumeOffQueue.Start() in the modified lines of this commit. To fix this we should execute waitConsumeOffQueue.Start() even before the event is put into the queue. Although it does not give the correct span stat, the developer or user can derive it by subtracting the waitEnqueue span to retrieve the real waitConsumeOffQueue span. Fixes: add0d65 ("add eventqueue package") Signed-off-by: André Martins <andre@cilium.io>
f336373
to
2a67492
Compare
test-me-please |
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.
Good catch !
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.
If we intend to backport this, please consider adding a more user-friendly release-note describing briefly the impact. At a glance this looks like just a statistics fixup, but the current PR title suggests potentially a lot more.
spanStart of waitConsumeOffQueue could be read before being written in
case the buffered event was executed before the execution of
waitConsumeOffQueue.Start() in the modified lines of this commit. To fix
this we should execute waitConsumeOffQueue.Start() even before the event
is put into the queue. Although it does not give the correct span stat,
the developer or user can derieve it by subtracting the waitEnqueue span
to retrieve the real waitConsumeOffQueue span.
Fixes: add0d65 ("add eventqueue package")
Signed-off-by: André Martins andre@cilium.io
This change is