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

Panic: patchRouteWithRateLimit should check if xdsRouteAction is nil #2103

Closed
Xunzhuo opened this issue Oct 28, 2023 · 0 comments · Fixed by #2104
Closed

Panic: patchRouteWithRateLimit should check if xdsRouteAction is nil #2103

Xunzhuo opened this issue Oct 28, 2023 · 0 comments · Fixed by #2104
Labels
kind/bug Something isn't working

Comments

@Xunzhuo
Copy link
Member

Xunzhuo commented Oct 28, 2023

Description:

2023-10-28T10:33:31.018Z	INFO	infrastructure	runner/runner.go:59	received an update	{"runner": "infrastructure"}
2023-10-28T10:33:31.018Z	INFO	provider	status/status.go:122	received a status update	{"runner": "provider", "namespace": "default", "name": "http-ratelimit"}
2023-10-28T10:33:31.019Z	INFO	xds-translator	runner/runner.go:54	received an update	{"runner": "xds-translator"}
2023-10-28T10:33:31.019Z	INFO	global-ratelimit	runner/runner.go:116	received a notification	{"runner": "global-ratelimit"}
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0xd0 pc=0x185b2fc]

goroutine 211 [running]:
github.com/envoyproxy/gateway/internal/xds/translator.patchRouteWithRateLimit(0x0, 0x1b723a0?)
	/Users/bitliu/github/gateway/internal/xds/translator/ratelimit.go:136 +0x3c
github.com/envoyproxy/gateway/internal/xds/translator.patchRouteWithFilters(0x400026bb30, 0x0?)
	/Users/bitliu/github/gateway/internal/xds/translator/httpfilters.go:128 +0x5c
github.com/envoyproxy/gateway/internal/xds/translator.buildXdsRoute(0x4000187540)
	/Users/bitliu/github/gateway/internal/xds/translator/route.go:80 +0xdf8
github.com/envoyproxy/gateway/internal/xds/translator.(*Translator).processHTTPListenerXdsTranslation(0x4000b2d348, 0x40008b62e0, {0x400079f470, 0x1, 0x4000b2d268?}, 0x186bf40?, 0x20?, 0x0)
	/Users/bitliu/github/gateway/internal/xds/translator/translator.go:203 +0x8b0
github.com/envoyproxy/gateway/internal/xds/translator.(*Translator).Translate(0x4000b2d348, 0x400092c680)
	/Users/bitliu/github/gateway/internal/xds/translator/translator.go:67 +0x60
github.com/envoyproxy/gateway/internal/xds/translator/runner.(*Runner).subscribeAndTranslate.func1({{0x4000b006f0?, 0x0?}, 0x50?, 0x400092c680?}, 0x0?)
	/Users/bitliu/github/gateway/internal/xds/translator/runner/runner.go:80 +0x1d0
github.com/envoyproxy/gateway/internal/message.HandleSubscription[...]({{0x1f07616, 0x225c858?}, {0x1efa998?, 0x0?}}, 0x4000114f60?, 0x4000b2df88)
	/Users/bitliu/github/gateway/internal/message/watchutil.go:76 +0xd74
github.com/envoyproxy/gateway/internal/xds/translator/runner.(*Runner).subscribeAndTranslate(0x40003ea180, {0x225c858?, 0x400035d400?})
	/Users/bitliu/github/gateway/internal/xds/translator/runner/runner.go:52 +0x88
created by github.com/envoyproxy/gateway/internal/xds/translator/runner.(*Runner).Start in goroutine 1
	/Users/bitliu/github/gateway/internal/xds/translator/runner/runner.go:45 +0x1f0

Repro steps:
when following https://gateway.envoyproxy.io/latest/user/rate-limit.

@Xunzhuo Xunzhuo added the kind/bug Something isn't working label Oct 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant