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
fqdn: Fix panic on MarshalJSON() #12218
Merged
aanm
merged 1 commit into
master
from
pr/pchaigno/fix-lock-dnszombiemappings-marshaljson
Jun 22, 2020
Merged
fqdn: Fix panic on MarshalJSON() #12218
aanm
merged 1 commit into
master
from
pr/pchaigno/fix-lock-dnszombiemappings-marshaljson
Jun 22, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pchaigno
added
kind/bug
This is a bug in the Cilium logic.
release-note/bug
This PR fixes an issue in a previous release of Cilium.
labels
Jun 22, 2020
aanm
approved these changes
Jun 22, 2020
test-me-please |
tklauser
approved these changes
Jun 22, 2020
We need to hold a lock on DNSZombieMappings when calling json.Marshal(), otherwise we risk hitting panics on concurrent writes. panic: reflect: call of reflect.Value.IsNil on zero Value [recovered] goroutine 2807 [running]: ... panic(...) /usr/local/go/src/runtime/panic.go:679 +0x1b2 reflect.Value.IsNil(...) /usr/local/go/src/reflect/value.go:1073 ... github.com/cilium/cilium/pkg/fqdn.(*DNSZombieMappings).MarshalJSON(...) /go/src/github.com/cilium/cilium/pkg/fqdn/cache.go:949 +0x3b Fixes: f629372 ("fqdn: Add and use DNSZombieMappings in Endpoint") Signed-off-by: Paul Chaignon <paul@cilium.io>
pchaigno
force-pushed
the
pr/pchaigno/fix-lock-dnszombiemappings-marshaljson
branch
from
June 22, 2020 09:49
50eefb5
to
65c15cb
Compare
test-me-please |
maintainer-s-little-helper
bot
added
the
ready-to-merge
This PR has passed all tests and received consensus from code owners to merge.
label
Jun 22, 2020
maintainer-s-little-helper
bot
moved this from Needs backport from master
to Backport pending to v1.7
in 1.7.6
Jun 22, 2020
maintainer-s-little-helper
bot
moved this from Backport pending to v1.7
to Backport done to v1.7
in 1.7.6
Jun 22, 2020
This was referenced Jun 24, 2020
maintainer-s-little-helper
bot
moved this from Needs backport from master
to Backport pending to v1.8
in 1.8.0
Jun 24, 2020
maintainer-s-little-helper
bot
moved this from Backport pending to v1.8
to Backport done to v1.8
in 1.8.0
Jun 24, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
kind/bug
This is a bug in the Cilium logic.
ready-to-merge
This PR has passed all tests and received consensus from code owners to merge.
release-note/bug
This PR fixes an issue in a previous release of Cilium.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We need to hold a lock on
DNSZombieMappings
when callingjson.Marshal()
, otherwise we risk hitting panics on concurrent writes.Fixes: f629372 ("fqdn: Add and use DNSZombieMappings in Endpoint")