Skip to content

Panic: patchRouteWithRateLimit should check if xdsRouteAction is nil #2103

Closed
@Xunzhuo

Description

@Xunzhuo

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions