tektoncd / results

Long term storage of execution results.
Apache License 2.0
78 stars 74 forks source link

Panic in API server #869

Closed khrm closed 1 week ago

khrm commented 2 weeks ago

Expected Behavior

No panic or restart.

Actual Behavior

tekton-results-api-5dc578d755-rx7kh api 2024/11/03 16:05:11 http2: panic serving 10.129.0.9:48222: runtime error: invalid memory address or nil pointer dereference
tekton-results-api-5dc578d755-rx7kh api goroutine 101 [running]:
tekton-results-api-5dc578d755-rx7kh api net/http.(*http2serverConn).runHandler.func1()
tekton-results-api-5dc578d755-rx7kh api     net/http/h2_bundle.go:6242 +0x145
tekton-results-api-5dc578d755-rx7kh api panic({0x2468980?, 0x412bdd0?})
tekton-results-api-5dc578d755-rx7kh api     runtime/panic.go:785 +0x132
tekton-results-api-5dc578d755-rx7kh api github.com/tektoncd/results/pkg/api/server/v1alpha2.(*LogPluginServer).getLokiLogs(0xc000318700, {0x7f28d431b1d8, 0xc000134068}, {0xc0000c6a4a, 0x4}, 0xc0008b2300)
tekton-results-api-5dc578d755-rx7kh api     github.com/tektoncd/results/pkg/api/server/v1alpha2/plugin_logs.go:186 +0x1a9c
tekton-results-api-5dc578d755-rx7kh api github.com/tektoncd/results/pkg/api/server/v1alpha2.(*LogPluginServer).GetPluginLogs(0xc000318700, {0x7f28d431b1d8, 0xc000134068}, {0xc0000c6a4a, 0x4}, 0xc0008b2300)
tekton-results-api-5dc578d755-rx7kh api     github.com/tektoncd/results/pkg/api/server/v1alpha2/plugin_logs.go:81 +0x8b
tekton-results-api-5dc578d755-rx7kh api github.com/tektoncd/results/pkg/api/server/v1alpha2.Handler.(*LogPluginServer).logMux.func1({0x2c6efa0, 0xc000134068}, 0xc00027d400)
tekton-results-api-5dc578d755-rx7kh api     github.com/tektoncd/results/pkg/api/server/v1alpha2/plugin_logs.go:281 +0x3dd
tekton-results-api-5dc578d755-rx7kh api net/http.HandlerFunc.ServeHTTP(0xc000894380?, {0x2c6efa0?, 0xc000134068?}, 0xc000349a00?)
tekton-results-api-5dc578d755-rx7kh api     net/http/server.go:2220 +0x29
tekton-results-api-5dc578d755-rx7kh api net/http.(*ServeMux).ServeHTTP(0x0?, {0x2c6efa0, 0xc000134068}, 0xc00027d400)
tekton-results-api-5dc578d755-rx7kh api     net/http/server.go:2747 +0x1ca
tekton-results-api-5dc578d755-rx7kh api main.main.grpcHandler.func25({0x2c6efa0?, 0xc000134068?}, 0xc00027d400?)
tekton-results-api-5dc578d755-rx7kh api     github.com/tektoncd/results/cmd/api/main.go:338 +0xa5
tekton-results-api-5dc578d755-rx7kh api net/http.HandlerFunc.ServeHTTP(0xc00076f7a0?, {0x2c6efa0?, 0xc000134068?}, 0xc00058dcc0?)
tekton-results-api-5dc578d755-rx7kh api     net/http/server.go:2220 +0x29
tekton-results-api-5dc578d755-rx7kh api golang.org/x/net/http2/h2c.h2cHandler.ServeHTTP({{0x2c4e240?, 0xc0005b8500?}, 0xc0007570e0?}, {0x2c6efa0, 0xc000134068}, 0xc00027d400)
tekton-results-api-5dc578d755-rx7kh api     golang.org/x/net@v0.26.0/http2/h2c/h2c.go:125 +0x673
tekton-results-api-5dc578d755-rx7kh api net/http.serverHandler.ServeHTTP({0x1?}, {0x2c6efa0?, 0xc000134068?}, 0xc0004af0c0?)
tekton-results-api-5dc578d755-rx7kh api     net/http/server.go:3210 +0x8e
tekton-results-api-5dc578d755-rx7kh api net/http.initALPNRequest.ServeHTTP({{0x2c7d9e8?, 0xc0008999b0?}, 0xc0008b6e08?, {0xc00089e5a0?}}, {0x2c6efa0, 0xc000134068}, 0xc00027d400)
tekton-results-api-5dc578d755-rx7kh api     net/http/server.go:3819 +0x231
tekton-results-api-5dc578d755-rx7kh api net/http.(*http2serverConn).runHandler(0x971320?, 0xc000752440?, 0xc0000837b0?, 0xc0000837a0?)
tekton-results-api-5dc578d755-rx7kh api     net/http/h2_bundle.go:6249 +0xf5
tekton-results-api-5dc578d755-rx7kh api created by net/http.(*http2serverConn).scheduleHandler in goroutine 114
tekton-results-api-5dc578d755-rx7kh api     net/http/h2_bundle.go:6183 +0x21d

Steps to Reproduce the Problem

  1. Use Main branch
khrm commented 2 weeks ago

/assign @khrm

khrm commented 1 week ago

This was fixed by https://github.com/tektoncd/results/commit/f05624177c55bc4c4e2df1994531e46321ee0e88

khrm commented 1 week ago

/close