-
Notifications
You must be signed in to change notification settings - Fork 928
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
karmada-search may crash due to concurrent map read and map write
#3960
Comments
@tedli You are using v1.6.1, right? |
Yes. |
From the log you provided, it seems that But I don't know where You did two searches at the same time? |
Hi @zishen ,
Did you mean two replicas of search deployment? If so, no, only one replica. |
I mean the two searches request. |
Hi @zishen ,
Maybe. This is my production setup, with front ui, so there may be multi request happens at same time. By the way.
It seemed all goroutines were dumped, not only goroutines that caused this panic. |
/assign |
What happened:
search
pod crashed,fatal error: concurrent map read and map write
.What you expected to happen:
If errors occurred, log detail, or if caused by concurrent map read and map write, add lock to avoid it.
How to reproduce it (as minimally and precisely as possible):
No idea. 🤣
Anything else we need to know?:
search.log
The log didn't point out exactly where caused this, it makes sense, because when we talk about concurrent map read and map write, it must be at least 2 place, reading or writing, so it's not caused by a particular line of code, it should be caused by some code happened at a same time.
karmada/pkg/registry/search/storage/cache.go
Lines 142 to 159 in 5f16640
My point of view is that, it may caused by line
152
, adding entry to annotations map, meanwhile other logic reading it, becauseruntime.Object
is a reference, not a value.Environment:
kubectl-karmada version
orkarmadactl version
):The text was updated successfully, but these errors were encountered: