Skip to content

fix: nil pointer reference in DNS benchmark test#44542

Merged
bimmlerd merged 1 commit intocilium:mainfrom
vipul-21:singhvipul/fix
Mar 3, 2026
Merged

fix: nil pointer reference in DNS benchmark test#44542
bimmlerd merged 1 commit intocilium:mainfrom
vipul-21:singhvipul/fix

Conversation

@vipul-21
Copy link
Copy Markdown
Contributor

Fixes the nil pointer dereference in the DNS benchmark test due to LocalNodeStore being nil.

Running tool: /snap/go/current/bin/go test -test.fullpath=true -benchmem -run=^$ -coverprofile=/tmp/vscode-godFwrEL/go-code-cover -bench . github.com/cilium/cilium/pkg/fqdn/messagehandler

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x25ec9f3]

goroutine 93 [running]:
github.com/cilium/cilium/pkg/node.(*LocalNodeStore).Get(_, {_, _})
	/home/singhvipul/ws/cilium/pkg/node/local_node_store.go:170 +0x53
github.com/cilium/cilium/pkg/proxy/accesslog.(*proxyAccessLogger).NewLogRecord(0xc00098c050, {0x38547c8, 0x5acf8a0}, {0x339712e, 0x8}, 0x88?, {0xc0006086c0, 0x4, 0xc0003ec014?})
	/home/singhvipul/ws/cilium/pkg/proxy/accesslog/proxy_access_logger.go:74 +0x254
github.com/cilium/cilium/pkg/fqdn/messagehandler.(*dnsMessageHandler).NotifyOnDNSMsg(0xc0007442c0, {0x35391f8?, 0xc0005a2fb8?, 0x5582260?}, 0xc00025e008, {0x33b4268, 0x10}, 0x0, {{{0x0, 0xffff0a604001}, ...}, ...}, ...)
	/home/singhvipul/ws/cilium/pkg/fqdn/messagehandler/message_handler.go:235 +0xbbe
github.com/cilium/cilium/pkg/fqdn/messagehandler.BenchmarkNotifyOnDNSMsg.func1()
	/home/singhvipul/ws/cilium/pkg/fqdn/messagehandler/message_handler_test.go:143 +0x199
created by github.com/cilium/cilium/pkg/fqdn/messagehandler.BenchmarkNotifyOnDNSMsg in goroutine 66
	/home/singhvipul/ws/cilium/pkg/fqdn/messagehandler/message_handler_test.go:137 +0xd10
exit status 2
FAIL	github.com/cilium/cilium/pkg/fqdn/messagehandler	0.090s
FAIL

fix: nil pointer reference in DNS benchmark test

@vipul-21 vipul-21 requested a review from a team as a code owner February 26, 2026 18:45
@vipul-21 vipul-21 requested a review from bimmlerd February 26, 2026 18:45
@maintainer-s-little-helper maintainer-s-little-helper bot added the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Feb 26, 2026
@github-actions github-actions bot added the sig/policy Impacts whether traffic is allowed or denied based on user-defined policies. label Feb 26, 2026
@vipul-21
Copy link
Copy Markdown
Contributor Author

/test

@joestringer joestringer added the release-note/ci This PR makes changes to the CI. label Feb 27, 2026
@maintainer-s-little-helper maintainer-s-little-helper bot removed the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Feb 27, 2026
Copy link
Copy Markdown
Member

@bimmlerd bimmlerd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change LGTM. Please add

Fixes: 8119ae5c79 (proxy/accesslog: use `LocalNodeStore` to retrieve node IPs)

to the commit message. (cc @mhofstetter)

(I'll remove the dont-merge/discussion label once you've amended the commit message - just to avoid this getting auto-merged 😅 )

@joestringer joestringer added this pull request to the merge queue Mar 2, 2026
@maintainer-s-little-helper 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 Mar 2, 2026
@bimmlerd bimmlerd removed this pull request from the merge queue due to a manual request Mar 2, 2026
@bimmlerd bimmlerd added the dont-merge/discussion A discussion is ongoing and should be resolved before merging, regardless of reviews & tests status. label Mar 2, 2026
@vipul-21
Copy link
Copy Markdown
Contributor Author

vipul-21 commented Mar 2, 2026

@bimmlerd I updated the commit message and removed the label as well.

@vipul-21 vipul-21 removed the dont-merge/discussion A discussion is ongoing and should be resolved before merging, regardless of reviews & tests status. label Mar 2, 2026
@bimmlerd
Copy link
Copy Markdown
Member

bimmlerd commented Mar 2, 2026

/test

Copy link
Copy Markdown
Member

@bimmlerd bimmlerd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, but I think you've added some new changes to the commit, was that intentional?

Fixes: 8119ae5 (proxy/accesslog: use `LocalNodeStore` to retrieve node IPs)

Signed-off-by: Vipul Singh <singhvipul@microsoft.com>
@vipul-21
Copy link
Copy Markdown
Contributor Author

vipul-21 commented Mar 2, 2026

@bimmlerd yeah that not suppose to be a part of this PR :( . Removed it. I think those were already staged and got committed with the change.

@vipul-21 vipul-21 requested a review from bimmlerd March 2, 2026 16:15
@vipul-21
Copy link
Copy Markdown
Contributor Author

vipul-21 commented Mar 2, 2026

/test

@joestringer joestringer removed the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Mar 2, 2026
Copy link
Copy Markdown
Member

@bimmlerd bimmlerd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM again, thanks!

@maintainer-s-little-helper 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 Mar 3, 2026
@bimmlerd bimmlerd added this pull request to the merge queue Mar 3, 2026
Merged via the queue into cilium:main with commit e946c64 Mar 3, 2026
79 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/ci This PR makes changes to the CI. sig/policy Impacts whether traffic is allowed or denied based on user-defined policies.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants