Skip to content

Fix data race issue in globalShadowMode variable#370

Merged
mattklein123 merged 2 commits intoenvoyproxy:mainfrom
renuka-fernando:race-issue
Nov 4, 2022
Merged

Fix data race issue in globalShadowMode variable#370
mattklein123 merged 2 commits intoenvoyproxy:mainfrom
renuka-fernando:race-issue

Conversation

@renuka-fernando
Copy link
Copy Markdown
Contributor

Description

GlobalShadowMode is written when the config is reloaded from environment variables

this.globalShadowMode = rlSettings.GlobalShadowMode

And it is read here

if finalCode == pb.RateLimitResponse_OVER_LIMIT && this.globalShadowMode {

which may lead to a data race condition

globalShadowMode is written when config is reloaded and read in here, which may lead to data race condition

Signed-off-by: Renuka Fernando <renukapiyumal@gmail.com>
Signed-off-by: Renuka Fernando <renukapiyumal@gmail.com>
@mattklein123 mattklein123 merged commit bc3eca4 into envoyproxy:main Nov 4, 2022
barroca pushed a commit to barroca/ratelimit that referenced this pull request Sep 1, 2023
globalShadowMode is written when config is reloaded and read in here, which may lead to data race condition

Signed-off-by: Renuka Fernando <renukapiyumal@gmail.com>
timcovar pushed a commit to goatapp/ratelimit that referenced this pull request Jan 16, 2024
globalShadowMode is written when config is reloaded and read in here, which may lead to data race condition

Signed-off-by: Renuka Fernando <renukapiyumal@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants