Skip to content

Data race in coderd/wsbuilder (unprotected shared map mutation) #11185

Closed
@mafredri

Description

@mafredri

https://github.com/coder/coder/actions/runs/7196065745/job/19600067650

2023-12-13T13:45:37.5061495Z ==================
2023-12-13T13:45:37.5061713Z WARNING: DATA RACE
2023-12-13T13:45:37.5061942Z Write at 0x00c0023e6660 by goroutine 4887:
2023-12-13T13:45:37.5062240Z   runtime.mapdelete_faststr()
2023-12-13T13:45:37.5062631Z       /opt/hostedtoolcache/go/1.21.5/x64/src/runtime/map_faststr.go:301 +0x0
2023-12-13T13:45:37.5063019Z   github.com/coder/coder/v2/provisionersdk.MutateTags()
2023-12-13T13:45:37.5063659Z       /home/runner/actions-runner/_work/coder/coder/provisionersdk/provisionertags.go:31 +0x25d
2023-12-13T13:45:37.5064140Z   github.com/coder/coder/v2/coderd/wsbuilder.(*Builder).buildTx()
2023-12-13T13:45:37.5064703Z       /home/runner/actions-runner/_work/coder/coder/coderd/wsbuilder/wsbuilder.go:299 +0xe1e
2023-12-13T13:45:37.5065195Z   github.com/coder/coder/v2/coderd/wsbuilder.(*Builder).Build.func1()
2023-12-13T13:45:37.5065752Z       /home/runner/actions-runner/_work/coder/coder/coderd/wsbuilder/wsbuilder.go:225 +0xae
2023-12-13T13:45:37.5066242Z   github.com/coder/coder/v2/enterprise/dbcrypt.(*dbCrypt).InTx.func1()
2023-12-13T13:45:37.5066815Z       /home/runner/actions-runner/_work/coder/coder/enterprise/dbcrypt/dbcrypt.go:65 +0x172
2023-12-13T13:45:37.5067315Z   github.com/coder/coder/v2/coderd/database/dbauthz.(*querier).InTx.func1()
2023-12-13T13:45:37.5067918Z       /home/runner/actions-runner/_work/coder/coder/coderd/database/dbauthz/dbauthz.go:517 +0x147
2023-12-13T13:45:37.5068447Z   github.com/coder/coder/v2/coderd/database/dbmem.(*FakeQuerier).InTx()
2023-12-13T13:45:37.5069037Z       /home/runner/actions-runner/_work/coder/coder/coderd/database/dbmem/dbmem.go:271 +0x310
2023-12-13T13:45:37.5069578Z   github.com/coder/coder/v2/coderd/database/dbauthz.(*querier).InTx()
2023-12-13T13:45:37.5070165Z       /home/runner/actions-runner/_work/coder/coder/coderd/database/dbauthz/dbauthz.go:514 +0x106
2023-12-13T13:45:37.5070638Z   github.com/coder/coder/v2/enterprise/dbcrypt.(*dbCrypt).InTx()
2023-12-13T13:45:37.5071223Z       /home/runner/actions-runner/_work/coder/coder/enterprise/dbcrypt/dbcrypt.go:64 +0x108
2023-12-13T13:45:37.5071683Z   github.com/coder/coder/v2/coderd/database.ReadModifyUpdate()
2023-12-13T13:45:37.5072187Z       /home/runner/actions-runner/_work/coder/coder/coderd/database/tx.go:36 +0xcb
2023-12-13T13:45:37.5072622Z   github.com/coder/coder/v2/coderd/wsbuilder.(*Builder).Build()
2023-12-13T13:45:37.5073149Z       /home/runner/actions-runner/_work/coder/coder/coderd/wsbuilder/wsbuilder.go:222 +0x3b9
2023-12-13T13:45:37.5073603Z   github.com/coder/coder/v2/coderd.(*API).postWorkspaceBuilds()
2023-12-13T13:45:37.5074145Z       /home/runner/actions-runner/_work/coder/coder/coderd/workspacebuilds.go:370 +0x12f6
2023-12-13T13:45:37.5074709Z   github.com/coder/coder/v2/coderd.(*API).postWorkspaceBuilds-fm()
2023-12-13T13:45:37.5075058Z       <autogenerated>:1 +0x51
2023-12-13T13:45:37.5075319Z   net/http.HandlerFunc.ServeHTTP()
2023-12-13T13:45:37.5075707Z       /opt/hostedtoolcache/go/1.21.5/x64/src/net/http/server.go:2136 +0x47
2023-12-13T13:45:37.5076099Z   github.com/go-chi/chi/v5.(*Mux).routeHTTP()
2023-12-13T13:45:37.5076542Z       /home/runner/go/pkg/mod/github.com/go-chi/chi/v5@v5.0.10/mux.go:444 +0x544
2023-12-13T13:45:37.5076950Z   github.com/go-chi/chi/v5.(*Mux).routeHTTP-fm()
2023-12-13T13:45:37.5077256Z       <autogenerated>:1 +0x51
2023-12-13T13:45:37.5077507Z   net/http.HandlerFunc.ServeHTTP()
2023-12-13T13:45:37.5077894Z       /opt/hostedtoolcache/go/1.21.5/x64/src/net/http/server.go:2136 +0x47
2023-12-13T13:45:37.5078287Z   github.com/go-chi/chi/v5.(*Mux).ServeHTTP()
2023-12-13T13:45:37.5078808Z       /home/runner/go/pkg/mod/github.com/go-chi/chi/v5@v5.0.10/mux.go:73 +0x6b4
2023-12-13T13:45:37.5079213Z   github.com/go-chi/chi/v5.(*Mux).Mount.func1()
2023-12-13T13:45:37.5079663Z       /home/runner/go/pkg/mod/github.com/go-chi/chi/v5@v5.0.10/mux.go:316 +0x4e5
2023-12-13T13:45:37.5080027Z   net/http.HandlerFunc.ServeHTTP()
2023-12-13T13:45:37.5080417Z       /opt/hostedtoolcache/go/1.21.5/x64/src/net/http/server.go:2136 +0x47
2023-12-13T13:45:37.5080795Z   github.com/go-chi/chi/v5.(*Mux).routeHTTP()
2023-12-13T13:45:37.5081385Z       /home/runner/go/pkg/mod/github.com/go-chi/chi/v5@v5.0.10/mux.go:444 +0x544
2023-12-13T13:45:37.5081790Z   github.com/go-chi/chi/v5.(*Mux).routeHTTP-fm()
2023-12-13T13:45:37.5082086Z       <autogenerated>:1 +0x51
2023-12-13T13:45:37.5082344Z   net/http.HandlerFunc.ServeHTTP()
2023-12-13T13:45:37.5082716Z       /opt/hostedtoolcache/go/1.21.5/x64/src/net/http/server.go:2136 +0x47
2023-12-13T13:45:37.5083268Z   github.com/coder/coder/v2/coderd.New.func11.14.1.ExtractWorkspaceParam.func4.1()
2023-12-13T13:45:37.5083887Z       /home/runner/actions-runner/_work/coder/coder/coderd/httpmw/workspaceparam.go:51 +0x330
2023-12-13T13:45:37.5084286Z   net/http.HandlerFunc.ServeHTTP()
2023-12-13T13:45:37.5084667Z       /opt/hostedtoolcache/go/1.21.5/x64/src/net/http/server.go:2136 +0x47
2023-12-13T13:45:37.5085046Z   github.com/go-chi/chi/v5.(*Mux).ServeHTTP()
2023-12-13T13:45:37.5085505Z       /home/runner/go/pkg/mod/github.com/go-chi/chi/v5@v5.0.10/mux.go:73 +0x6b4
2023-12-13T13:45:37.5085905Z   github.com/go-chi/chi/v5.(*Mux).Mount.func1()
2023-12-13T13:45:37.5086364Z       /home/runner/go/pkg/mod/github.com/go-chi/chi/v5@v5.0.10/mux.go:316 +0x4e5
2023-12-13T13:45:37.5086711Z   net/http.HandlerFunc.ServeHTTP()
2023-12-13T13:45:37.5087094Z       /opt/hostedtoolcache/go/1.21.5/x64/src/net/http/server.go:2136 +0x47
2023-12-13T13:45:37.5087526Z   github.com/go-chi/chi/v5.(*Mux).routeHTTP()
2023-12-13T13:45:37.5088045Z       /home/runner/go/pkg/mod/github.com/go-chi/chi/v5@v5.0.10/mux.go:444 +0x544
2023-12-13T13:45:37.5088443Z   github.com/go-chi/chi/v5.(*Mux).routeHTTP-fm()
2023-12-13T13:45:37.5088739Z       <autogenerated>:1 +0x51
2023-12-13T13:45:37.5088988Z   net/http.HandlerFunc.ServeHTTP()
2023-12-13T13:45:37.5089414Z       /opt/hostedtoolcache/go/1.21.5/x64/src/net/http/server.go:2136 +0x47
2023-12-13T13:45:37.5089826Z   github.com/coder/coder/v2/coderd.New.ExtractAPIKeyMW.func14.1()
2023-12-13T13:45:37.5090400Z       /home/runner/actions-runner/_work/coder/coder/coderd/httpmw/apikey.go:141 +0x290
2023-12-13T13:45:37.5090783Z   net/http.HandlerFunc.ServeHTTP()
2023-12-13T13:45:37.5091169Z       /opt/hostedtoolcache/go/1.21.5/x64/src/net/http/server.go:2136 +0x47
2023-12-13T13:45:37.5091549Z   github.com/go-chi/chi/v5.(*Mux).ServeHTTP()
2023-12-13T13:45:37.5092078Z       /home/runner/go/pkg/mod/github.com/go-chi/chi/v5@v5.0.10/mux.go:73 +0x6b4
2023-12-13T13:45:37.5092476Z   github.com/go-chi/chi/v5.(*Mux).Mount.func1()
2023-12-13T13:45:37.5092933Z       /home/runner/go/pkg/mod/github.com/go-chi/chi/v5@v5.0.10/mux.go:316 +0x4e5
2023-12-13T13:45:37.5093281Z   net/http.HandlerFunc.ServeHTTP()
2023-12-13T13:45:37.5093664Z       /opt/hostedtoolcache/go/1.21.5/x64/src/net/http/server.go:2136 +0x47
2023-12-13T13:45:37.5094045Z   github.com/go-chi/chi/v5.(*Mux).routeHTTP()
2023-12-13T13:45:37.5094504Z       /home/runner/go/pkg/mod/github.com/go-chi/chi/v5@v5.0.10/mux.go:444 +0x544
2023-12-13T13:45:37.5094910Z   github.com/go-chi/chi/v5.(*Mux).routeHTTP-fm()
2023-12-13T13:45:37.5095203Z       <autogenerated>:1 +0x51
2023-12-13T13:45:37.5095462Z   net/http.HandlerFunc.ServeHTTP()
2023-12-13T13:45:37.5095847Z       /opt/hostedtoolcache/go/1.21.5/x64/src/net/http/server.go:2136 +0x47
2023-12-13T13:45:37.5096281Z   github.com/coder/coder/v2/coderd/httpmw.ReportCLITelemetry.func1.1.2()
2023-12-13T13:45:37.5096937Z       /home/runner/actions-runner/_work/coder/coder/coderd/httpmw/clitelemetry.go:42 +0x6f
2023-12-13T13:45:37.5097318Z   runtime.deferreturn()
2023-12-13T13:45:37.5097675Z       /opt/hostedtoolcache/go/1.21.5/x64/src/runtime/panic.go:477 +0x30
2023-12-13T13:45:37.5098017Z   net/http.HandlerFunc.ServeHTTP()
2023-12-13T13:45:37.5098402Z       /opt/hostedtoolcache/go/1.21.5/x64/src/net/http/server.go:2136 +0x47
2023-12-13T13:45:37.5098787Z   github.com/go-chi/chi/v5.(*Mux).ServeHTTP()
2023-12-13T13:45:37.5099243Z       /home/runner/go/pkg/mod/github.com/go-chi/chi/v5@v5.0.10/mux.go:73 +0x6b4
2023-12-13T13:45:37.5099631Z   github.com/go-chi/chi/v5.(*Mux).Mount.func1()
2023-12-13T13:45:37.5100102Z       /home/runner/go/pkg/mod/github.com/go-chi/chi/v5@v5.0.10/mux.go:316 +0x4e5
2023-12-13T13:45:37.5100599Z   net/http.HandlerFunc.ServeHTTP()
2023-12-13T13:45:37.5101075Z       /opt/hostedtoolcache/go/1.21.5/x64/src/net/http/server.go:2136 +0x47
2023-12-13T13:45:37.5101460Z   github.com/go-chi/chi/v5.(*Mux).routeHTTP()
2023-12-13T13:45:37.5101907Z       /home/runner/go/pkg/mod/github.com/go-chi/chi/v5@v5.0.10/mux.go:444 +0x544
2023-12-13T13:45:37.5102316Z   github.com/go-chi/chi/v5.(*Mux).routeHTTP-fm()
2023-12-13T13:45:37.5102608Z       <autogenerated>:1 +0x51
2023-12-13T13:45:37.5102843Z   net/http.HandlerFunc.ServeHTTP()
2023-12-13T13:45:37.5103241Z       /opt/hostedtoolcache/go/1.21.5/x64/src/net/http/server.go:2136 +0x47
2023-12-13T13:45:37.5103643Z   github.com/justinas/nosurf.(*CSRFHandler).handleSuccess()
2023-12-13T13:45:37.5104123Z       /home/runner/go/pkg/mod/github.com/justinas/nosurf@v1.1.1/handler.go:187 +0x5a6
2023-12-13T13:45:37.5104553Z   github.com/justinas/nosurf.(*CSRFHandler).ServeHTTP()
2023-12-13T13:45:37.5105011Z       /home/runner/go/pkg/mod/github.com/justinas/nosurf@v1.1.1/handler.go:144 +0x569
2023-12-13T13:45:37.5105474Z   github.com/coder/coder/v2/coderd.New.func6.1()
2023-12-13T13:45:37.5105945Z       /home/runner/actions-runner/_work/coder/coder/coderd/coderd.go:563 +0x1d6
2023-12-13T13:45:37.5106349Z   net/http.HandlerFunc.ServeHTTP()
2023-12-13T13:45:37.5106715Z       /opt/hostedtoolcache/go/1.21.5/x64/src/net/http/server.go:2136 +0x47
2023-12-13T13:45:37.5107086Z   github.com/coder/coder/v2/coderd.New.func5.1()
2023-12-13T13:45:37.5107545Z       /home/runner/actions-runner/_work/coder/coder/coderd/coderd.go:553 +0x221
2023-12-13T13:45:37.5107903Z   net/http.HandlerFunc.ServeHTTP()
2023-12-13T13:45:37.5108288Z       /opt/hostedtoolcache/go/1.21.5/x64/src/net/http/server.go:2136 +0x47
2023-12-13T13:45:37.5108744Z   github.com/go-chi/cors.(*Cors).Handler-fm.(*Cors).Handler.func1()
2023-12-13T13:45:37.5109291Z       /home/runner/go/pkg/mod/github.com/go-chi/cors@v1.2.1/cors.go:228 +0x2dc
2023-12-13T13:45:37.5109733Z   net/http.HandlerFunc.ServeHTTP()
2023-12-13T13:45:37.5110097Z       /opt/hostedtoolcache/go/1.21.5/x64/src/net/http/server.go:2136 +0x47
2023-12-13T13:45:37.5110546Z   github.com/coder/coder/v2/coderd.New.(*Server).HandleSubdomain.func21.1()
2023-12-13T13:45:37.5111143Z       /home/runner/actions-runner/_work/coder/coder/coderd/workspaceapps/proxy.go:366 +0x124
2023-12-13T13:45:37.5111536Z   net/http.HandlerFunc.ServeHTTP()
2023-12-13T13:45:37.5111930Z       /opt/hostedtoolcache/go/1.21.5/x64/src/net/http/server.go:2136 +0x47
2023-12-13T13:45:37.5112342Z   github.com/coder/coder/v2/coderd/httpmw.Prometheus.func1.1()
2023-12-13T13:45:37.5112884Z       /home/runner/actions-runner/_work/coder/coder/coderd/httpmw/prometheus.go:90 +0x3d8
2023-12-13T13:45:37.5113268Z   net/http.HandlerFunc.ServeHTTP()
2023-12-13T13:45:37.5113635Z       /opt/hostedtoolcache/go/1.21.5/x64/src/net/http/server.go:2136 +0x47
2023-12-13T13:45:37.5114032Z   github.com/coder/coder/v2/coderd.New.Logger.func20.1()
2023-12-13T13:45:37.5114538Z       /home/runner/actions-runner/_work/coder/coder/coderd/httpmw/logger.go:38 +0x5a5
2023-12-13T13:45:37.5114987Z   net/http.HandlerFunc.ServeHTTP()
2023-12-13T13:45:37.5115382Z       /opt/hostedtoolcache/go/1.21.5/x64/src/net/http/server.go:2136 +0x47
2023-12-13T13:45:37.5115791Z   github.com/coder/coder/v2/coderd.New.ExtractRealIP.func19.1()
2023-12-13T13:45:37.5116316Z       /home/runner/actions-runner/_work/coder/coder/coderd/httpmw/realip.go:50 +0x217
2023-12-13T13:45:37.5116697Z   net/http.HandlerFunc.ServeHTTP()
2023-12-13T13:45:37.5117074Z       /opt/hostedtoolcache/go/1.21.5/x64/src/net/http/server.go:2136 +0x47
2023-12-13T13:45:37.5117483Z   github.com/coder/coder/v2/coderd/httpmw.AttachRequestID.func1()
2023-12-13T13:45:37.5118026Z       /home/runner/actions-runner/_work/coder/coder/coderd/httpmw/requestid.go:38 +0x670
2023-12-13T13:45:37.5118408Z   net/http.HandlerFunc.ServeHTTP()
2023-12-13T13:45:37.5118799Z       /opt/hostedtoolcache/go/1.21.5/x64/src/net/http/server.go:2136 +0x47
2023-12-13T13:45:37.5119279Z   github.com/coder/coder/v2/coderd/tracing.Middleware.func1.1()
2023-12-13T13:45:37.5119804Z       /home/runner/actions-runner/_work/coder/coder/coderd/tracing/httpmw.go:71 +0x872
2023-12-13T13:45:37.5120190Z   net/http.HandlerFunc.ServeHTTP()
2023-12-13T13:45:37.5120566Z       /opt/hostedtoolcache/go/1.21.5/x64/src/net/http/server.go:2136 +0x47
2023-12-13T13:45:37.5121125Z   github.com/coder/coder/v2/coderd/tracing.StatusWriterMiddleware.func1()
2023-12-13T13:45:37.5121717Z       /home/runner/actions-runner/_work/coder/coder/coderd/tracing/status_writer.go:39 +0xf9
2023-12-13T13:45:37.5122113Z   net/http.HandlerFunc.ServeHTTP()
2023-12-13T13:45:37.5122497Z       /opt/hostedtoolcache/go/1.21.5/x64/src/net/http/server.go:2136 +0x47
2023-12-13T13:45:37.5122896Z   github.com/coder/coder/v2/coderd.New.Recover.func18.1()
2023-12-13T13:45:37.5123411Z       /home/runner/actions-runner/_work/coder/coder/coderd/httpmw/recover.go:44 +0x161
2023-12-13T13:45:37.5123798Z   net/http.HandlerFunc.ServeHTTP()
2023-12-13T13:45:37.5124238Z       /opt/hostedtoolcache/go/1.21.5/x64/src/net/http/server.go:2136 +0x47
2023-12-13T13:45:37.5124620Z   github.com/go-chi/chi/v5.(*Mux).ServeHTTP()
2023-12-13T13:45:37.5125061Z       /home/runner/go/pkg/mod/github.com/go-chi/chi/v5@v5.0.10/mux.go:73 +0x6b4
2023-12-13T13:45:37.5125509Z   github.com/go-chi/chi/v5.(*Mux).Mount.func1()
2023-12-13T13:45:37.5125961Z       /home/runner/go/pkg/mod/github.com/go-chi/chi/v5@v5.0.10/mux.go:316 +0x4e5
2023-12-13T13:45:37.5126334Z   net/http.HandlerFunc.ServeHTTP()
2023-12-13T13:45:37.5126730Z       /opt/hostedtoolcache/go/1.21.5/x64/src/net/http/server.go:2136 +0x47
2023-12-13T13:45:37.5127106Z   github.com/go-chi/chi/v5.(*Mux).routeHTTP()
2023-12-13T13:45:37.5127573Z       /home/runner/go/pkg/mod/github.com/go-chi/chi/v5@v5.0.10/mux.go:444 +0x544
2023-12-13T13:45:37.5128012Z   github.com/go-chi/chi/v5.(*Mux).routeHTTP-fm()
2023-12-13T13:45:37.5128286Z       <autogenerated>:1 +0x51
2023-12-13T13:45:37.5128611Z   net/http.HandlerFunc.ServeHTTP()
2023-12-13T13:45:37.5128996Z       /opt/hostedtoolcache/go/1.21.5/x64/src/net/http/server.go:2136 +0x47
2023-12-13T13:45:37.5129386Z   github.com/go-chi/chi/v5.(*Mux).ServeHTTP()
2023-12-13T13:45:37.5129840Z       /home/runner/go/pkg/mod/github.com/go-chi/chi/v5@v5.0.10/mux.go:90 +0x63b
2023-12-13T13:45:37.5130276Z   github.com/coder/coder/v2/coderd/coderdtest.NewOptions.func3()
2023-12-13T13:45:37.5130847Z       /home/runner/actions-runner/_work/coder/coder/coderd/coderdtest/coderdtest.go:313 +0x94
2023-12-13T13:45:37.5131243Z   net/http.HandlerFunc.ServeHTTP()
2023-12-13T13:45:37.5131608Z       /opt/hostedtoolcache/go/1.21.5/x64/src/net/http/server.go:2136 +0x47
2023-12-13T13:45:37.5131963Z   net/http.serverHandler.ServeHTTP()
2023-12-13T13:45:37.5132355Z       /opt/hostedtoolcache/go/1.21.5/x64/src/net/http/server.go:2938 +0x2a1
2023-12-13T13:45:37.5132694Z   net/http.(*conn).serve()
2023-12-13T13:45:37.5133124Z       /opt/hostedtoolcache/go/1.21.5/x64/src/net/http/server.go:2009 +0xc24
2023-12-13T13:45:37.5133466Z   net/http.(*Server).Serve.func3()
2023-12-13T13:45:37.5133849Z       /opt/hostedtoolcache/go/1.21.5/x64/src/net/http/server.go:3086 +0x4f
2023-12-13T13:45:37.5134073Z 
2023-12-13T13:45:37.5134213Z Previous read at 0x00c0023e6660 by goroutine 4950:
2023-12-13T13:45:37.5134482Z   reflect.maplen()
2023-12-13T13:45:37.5134819Z       /opt/hostedtoolcache/go/1.21.5/x64/src/runtime/map.go:1411 +0x0
2023-12-13T13:45:37.5135148Z   reflect.Value.lenNonSlice()
2023-12-13T13:45:37.5135521Z       /opt/hostedtoolcache/go/1.21.5/x64/src/reflect/value.go:1720 +0x324
2023-12-13T13:45:37.5135848Z   reflect.Value.Len()
2023-12-13T13:45:37.5136201Z       /opt/hostedtoolcache/go/1.21.5/x64/src/reflect/value.go:1709 +0x432
2023-12-13T13:45:37.5136613Z   encoding/json.mapEncoder.encode()
2023-12-13T13:45:37.5137023Z       /opt/hostedtoolcache/go/1.21.5/x64/src/encoding/json/encode.go:742 +0x414
2023-12-13T13:45:37.5137395Z   encoding/json.mapEncoder.encode-fm()
2023-12-13T13:45:37.5137671Z       <autogenerated>:1 +0x86
2023-12-13T13:45:37.5137935Z   encoding/json.structEncoder.encode()
2023-12-13T13:45:37.5138345Z       /opt/hostedtoolcache/go/1.21.5/x64/src/encoding/json/encode.go:706 +0x2bd
2023-12-13T13:45:37.5138743Z   encoding/json.structEncoder.encode-fm()
2023-12-13T13:45:37.5139033Z       <autogenerated>:1 +0xe4
2023-12-13T13:45:37.5139299Z   encoding/json.(*encodeState).reflectValue()
2023-12-13T13:45:37.5139732Z       /opt/hostedtoolcache/go/1.21.5/x64/src/encoding/json/encode.go:323 +0x83
2023-12-13T13:45:37.5140077Z   encoding/json.(*encodeState).marshal()
2023-12-13T13:45:37.5140611Z       /opt/hostedtoolcache/go/1.21.5/x64/src/encoding/json/encode.go:295 +0x1af
2023-12-13T13:45:37.5141047Z   encoding/json.(*Encoder).Encode()
2023-12-13T13:45:37.5141443Z       /opt/hostedtoolcache/go/1.21.5/x64/src/encoding/json/stream.go:209 +0x16f
2023-12-13T13:45:37.5141846Z   github.com/coder/coder/v2/coderd/httpapi.WriteIndent()
2023-12-13T13:45:37.5142376Z       /home/runner/actions-runner/_work/coder/coder/coderd/httpapi/httpapi.go:177 +0x36b
2023-12-13T13:45:37.5142790Z   github.com/coder/coder/v2/coderd/httpapi.Write()
2023-12-13T13:45:37.5143286Z       /home/runner/actions-runner/_work/coder/coder/coderd/httpapi/httpapi.go:146 +0x3ea
2023-12-13T13:45:37.5143771Z   github.com/coder/coder/v2/coderd.(*API).templateVersionDryRun()
2023-12-13T13:45:37.5144314Z       /home/runner/actions-runner/_work/coder/coder/coderd/templateversions.go:537 +0x1e4
2023-12-13T13:45:37.5144825Z   github.com/coder/coder/v2/coderd.(*API).templateVersionDryRun-fm()
2023-12-13T13:45:37.5145177Z       <autogenerated>:1 +0x51
2023-12-13T13:45:37.5145500Z   net/http.HandlerFunc.ServeHTTP()
2023-12-13T13:45:37.5145896Z       /opt/hostedtoolcache/go/1.21.5/x64/src/net/http/server.go:2136 +0x47
2023-12-13T13:45:37.5146282Z   github.com/go-chi/chi/v5.(*Mux).routeHTTP()
2023-12-13T13:45:37.5146778Z       /home/runner/go/pkg/mod/github.com/go-chi/chi/v5@v5.0.10/mux.go:444 +0x544
2023-12-13T13:45:37.5147197Z   github.com/go-chi/chi/v5.(*Mux).routeHTTP-fm()
2023-12-13T13:45:37.5147482Z       <autogenerated>:1 +0x51
2023-12-13T13:45:37.5147743Z   net/http.HandlerFunc.ServeHTTP()
2023-12-13T13:45:37.5148138Z       /opt/hostedtoolcache/go/1.21.5/x64/src/net/http/server.go:2136 +0x47
2023-12-13T13:45:37.5148524Z   github.com/go-chi/chi/v5.(*Mux).ServeHTTP()
2023-12-13T13:45:37.5148986Z       /home/runner/go/pkg/mod/github.com/go-chi/chi/v5@v5.0.10/mux.go:73 +0x6b4
2023-12-13T13:45:37.5149393Z   github.com/go-chi/chi/v5.(*Mux).Mount.func1()
2023-12-13T13:45:37.5149919Z       /home/runner/go/pkg/mod/github.com/go-chi/chi/v5@v5.0.10/mux.go:316 +0x4e5
2023-12-13T13:45:37.5150270Z   net/http.HandlerFunc.ServeHTTP()
2023-12-13T13:45:37.5150663Z       /opt/hostedtoolcache/go/1.21.5/x64/src/net/http/server.go:2136 +0x47
2023-12-13T13:45:37.5151042Z   github.com/go-chi/chi/v5.(*Mux).routeHTTP()
2023-12-13T13:45:37.5151508Z       /home/runner/go/pkg/mod/github.com/go-chi/chi/v5@v5.0.10/mux.go:444 +0x544
2023-12-13T13:45:37.5151917Z   github.com/go-chi/chi/v5.(*Mux).routeHTTP-fm()
2023-12-13T13:45:37.5152215Z       <autogenerated>:1 +0x51
2023-12-13T13:45:37.5152476Z   net/http.HandlerFunc.ServeHTTP()
2023-12-13T13:45:37.5152868Z       /opt/hostedtoolcache/go/1.21.5/x64/src/net/http/server.go:2136 +0x47
2023-12-13T13:45:37.5153369Z   github.com/coder/coder/v2/coderd.New.func11.11.ExtractTemplateVersionParam.func2.1()
2023-12-13T13:45:37.5154047Z       /home/runner/actions-runner/_work/coder/coder/coderd/httpmw/templateversionparam.go:63 +0x43a
2023-12-13T13:45:37.5154543Z   net/http.HandlerFunc.ServeHTTP()
2023-12-13T13:45:37.5154937Z       /opt/hostedtoolcache/go/1.21.5/x64/src/net/http/server.go:2136 +0x47
2023-12-13T13:45:37.5155364Z   github.com/coder/coder/v2/coderd.New.ExtractAPIKeyMW.func14.1()
2023-12-13T13:45:37.5155896Z       /home/runner/actions-runner/_work/coder/coder/coderd/httpmw/apikey.go:141 +0x290
2023-12-13T13:45:37.5156287Z   net/http.HandlerFunc.ServeHTTP()
2023-12-13T13:45:37.5156672Z       /opt/hostedtoolcache/go/1.21.5/x64/src/net/http/server.go:2136 +0x47
2023-12-13T13:45:37.5157046Z   github.com/go-chi/chi/v5.(*Mux).ServeHTTP()
2023-12-13T13:45:37.5157491Z       /home/runner/go/pkg/mod/github.com/go-chi/chi/v5@v5.0.10/mux.go:73 +0x6b4
2023-12-13T13:45:37.5157890Z   github.com/go-chi/chi/v5.(*Mux).Mount.func1()
2023-12-13T13:45:37.5158357Z       /home/runner/go/pkg/mod/github.com/go-chi/chi/v5@v5.0.10/mux.go:316 +0x4e5
2023-12-13T13:45:37.5158730Z   net/http.HandlerFunc.ServeHTTP()
2023-12-13T13:45:37.5159179Z       /opt/hostedtoolcache/go/1.21.5/x64/src/net/http/server.go:2136 +0x47
2023-12-13T13:45:37.5159568Z   github.com/go-chi/chi/v5.(*Mux).routeHTTP()
2023-12-13T13:45:37.5160018Z       /home/runner/go/pkg/mod/github.com/go-chi/chi/v5@v5.0.10/mux.go:444 +0x544
2023-12-13T13:45:37.5160423Z   github.com/go-chi/chi/v5.(*Mux).routeHTTP-fm()
2023-12-13T13:45:37.5160709Z       <autogenerated>:1 +0x51
2023-12-13T13:45:37.5161126Z   net/http.HandlerFunc.ServeHTTP()
2023-12-13T13:45:37.5161572Z       /opt/hostedtoolcache/go/1.21.5/x64/src/net/http/server.go:2136 +0x47
2023-12-13T13:45:37.5162019Z   github.com/coder/coder/v2/coderd/httpmw.ReportCLITelemetry.func1.1.2()
2023-12-13T13:45:37.5162597Z       /home/runner/actions-runner/_work/coder/coder/coderd/httpmw/clitelemetry.go:42 +0x6f
2023-12-13T13:45:37.5163088Z   runtime.deferreturn()
2023-12-13T13:45:37.5163445Z       /opt/hostedtoolcache/go/1.21.5/x64/src/runtime/panic.go:477 +0x30
2023-12-13T13:45:37.5163781Z   net/http.HandlerFunc.ServeHTTP()
2023-12-13T13:45:37.5164151Z       /opt/hostedtoolcache/go/1.21.5/x64/src/net/http/server.go:2136 +0x47
2023-12-13T13:45:37.5164532Z   github.com/go-chi/chi/v5.(*Mux).ServeHTTP()
2023-12-13T13:45:37.5164983Z       /home/runner/go/pkg/mod/github.com/go-chi/chi/v5@v5.0.10/mux.go:73 +0x6b4
2023-12-13T13:45:37.5165385Z   github.com/go-chi/chi/v5.(*Mux).Mount.func1()
2023-12-13T13:45:37.5165890Z       /home/runner/go/pkg/mod/github.com/go-chi/chi/v5@v5.0.10/mux.go:316 +0x4e5
2023-12-13T13:45:37.5166259Z   net/http.HandlerFunc.ServeHTTP()
2023-12-13T13:45:37.5166650Z       /opt/hostedtoolcache/go/1.21.5/x64/src/net/http/server.go:2136 +0x47
2023-12-13T13:45:37.5167027Z   github.com/go-chi/chi/v5.(*Mux).routeHTTP()
2023-12-13T13:45:37.5167554Z       /home/runner/go/pkg/mod/github.com/go-chi/chi/v5@v5.0.10/mux.go:444 +0x544
2023-12-13T13:45:37.5167944Z   github.com/go-chi/chi/v5.(*Mux).routeHTTP-fm()
2023-12-13T13:45:37.5168239Z       <autogenerated>:1 +0x51
2023-12-13T13:45:37.5168501Z   net/http.HandlerFunc.ServeHTTP()
2023-12-13T13:45:37.5168884Z       /opt/hostedtoolcache/go/1.21.5/x64/src/net/http/server.go:2136 +0x47
2023-12-13T13:45:37.5169277Z   github.com/justinas/nosurf.(*CSRFHandler).handleSuccess()
2023-12-13T13:45:37.5169762Z       /home/runner/go/pkg/mod/github.com/justinas/nosurf@v1.1.1/handler.go:187 +0x5a6
2023-12-13T13:45:37.5170179Z   github.com/justinas/nosurf.(*CSRFHandler).ServeHTTP()
2023-12-13T13:45:37.5170652Z       /home/runner/go/pkg/mod/github.com/justinas/nosurf@v1.1.1/handler.go:144 +0x569
2023-12-13T13:45:37.5171039Z   github.com/coder/coder/v2/coderd.New.func6.1()
2023-12-13T13:45:37.5171493Z       /home/runner/actions-runner/_work/coder/coder/coderd/coderd.go:563 +0x1d6
2023-12-13T13:45:37.5171932Z   net/http.HandlerFunc.ServeHTTP()
2023-12-13T13:45:37.5172320Z       /opt/hostedtoolcache/go/1.21.5/x64/src/net/http/server.go:2136 +0x47
2023-12-13T13:45:37.5172694Z   github.com/coder/coder/v2/coderd.New.func5.1()
2023-12-13T13:45:37.5173150Z       /home/runner/actions-runner/_work/coder/coder/coderd/coderd.go:553 +0x221
2023-12-13T13:45:37.5173506Z   net/http.HandlerFunc.ServeHTTP()
2023-12-13T13:45:37.5173890Z       /opt/hostedtoolcache/go/1.21.5/x64/src/net/http/server.go:2136 +0x47
2023-12-13T13:45:37.5174319Z   github.com/go-chi/cors.(*Cors).Handler-fm.(*Cors).Handler.func1()
2023-12-13T13:45:37.5174830Z       /home/runner/go/pkg/mod/github.com/go-chi/cors@v1.2.1/cors.go:228 +0x2dc
2023-12-13T13:45:37.5175192Z   net/http.HandlerFunc.ServeHTTP()
2023-12-13T13:45:37.5175581Z       /opt/hostedtoolcache/go/1.21.5/x64/src/net/http/server.go:2136 +0x47
2023-12-13T13:45:37.5176026Z   github.com/coder/coder/v2/coderd.New.(*Server).HandleSubdomain.func21.1()
2023-12-13T13:45:37.5176688Z       /home/runner/actions-runner/_work/coder/coder/coderd/workspaceapps/proxy.go:366 +0x124
2023-12-13T13:45:37.5177084Z   net/http.HandlerFunc.ServeHTTP()
2023-12-13T13:45:37.5177468Z       /opt/hostedtoolcache/go/1.21.5/x64/src/net/http/server.go:2136 +0x47
2023-12-13T13:45:37.5177886Z   github.com/coder/coder/v2/coderd/httpmw.Prometheus.func1.1()
2023-12-13T13:45:37.5178405Z       /home/runner/actions-runner/_work/coder/coder/coderd/httpmw/prometheus.go:90 +0x3d8
2023-12-13T13:45:37.5178796Z   net/http.HandlerFunc.ServeHTTP()
2023-12-13T13:45:37.5179180Z       /opt/hostedtoolcache/go/1.21.5/x64/src/net/http/server.go:2136 +0x47
2023-12-13T13:45:37.5179573Z   github.com/coder/coder/v2/coderd.New.Logger.func20.1()
2023-12-13T13:45:37.5180078Z       /home/runner/actions-runner/_work/coder/coder/coderd/httpmw/logger.go:38 +0x5a5
2023-12-13T13:45:37.5180595Z   net/http.HandlerFunc.ServeHTTP()
2023-12-13T13:45:37.5180985Z       /opt/hostedtoolcache/go/1.21.5/x64/src/net/http/server.go:2136 +0x47
2023-12-13T13:45:37.5181475Z   github.com/coder/coder/v2/coderd.New.ExtractRealIP.func19.1()
2023-12-13T13:45:37.5182026Z       /home/runner/actions-runner/_work/coder/coder/coderd/httpmw/realip.go:50 +0x217
2023-12-13T13:45:37.5182400Z   net/http.HandlerFunc.ServeHTTP()
2023-12-13T13:45:37.5182792Z       /opt/hostedtoolcache/go/1.21.5/x64/src/net/http/server.go:2136 +0x47
2023-12-13T13:45:37.5183213Z   github.com/coder/coder/v2/coderd/httpmw.AttachRequestID.func1()
2023-12-13T13:45:37.5183755Z       /home/runner/actions-runner/_work/coder/coder/coderd/httpmw/requestid.go:38 +0x670
2023-12-13T13:45:37.5184150Z   net/http.HandlerFunc.ServeHTTP()
2023-12-13T13:45:37.5184532Z       /opt/hostedtoolcache/go/1.21.5/x64/src/net/http/server.go:2136 +0x47
2023-12-13T13:45:37.5184979Z   github.com/coder/coder/v2/coderd/tracing.Middleware.func1.1()
2023-12-13T13:45:37.5185514Z       /home/runner/actions-runner/_work/coder/coder/coderd/tracing/httpmw.go:71 +0x872
2023-12-13T13:45:37.5185940Z   net/http.HandlerFunc.ServeHTTP()
2023-12-13T13:45:37.5186320Z       /opt/hostedtoolcache/go/1.21.5/x64/src/net/http/server.go:2136 +0x47
2023-12-13T13:45:37.5186780Z   github.com/coder/coder/v2/coderd/tracing.StatusWriterMiddleware.func1()
2023-12-13T13:45:37.5187364Z       /home/runner/actions-runner/_work/coder/coder/coderd/tracing/status_writer.go:39 +0xf9
2023-12-13T13:45:37.5187770Z   net/http.HandlerFunc.ServeHTTP()
2023-12-13T13:45:37.5188153Z       /opt/hostedtoolcache/go/1.21.5/x64/src/net/http/server.go:2136 +0x47
2023-12-13T13:45:37.5188545Z   github.com/coder/coder/v2/coderd.New.Recover.func18.1()
2023-12-13T13:45:37.5188837Z       /home/runner/actions-runner/_work/coder/coder/coderd/httpmw/recover.go:44 +0x161
2023-12-13T13:45:37.5188966Z   net/http.HandlerFunc.ServeHTTP()
2023-12-13T13:45:37.5189181Z       /opt/hostedtoolcache/go/1.21.5/x64/src/net/http/server.go:2136 +0x47
2023-12-13T13:45:37.5189338Z   github.com/go-chi/chi/v5.(*Mux).ServeHTTP()
2023-12-13T13:45:37.5189617Z       /home/runner/go/pkg/mod/github.com/go-chi/chi/v5@v5.0.10/mux.go:73 +0x6b4
2023-12-13T13:45:37.5189761Z   github.com/go-chi/chi/v5.(*Mux).Mount.func1()
2023-12-13T13:45:37.5190062Z       /home/runner/go/pkg/mod/github.com/go-chi/chi/v5@v5.0.10/mux.go:316 +0x4e5
2023-12-13T13:45:37.5190168Z   net/http.HandlerFunc.ServeHTTP()
2023-12-13T13:45:37.5190471Z       /opt/hostedtoolcache/go/1.21.5/x64/src/net/http/server.go:2136 +0x47
2023-12-13T13:45:37.5190609Z   github.com/go-chi/chi/v5.(*Mux).routeHTTP()
2023-12-13T13:45:37.5190911Z       /home/runner/go/pkg/mod/github.com/go-chi/chi/v5@v5.0.10/mux.go:444 +0x544
2023-12-13T13:45:37.5191056Z   github.com/go-chi/chi/v5.(*Mux).routeHTTP-fm()
2023-12-13T13:45:37.5191183Z       <autogenerated>:1 +0x51
2023-12-13T13:45:37.5191286Z   net/http.HandlerFunc.ServeHTTP()
2023-12-13T13:45:37.5191527Z       /opt/hostedtoolcache/go/1.21.5/x64/src/net/http/server.go:2136 +0x47
2023-12-13T13:45:37.5191665Z   github.com/go-chi/chi/v5.(*Mux).ServeHTTP()
2023-12-13T13:45:37.5191937Z       /home/runner/go/pkg/mod/github.com/go-chi/chi/v5@v5.0.10/mux.go:90 +0x63b
2023-12-13T13:45:37.5192141Z   github.com/coder/coder/v2/coderd/coderdtest.NewOptions.func3()
2023-12-13T13:45:37.5192465Z       /home/runner/actions-runner/_work/coder/coder/coderd/coderdtest/coderdtest.go:313 +0x94
2023-12-13T13:45:37.5192585Z   net/http.HandlerFunc.ServeHTTP()
2023-12-13T13:45:37.5192803Z       /opt/hostedtoolcache/go/1.21.5/x64/src/net/http/server.go:2136 +0x47
2023-12-13T13:45:37.5192934Z   net/http.serverHandler.ServeHTTP()
2023-12-13T13:45:37.5193156Z       /opt/hostedtoolcache/go/1.21.5/x64/src/net/http/server.go:2938 +0x2a1
2023-12-13T13:45:37.5193271Z   net/http.(*conn).serve()
2023-12-13T13:45:37.5193495Z       /opt/hostedtoolcache/go/1.21.5/x64/src/net/http/server.go:2009 +0xc24
2023-12-13T13:45:37.5193617Z   net/http.(*Server).Serve.func3()
2023-12-13T13:45:37.5193830Z       /opt/hostedtoolcache/go/1.21.5/x64/src/net/http/server.go:3086 +0x4f
2023-12-13T13:45:37.5193836Z 
2023-12-13T13:45:37.5193947Z Goroutine 4887 (running) created at:
2023-12-13T13:45:37.5194048Z   net/http.(*Server).Serve()
2023-12-13T13:45:37.5194268Z       /opt/hostedtoolcache/go/1.21.5/x64/src/net/http/server.go:3086 +0x86c
2023-12-13T13:45:37.5194511Z   net/http/httptest.(*Server).goServe.func1()
2023-12-13T13:45:37.5194758Z       /opt/hostedtoolcache/go/1.21.5/x64/src/net/http/httptest/server.go:310 +0xcf
2023-12-13T13:45:37.5194764Z 
2023-12-13T13:45:37.5194875Z Goroutine 4950 (running) created at:
2023-12-13T13:45:37.5194967Z   net/http.(*Server).Serve()
2023-12-13T13:45:37.5195209Z       /opt/hostedtoolcache/go/1.21.5/x64/src/net/http/server.go:3086 +0x86c
2023-12-13T13:45:37.5195326Z   net/http/httptest.(*Server).goServe.func1()
2023-12-13T13:45:37.5195621Z       /opt/hostedtoolcache/go/1.21.5/x64/src/net/http/httptest/server.go:310 +0xcf
2023-12-13T13:45:37.5195698Z ==================

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions