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

k8s: data race in io_k8s_component_base #372

Open
fionera opened this issue Jan 9, 2025 · 0 comments
Open

k8s: data race in io_k8s_component_base #372

fionera opened this issue Jan 9, 2025 · 0 comments
Labels
bug Something isn't working c/k8s Kubernetes component unfortunate Things which we wouldn't implement in an ideal world.

Comments

@fionera
Copy link
Contributor

fionera commented Jan 9, 2025

==================
WARNING: DATA RACE
Write at 0x00c000592dc0 by goroutine 7579:
  k8s.io/component-base/metrics.(*Histogram).WithContext()
      external/gazelle~~go_deps~io_k8s_component_base/metrics/histogram.go:116 +0x57a
  k8s.io/apiserver/pkg/authentication/request/x509.(*Authenticator).AuthenticateRequest()
      external/gazelle~~go_deps~io_k8s_apiserver/pkg/authentication/request/x509/x509.go:180 +0x4c9
  k8s.io/apiserver/pkg/authentication/request/union.(*unionAuthRequestHandler).AuthenticateRequest()
      external/gazelle~~go_deps~io_k8s_apiserver/pkg/authentication/request/union/union.go:56 +0xee
  k8s.io/apiserver/pkg/authentication/group.(*AuthenticatedGroupAdder).AuthenticateRequest()
      external/gazelle~~go_deps~io_k8s_apiserver/pkg/authentication/group/authenticated_group_adder.go:40 +0x62
  k8s.io/apiserver/pkg/authentication/request/union.(*unionAuthRequestHandler).AuthenticateRequest()
      external/gazelle~~go_deps~io_k8s_apiserver/pkg/authentication/request/union/union.go:56 +0xee
  k8s.io/apiserver/pkg/authentication/request/union.(*unionAuthRequestHandler).AuthenticateRequest()
      external/gazelle~~go_deps~io_k8s_apiserver/pkg/authentication/request/union/union.go:56 +0xee
  k8s.io/apiserver/pkg/endpoints/filters.withAuthentication.func1()
      external/gazelle~~go_deps~io_k8s_apiserver/pkg/endpoints/filters/authentication.go:67 +0x318
  net/http.HandlerFunc.ServeHTTP()
      GOROOT/src/net/http/server.go:2220 +0x47
  k8s.io/apiserver/pkg/endpoints/filterlatency.trackStarted.func1()
      external/gazelle~~go_deps~io_k8s_apiserver/pkg/endpoints/filterlatency/filterlatency.go:94 +0x4b5
  net/http.HandlerFunc.ServeHTTP()
      GOROOT/src/net/http/server.go:2220 +0x47
  k8s.io/apiserver/pkg/server.DefaultBuildHandlerChain.WithWarningRecorder.func11()
      external/gazelle~~go_deps~io_k8s_apiserver/pkg/endpoints/filters/warning.go:35 +0x11d
  net/http.HandlerFunc.ServeHTTP()
      GOROOT/src/net/http/server.go:2220 +0x47
  k8s.io/apiserver/pkg/server/filters.(*timeoutHandler).ServeHTTP()
      external/gazelle~~go_deps~io_k8s_apiserver/pkg/server/filters/timeout.go:87 +0x57d
  k8s.io/apiserver/pkg/server.DefaultBuildHandlerChain.WithRequestDeadline.withRequestDeadline.func28()
      external/gazelle~~go_deps~io_k8s_apiserver/pkg/endpoints/filters/request_deadline.go:65 +0x49d
  net/http.HandlerFunc.ServeHTTP()
      GOROOT/src/net/http/server.go:2220 +0x47
  k8s.io/apiserver/pkg/server.DefaultBuildHandlerChain.WithWaitGroup.withWaitGroup.func29()
      external/gazelle~~go_deps~io_k8s_apiserver/pkg/server/filters/waitgroup.go:65 +0x23d
  net/http.HandlerFunc.ServeHTTP()
      GOROOT/src/net/http/server.go:2220 +0x47
  k8s.io/apiserver/pkg/server.DefaultBuildHandlerChain.WithCacheControl.func14()
      external/gazelle~~go_deps~io_k8s_apiserver/pkg/endpoints/filters/cachecontrol.go:31 +0xc5
  net/http.HandlerFunc.ServeHTTP()
      GOROOT/src/net/http/server.go:2220 +0x47
  k8s.io/apiserver/pkg/server.DefaultBuildHandlerChain.WithHTTPLogging.WithLogging.withLogging.func35()
      external/gazelle~~go_deps~io_k8s_apiserver/pkg/server/httplog/httplog.go:112 +0xa7
  net/http.HandlerFunc.ServeHTTP()
      GOROOT/src/net/http/server.go:2220 +0x47
  k8s.io/apiserver/pkg/endpoints/filters.WithTracing.func2()
      external/gazelle~~go_deps~io_k8s_apiserver/pkg/endpoints/filters/traces.go:51 +0x282
  net/http.HandlerFunc.ServeHTTP()
      GOROOT/src/net/http/server.go:2220 +0x47
  go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp.(*middleware).serveHTTP()
      external/gazelle~~go_deps~io_opentelemetry_go_contrib_instrumentation_net_http_otelhttp/handler.go:171 +0x191b
  go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp.NewMiddleware.func1.1()
      external/gazelle~~go_deps~io_opentelemetry_go_contrib_instrumentation_net_http_otelhttp/handler.go:65 +0x67
  net/http.HandlerFunc.ServeHTTP()
      GOROOT/src/net/http/server.go:2220 +0x47
  k8s.io/apiserver/pkg/server.DefaultBuildHandlerChain.WithLatencyTrackers.func16()
      external/gazelle~~go_deps~io_k8s_apiserver/pkg/endpoints/filters/webhook_duration.go:46 +0x208
  net/http.HandlerFunc.ServeHTTP()
      GOROOT/src/net/http/server.go:2220 +0x47
  k8s.io/apiserver/pkg/server.DefaultBuildHandlerChain.WithRequestInfo.func18()
      external/gazelle~~go_deps~io_k8s_apiserver/pkg/endpoints/filters/requestinfo.go:39 +0x17a
  net/http.HandlerFunc.ServeHTTP()
      GOROOT/src/net/http/server.go:2220 +0x47
  k8s.io/apiserver/pkg/server.DefaultBuildHandlerChain.WithRequestReceivedTimestamp.withRequestReceivedTimestampWithClock.func32()
      external/gazelle~~go_deps~io_k8s_apiserver/pkg/endpoints/filters/request_received_time.go:38 +0xba
  net/http.HandlerFunc.ServeHTTP()
      GOROOT/src/net/http/server.go:2220 +0x47
  k8s.io/apiserver/pkg/server.DefaultBuildHandlerChain.WithMuxAndDiscoveryComplete.func19()
      external/gazelle~~go_deps~io_k8s_apiserver/pkg/endpoints/filters/mux_discovery_complete.go:52 +0xc2
  net/http.HandlerFunc.ServeHTTP()
      GOROOT/src/net/http/server.go:2220 +0x47
  k8s.io/apiserver/pkg/server.DefaultBuildHandlerChain.WithPanicRecovery.withPanicRecovery.func33()
      external/gazelle~~go_deps~io_k8s_apiserver/pkg/server/filters/wrap.go:73 +0x1be
  net/http.HandlerFunc.ServeHTTP()
      GOROOT/src/net/http/server.go:2220 +0x47
  k8s.io/apiserver/pkg/server.DefaultBuildHandlerChain.WithAuditInit.withAuditInit.func34()
      external/gazelle~~go_deps~io_k8s_apiserver/pkg/endpoints/filters/audit_init.go:63 +0x14e
  net/http.HandlerFunc.ServeHTTP()
      GOROOT/src/net/http/server.go:2220 +0x47
  k8s.io/apiserver/pkg/server.(*APIServerHandler).ServeHTTP()
      external/gazelle~~go_deps~io_k8s_apiserver/pkg/server/handler.go:188 +0x5b
  net/http.serverHandler.ServeHTTP()
      GOROOT/src/net/http/server.go:3210 +0x2a1
  net/http.initALPNRequest.ServeHTTP()
      GOROOT/src/net/http/server.go:3819 +0x35e
  net/http.(*initALPNRequest).ServeHTTP()
      <autogenerated>:1 +0x7b
  net/http.Handler.ServeHTTP-fm()
      <autogenerated>:1 +0x67
  golang.org/x/net/http2.(*serverConn).runHandler()
      external/gazelle~~go_deps~org_golang_x_net/http2/server.go:2439 +0x253
  golang.org/x/net/http2.(*serverConn).scheduleHandler.gowrap1()
      external/gazelle~~go_deps~org_golang_x_net/http2/server.go:2373 +0x5d
      
Previous write at 0x00c000592dc0 by goroutine 7577:
  k8s.io/component-base/metrics.(*Histogram).WithContext()
      external/gazelle~~go_deps~io_k8s_component_base/metrics/histogram.go:116 +0x57a
  k8s.io/apiserver/pkg/authentication/request/x509.(*Authenticator).AuthenticateRequest()
      external/gazelle~~go_deps~io_k8s_apiserver/pkg/authentication/request/x509/x509.go:180 +0x4c9
  k8s.io/apiserver/pkg/authentication/request/union.(*unionAuthRequestHandler).AuthenticateRequest()
      external/gazelle~~go_deps~io_k8s_apiserver/pkg/authentication/request/union/union.go:56 +0xee
  k8s.io/apiserver/pkg/authentication/group.(*AuthenticatedGroupAdder).AuthenticateRequest()
      external/gazelle~~go_deps~io_k8s_apiserver/pkg/authentication/group/authenticated_group_adder.go:40 +0x62
  k8s.io/apiserver/pkg/authentication/request/union.(*unionAuthRequestHandler).AuthenticateRequest()
      external/gazelle~~go_deps~io_k8s_apiserver/pkg/authentication/request/union/union.go:56 +0xee
  k8s.io/apiserver/pkg/authentication/request/union.(*unionAuthRequestHandler).AuthenticateRequest()
      external/gazelle~~go_deps~io_k8s_apiserver/pkg/authentication/request/union/union.go:56 +0xee
  k8s.io/apiserver/pkg/endpoints/filters.withAuthentication.func1()
      external/gazelle~~go_deps~io_k8s_apiserver/pkg/endpoints/filters/authentication.go:67 +0x318
  net/http.HandlerFunc.ServeHTTP()
      GOROOT/src/net/http/server.go:2220 +0x47
  k8s.io/apiserver/pkg/endpoints/filterlatency.trackStarted.func1()
      external/gazelle~~go_deps~io_k8s_apiserver/pkg/endpoints/filterlatency/filterlatency.go:94 +0x4b5
  net/http.HandlerFunc.ServeHTTP()
      GOROOT/src/net/http/server.go:2220 +0x47
  k8s.io/apiserver/pkg/server.DefaultBuildHandlerChain.WithWarningRecorder.func11()
      external/gazelle~~go_deps~io_k8s_apiserver/pkg/endpoints/filters/warning.go:35 +0x11d
  net/http.HandlerFunc.ServeHTTP()
      GOROOT/src/net/http/server.go:2220 +0x47
  k8s.io/apiserver/pkg/server/filters.(*timeoutHandler).ServeHTTP()
      external/gazelle~~go_deps~io_k8s_apiserver/pkg/server/filters/timeout.go:87 +0x57d
  k8s.io/apiserver/pkg/server.DefaultBuildHandlerChain.WithRequestDeadline.withRequestDeadline.func28()
      external/gazelle~~go_deps~io_k8s_apiserver/pkg/endpoints/filters/request_deadline.go:65 +0x49d
  net/http.HandlerFunc.ServeHTTP()
      GOROOT/src/net/http/server.go:2220 +0x47
  k8s.io/apiserver/pkg/server.DefaultBuildHandlerChain.WithWaitGroup.withWaitGroup.func29()
      external/gazelle~~go_deps~io_k8s_apiserver/pkg/server/filters/waitgroup.go:65 +0x23d
  net/http.HandlerFunc.ServeHTTP()
      GOROOT/src/net/http/server.go:2220 +0x47
  k8s.io/apiserver/pkg/server.DefaultBuildHandlerChain.WithCacheControl.func14()
      external/gazelle~~go_deps~io_k8s_apiserver/pkg/endpoints/filters/cachecontrol.go:31 +0xc5
  net/http.HandlerFunc.ServeHTTP()
      GOROOT/src/net/http/server.go:2220 +0x47
  k8s.io/apiserver/pkg/server.DefaultBuildHandlerChain.WithHTTPLogging.WithLogging.withLogging.func35()
      external/gazelle~~go_deps~io_k8s_apiserver/pkg/server/httplog/httplog.go:112 +0xa7
  net/http.HandlerFunc.ServeHTTP()
      GOROOT/src/net/http/server.go:2220 +0x47
  k8s.io/apiserver/pkg/endpoints/filters.WithTracing.func2()
      external/gazelle~~go_deps~io_k8s_apiserver/pkg/endpoints/filters/traces.go:51 +0x282
@fionera fionera added bug Something isn't working c/k8s Kubernetes component unfortunate Things which we wouldn't implement in an ideal world. labels Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working c/k8s Kubernetes component unfortunate Things which we wouldn't implement in an ideal world.
Projects
None yet
Development

No branches or pull requests

1 participant