Skip to content

Nil pointer exception when enabling http3 #5660

Open
@alviss7

Description

@alviss7

Description:
When enabling HTTP/3 through the creation of a ClientTrafficPolicy object, an error occurs in Envoy Gateway, preventing the configuration from being applied. In addition to the error message observed in the logs, Envoy Gateway stops applying any new configuration unless HTTP/3 is disabled.

Repro steps:

apiVersion: gateway.envoyproxy.io/v1alpha1
kind: ClientTrafficPolicy
metadata:
  name: shared-gateway
spec:
  http3: {}
  targetRefs:
    - group: gateway.networking.k8s.io
      kind: Gateway
      name: shared-gateway

Environment:
v1.3.2

Logs:

runtime/debug.Stack()
    /opt/hostedtoolcache/go/1.23.7/x64/src/runtime/debug/stack.go:26 +0x64
github.com/envoyproxy/gateway/internal/message.handleWithCrashRecovery[...].func1()
    /home/runner/work/gateway │/gateway/internal/message/watchutil.go:52 +0x154
panic({0x27b5200?, 0x9f2a750?})
    /opt/hostedtoolcache/go/1.23.7/x64/src/runtime/panic.go:791 +0x124
github.com/envoyproxy/gateway/internal/xds/translator.addXdsTLSInspectorFilter(0x0)
    /home/runner/work/gateway/gateway/internal/xds/translator/listener.go:639 +0x20
github.com/envoyproxy/gateway/internal/xds/translator.a │ddServerNamesMatch(0x0, 0x40029af180, {0x4002a50390, 0x1, 0x1})
    /home/runner/work/gateway/gateway/internal/xds/translator/listener.go:504 +0xc0
github.com/envoyproxy/gateway/internal/xds/translator.(*Translator).addHCMToXDSListener(0x400121d8e8, 0x0, 0x400262d700, 0x28cb?, 0x0, 0x1, 0x0)
    /home/runner/work/gateway/gateway/internal/xds/translator/listener.go:413 +0xed8 │
github.com/envoyproxy/gateway/internal/xds/translator.(*Translator).processHTTPListenerXdsTranslation(0x400121d8e8, 0x40022f3180, {0x4002a502d0, 0x2, 0x400121d448?}, 0x4002a58120, 0x0, 0x0)
    /home/runner/work/gateway/gateway/internal/xds/translator/translator.go:375 +0x37c
github.com/envoyproxy/gateway/internal/xds/translator.(*Translator).Translate(0x400121d8e8, 0x400 │2a4bb00)
    /home/runner/work/gateway/gateway/internal/xds/translator/translator.go:92 +0x68
github.com/envoyproxy/gateway/internal/xds/translator/runner.(*Runner).subscribeAndTranslate.func1({{0x4001b669e0?, 0x7f0e8?}, 0x2?, 0x4002a4bb00?}, 0x400052a310)
    /home/runner/work/gateway/gateway/internal/xds/translator/runner/runner.go:83 +0x210
github.com/envoyproxy/gateway/ │internal/message.handleWithCrashRecovery[...](0x400121df88?, {{0x4001b669e0, 0x2?}, 0x38?, 0x4002a4bb00?}, {{0x2e01d1a?, 0x0?}, {0x2dedd68?, 0x23a94?}}, 0x400052a310?)
    /home/runner/work/gateway/gateway/internal/message/watchutil.go:58 +0xdc
github.com/envoyproxy/gateway/internal/message.HandleSubscription[...]({{0x2e01d1a, 0x7dcd020?}, {0x2dedd68?, 0x400098b788?}}, 0x40 │02488380?, 0x400121df88)
    /home/runner/work/gateway/gateway/internal/message/watchutil.go:97 +0x4c0
github.com/envoyproxy/gateway/internal/xds/translator/runner.(*Runner).subscribeAndTranslate(0x40025e3100, {0x7dcd020?, 0x4000f80050?})
    /home/runner/work/gateway/gateway/internal/xds/translator/runner/runner.go:53 +0x84
created by github.com/envoyproxy/gateway/internal │/xds/translator/runner.(*Runner).Start in goroutine 36
    /home/runner/work/gateway/gateway/internal/xds/translator/runner/runner.go:46 +0x1d4
", "error": "runtime error: invalid memory address or nil pointer dereference"}```

Metadata

Metadata

Assignees

Labels

kind/bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions