Open
Description
Seen here: https://github.com/coder/coder/actions/runs/15043299280/job/42279884079
2025-05-15T11:12:09.2218567Z WARNING: DATA RACE
2025-05-15T11:12:09.2218755Z Write at 0x00c023902930 by goroutine 26397:
2025-05-15T11:12:09.2218988Z runtime.slicecopy()
2025-05-15T11:12:09.2219332Z /opt/hostedtoolcache/go/1.24.2/x64/src/runtime/slice.go:355 +0x0
2025-05-15T11:12:09.2219607Z bufio.(*Reader).Read()
2025-05-15T11:12:09.2219940Z /opt/hostedtoolcache/go/1.24.2/x64/src/bufio/bufio.go:258 +0x689
2025-05-15T11:12:09.2220204Z io.ReadAtLeast()
2025-05-15T11:12:09.2220502Z /opt/hostedtoolcache/go/1.24.2/x64/src/io/io.go:335 +0xca
2025-05-15T11:12:09.2220743Z io.ReadFull()
2025-05-15T11:12:09.2221032Z /opt/hostedtoolcache/go/1.24.2/x64/src/io/io.go:354 +0x356
2025-05-15T11:12:09.2221314Z github.com/lib/pq.(*conn).recvMessage()
2025-05-15T11:12:09.2221814Z /home/runner/go/pkg/mod/github.com/coder/[email protected]/conn.go:1032 +0x2f2
2025-05-15T11:12:09.2222189Z github.com/lib/pq.(*conn).recv1Buf()
2025-05-15T11:12:09.2222658Z /home/runner/go/pkg/mod/github.com/coder/[email protected]/conn.go:1073 +0x34
2025-05-15T11:12:09.2223006Z github.com/lib/pq.(*rows).Next()
2025-05-15T11:12:09.2223469Z /home/runner/go/pkg/mod/github.com/coder/[email protected]/conn.go:1587 +0x25b
2025-05-15T11:12:09.2223824Z github.com/lib/pq.(*rows).Close()
2025-05-15T11:12:09.2224284Z /home/runner/go/pkg/mod/github.com/coder/[email protected]/conn.go:1544 +0xac
2025-05-15T11:12:09.2224638Z database/sql.(*Rows).close.func1()
2025-05-15T11:12:09.2225011Z /opt/hostedtoolcache/go/1.24.2/x64/src/database/sql/sql.go:3458 +0x50
2025-05-15T11:12:09.2225352Z database/sql.withLock()
2025-05-15T11:12:09.2225697Z /opt/hostedtoolcache/go/1.24.2/x64/src/database/sql/sql.go:3574 +0xa6
2025-05-15T11:12:09.2225985Z database/sql.(*Rows).close()
2025-05-15T11:12:09.2226422Z /opt/hostedtoolcache/go/1.24.2/x64/src/database/sql/sql.go:3457 +0x27c
2025-05-15T11:12:09.2226719Z database/sql.(*Rows).awaitDone()
2025-05-15T11:12:09.2227079Z /opt/hostedtoolcache/go/1.24.2/x64/src/database/sql/sql.go:3020 +0x2b8
2025-05-15T11:12:09.2227402Z database/sql.(*Rows).initContextClose.gowrap1()
2025-05-15T11:12:09.2227791Z /opt/hostedtoolcache/go/1.24.2/x64/src/database/sql/sql.go:2996 +0x8f
2025-05-15T11:12:09.2228070Z
2025-05-15T11:12:09.2228184Z Previous read at 0x00c023902930 by goroutine 26370:
2025-05-15T11:12:09.2228437Z runtime.slicebytetostring()
2025-05-15T11:12:09.2228793Z /opt/hostedtoolcache/go/1.24.2/x64/src/runtime/string.go:125 +0x0
2025-05-15T11:12:09.2229081Z github.com/google/uuid.(*UUID).Scan()
2025-05-15T11:12:09.2229464Z /home/runner/go/pkg/mod/github.com/google/[email protected]/sql.go:43 +0x22a
2025-05-15T11:12:09.2229766Z database/sql.convertAssignRows()
2025-05-15T11:12:09.2230154Z /opt/hostedtoolcache/go/1.24.2/x64/src/database/sql/convert.go:396 +0x2fa7
2025-05-15T11:12:09.2230453Z database/sql.(*Rows).Scan()
2025-05-15T11:12:09.2230803Z /opt/hostedtoolcache/go/1.24.2/x64/src/database/sql/sql.go:3400 +0x727
2025-05-15T11:12:09.2231090Z database/sql.(*Row).Scan()
2025-05-15T11:12:09.2231439Z /opt/hostedtoolcache/go/1.24.2/x64/src/database/sql/sql.go:3517 +0x2e4
2025-05-15T11:12:09.2231859Z github.com/coder/coder/v2/coderd/database.(*sqlQuerier).GetDefaultOrganization()
2025-05-15T11:12:09.2232366Z /home/runner/work/coder/coder/coderd/database/queries.sql.go:5713 +0x2e5
2025-05-15T11:12:09.2232842Z github.com/coder/coder/v2/coderd/database/dbmetrics.(*metricsStore).GetDefaultOrganization()
2025-05-15T11:12:09.2233214Z <autogenerated>:1 +0xcf
2025-05-15T11:12:09.2233613Z github.com/coder/coder/v2/coderd/database/dbauthz.(*querier).GetDefaultOrganization.func1()
2025-05-15T11:12:09.2234220Z /home/runner/work/coder/coder/coderd/database/dbauthz/dbauthz.go:1752 +0x412
2025-05-15T11:12:09.2237956Z github.com/coder/coder/v2/coderd/database/dbauthz.(*querier).GetDefaultOrganization.fetch[go.shape.interface {},go.shape.struct { ID github.com/google/uuid.UUID "db:\"id\" json:\"id\""; Name string "db:\"name\" json:\"name\""; Description string "db:\"description\" json:\"description\""; CreatedAt time.Time "db:\"created_at\" json:\"created_at\""; UpdatedAt time.Time "db:\"updated_at\" json:\"updated_at\""; IsDefault bool "db:\"is_default\" json:\"is_default\""; DisplayName string "db:\"display_name\" json:\"display_name\""; Icon string "db:\"icon\" json:\"icon\""; Deleted bool "db:\"deleted\" json:\"deleted\"" },go.shape.func(context.Context, interface {}) (github.com/coder/coder/v2/coderd/database.Organization, error)].fetchWithAction[go.shape.interface {},go.shape.struct { ID github.com/google/uuid.UUID "db:\"id\" json:\"id\""; Name string "db:\"name\" json:\"name\""; Description string "db:\"description\" json:\"description\""; CreatedAt time.Time "db:\"created_at\" json:\"created_at\""; UpdatedAt time.Time "db:\"updated_at\" json:\"updated_at\""; IsDefault bool "db:\"is_default\" json:\"is_default\""; DisplayName string "db:\"display_name\" json:\"display_name\""; Icon string "db:\"icon\" json:\"icon\""; Deleted bool "db:\"deleted\" json:\"deleted\"" },go.shape.func(context.Context, interface {}) (github.com/coder/coder/v2/coderd/database.Organization, error)].func2()
2025-05-15T11:12:09.2241147Z /home/runner/work/coder/coder/coderd/database/dbauthz/dbauthz.go:594 +0x433
2025-05-15T11:12:09.2241621Z github.com/coder/coder/v2/coderd/database/dbauthz.(*querier).GetDefaultOrganization()
2025-05-15T11:12:09.2242151Z /home/runner/work/coder/coder/coderd/database/dbauthz/dbauthz.go:1753 +0x295
2025-05-15T11:12:09.2242600Z github.com/coder/coder/v2/coderd.(*API).CreateInMemoryTaggedProvisionerDaemon()
2025-05-15T11:12:09.2243046Z /home/runner/work/coder/coder/coderd/coderd.go:1741 +0x4d6
2025-05-15T11:12:09.2243424Z github.com/coder/coder/v2/coderd.(*API).CreateInMemoryProvisionerDaemon()
2025-05-15T11:12:09.2243850Z /home/runner/work/coder/coder/coderd/coderd.go:1726 +0xa8
2025-05-15T11:12:09.2244179Z github.com/coder/coder/v2/cli.newProvisionerDaemon.func6()
2025-05-15T11:12:09.2244554Z /home/runner/work/coder/coder/cli/server.go:1523 +0x1a
2025-05-15T11:12:09.2244880Z github.com/coder/coder/v2/provisionerd.(*Server).connect()
2025-05-15T11:12:09.2245323Z /home/runner/work/coder/coder/provisionerd/provisionerd.go:233 +0x63e
2025-05-15T11:12:09.2245747Z github.com/coder/coder/v2/provisionerd.New.gowrap1()
2025-05-15T11:12:09.2246171Z /home/runner/work/coder/coder/provisionerd/provisionerd.go:112 +0x33