Skip to content

Nil pointer exception when enabling http3 #5660

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

Open
alviss7 opened this issue Apr 3, 2025 · 4 comments · Fixed by #5671
Open

Nil pointer exception when enabling http3 #5660

alviss7 opened this issue Apr 3, 2025 · 4 comments · Fixed by #5671
Assignees
Labels
Milestone

Comments

@alviss7
Copy link

alviss7 commented Apr 3, 2025

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"}```
@alviss7 alviss7 added the triage label Apr 3, 2025
@arkodg arkodg added kind/bug Something isn't working help wanted Extra attention is needed and removed triage labels Apr 4, 2025
@arkodg arkodg added this to the v1.4.0-rc.1 milestone Apr 4, 2025
@Xunzhuo Xunzhuo self-assigned this Apr 7, 2025
@Xunzhuo Xunzhuo removed the help wanted Extra attention is needed label Apr 7, 2025
@arkodg arkodg modified the milestones: v1.4.0-rc.1, v1.4.0 Apr 24, 2025
@nfarhadian
Copy link

Hello

It's not fixed yet, here is the new stack Trace

goroutine 205 [running]:
runtime/debug.Stack()

  /opt/hostedtoolcache/go/1.24.2/x64/src/runtime/debug/stack.go:26 +0x5e
github.com/envoyproxy/gateway/internal/message.handleWithCrashRecovery[...].func1()
  /home/runner/work/gateway/gateway/internal/message/watchutil.go:54 +0x1fe
panic({0x337cd60?, 0xb160740?})
  /opt/hostedtoolcache/go/1.24.2/x64/src/runtime/panic.go:792 +0x132
github.com/envoyproxy/gateway/internal/xds/translator.(*Translator).addHCMToXDSListener(0xc0034378e8, 0x0, 0xc0039e3b00, 0x28cb?, 0x0, 0x1, 0x0)
  /home/runner/work/gateway/gateway/internal/xds/translator/listener.go:439 +0x1431
github.com/envoyproxy/gateway/internal/xds/translator.(*Translator).processHTTPListenerXdsTranslation(0xc0034378e8, 0xc000637ce0, {0xc000b71ae8, 0x3, 0x3ab5b71?}, 0xc000bfb620, 0x0, 0x0)
  /home/runner/work/gateway/gateway/internal/xds/translator/translator.go:336 +0x4e5
github.com/envoyproxy/gateway/internal/xds/translator.(*Translator).Translate(0xc0034378e8, 0xc000dc2d20)
  /home/runner/work/gateway/gateway/internal/xds/translator/translator.go:97 +0x125
github.com/envoyproxy/gateway/internal/xds/translator/runner.(*Runner).subscribeAndTranslate.func1({{0xc0017d4930?, 0x53c9627a16aafdf9?}, 0x80?, 0xc000dc2d20?}, 0xc003702ee0)
  /home/runner/work/gateway/gateway/internal/xds/translator/runner/runner.go:90 +0x2ca
github.com/envoyproxy/gateway/internal/message.handleWithCrashRecovery[...](0xc003437fa0?, {{0xc0017d4930, 0x0?}, 0x0?, 0xc000dc2d20?}, {{0x3ab5b71, 0xe}, {0x3aa10a6, 0x6}}, 0xc003702ee0?)
  /home/runner/work/gateway/gateway/internal/message/watchutil.go:60 +0x137
github.com/envoyproxy/gateway/internal/message.HandleSubscription[...]({{0x3ab5b71, 0x0?}, {0x3aa10a6?, 0x0?}}, 0xc0036d8770?, 0xc003437fa0)
  /home/runner/work/gateway/gateway/internal/message/watchutil.go:99 +0x7b0
github.com/envoyproxy/gateway/internal/xds/translator/runner.(*Runner).subscribeAndTranslate(0xc002738510, 0xc000bb1d60?)
  /home/runner/work/gateway/gateway/internal/xds/translator/runner/runner.go:59 +0x50
created by github.com/envoyproxy/gateway/internal/xds/translator/runner.(*Runner).Start in goroutine 112
  /home/runner/work/gateway/gateway/internal/xds/translator/runner/runner.go:52 +0x2df

@arkodg
Copy link
Contributor

arkodg commented May 16, 2025

@nfarhadian which version are you on ?

@alviss7
Copy link
Author

alviss7 commented May 16, 2025

@arkodg I see the same thing, I'm in version 1.4.0

@arkodg arkodg reopened this May 16, 2025
@arkodg
Copy link
Contributor

arkodg commented May 16, 2025

ptal @Xunzhuo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants