Skip to content
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

Concurrent map writes while generating Es Pod annotations #5946

Closed
barkbay opened this issue Aug 12, 2022 · 0 comments · Fixed by #5947
Closed

Concurrent map writes while generating Es Pod annotations #5946

barkbay opened this issue Aug 12, 2022 · 0 comments · Fixed by #5947
Assignees
Labels
>bug Something isn't working v2.4.0

Comments

@barkbay
Copy link
Contributor

barkbay commented Aug 12, 2022

The DefaultAnnotation map is shared across all the goroutines/workers.
It may lead to:

  • Pods not being annotated correctly
  • Operator crash:
/go/src/github.com/elastic/cloud-on-k8s/pkg/controller/elasticsearch/nodespec/podspec.go:186 +0x255 fp=0xc003eb7f88 sp=0xc003eb7778 pc=0x17aabd5
github.com/elastic/cloud-on-k8s/pkg/controller/elasticsearch/nodespec.buildAnnotations({{{0x1860929, 0xd}, {0xc005dad320, 0x1f}}, {{0xc00712d998, 0x14}, {0x0, 0x0}, {0xc00712d9b0, 0x11}, ...}, ...}, ...)
/usr/local/go/src/runtime/map_faststr.go:294 +0x38b fp=0xc003eb7778 sp=0xc003eb7710 pc=0x41304b
runtime.mapassign_faststr(0x19f9a20, 0xc000230ed0, {0x1c9dbd0, 0x28})
/usr/local/go/src/runtime/panic.go:1198 +0x71 fp=0xc003eb7710 sp=0xc003eb76e0 pc=0x435ab1
runtime.throw({0x1c7c756, 0xc0000cdd40})
goroutine 1580 [running]:
fatal error: concurrent map writes
@barkbay barkbay added the >bug Something isn't working label Aug 12, 2022
@barkbay barkbay self-assigned this Aug 12, 2022
@barkbay barkbay added the v2.4.0 label Aug 12, 2022
pebrc added a commit that referenced this issue Oct 25, 2022
pebrc added a commit to pebrc/cloud-on-k8s that referenced this issue Oct 25, 2022
(cherry picked from commit ca4ff25)

# Conflicts:
#	docs/release-notes/highlights-2.2.0.asciidoc
pebrc added a commit to pebrc/cloud-on-k8s that referenced this issue Oct 25, 2022
(cherry picked from commit ca4ff25)

# Conflicts:
#	docs/release-notes/highlights-2.3.0.asciidoc
pebrc added a commit to pebrc/cloud-on-k8s that referenced this issue Oct 25, 2022
(cherry picked from commit ca4ff25)

# Conflicts:
#	docs/release-notes/highlights-2.2.0.asciidoc
#	docs/release-notes/highlights-2.3.0.asciidoc
pebrc added a commit to pebrc/cloud-on-k8s that referenced this issue Oct 25, 2022
(cherry picked from commit ca4ff25)

# Conflicts:
#	docs/release-notes/highlights-2.1.0.asciidoc
#	docs/release-notes/highlights-2.2.0.asciidoc
#	docs/release-notes/highlights-2.3.0.asciidoc
pebrc added a commit that referenced this issue Oct 25, 2022
(cherry picked from commit ca4ff25)

# Conflicts:
#	docs/release-notes/highlights-2.2.0.asciidoc
pebrc added a commit that referenced this issue Oct 25, 2022
(cherry picked from commit ca4ff25)

# Conflicts:
#	docs/release-notes/highlights-2.3.0.asciidoc
pebrc added a commit that referenced this issue Oct 25, 2022
(cherry picked from commit ca4ff25)

# Conflicts:
#	docs/release-notes/highlights-2.2.0.asciidoc
#	docs/release-notes/highlights-2.3.0.asciidoc
pebrc added a commit that referenced this issue Oct 25, 2022
(cherry picked from commit ca4ff25)

# Conflicts:
#	docs/release-notes/highlights-2.1.0.asciidoc
#	docs/release-notes/highlights-2.2.0.asciidoc
#	docs/release-notes/highlights-2.3.0.asciidoc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug Something isn't working v2.4.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant