Data race in v1.29.1
(slightly abbreviated)
==================
WARNING: DATA RACE
Write at 0x0001040887f8 by goroutine 20:
modernc.org/sqlite/lib._unixRandomness()
/xxx/pkg/mod/modernc.org/sqlite@v1.29.1/lib/sqlite_darwin_arm64.go:31877 +0xb8
modernc.org/sqlite/lib._sqlite3OsRandomness()
/xxx/pkg/mod/modernc.org/sqlite@v1.29.1/lib/sqlite_darwin_arm64.go:17306 +0x140
modernc.org/sqlite/lib.Xsqlite3_randomness()
/xxx/pkg/mod/modernc.org/sqlite@v1.29.1/lib/sqlite_darwin_arm64.go:21457 +0x2dc
modernc.org/sqlite/lib._writeJournalHdr()
/xxx/pkg/mod/modernc.org/sqlite@v1.29.1/lib/sqlite_darwin_arm64.go:39091 +0x8e4
modernc.org/sqlite/lib._pager_open_journal()
/xxx/pkg/mod/modernc.org/sqlite@v1.29.1/lib/sqlite_darwin_arm64.go:43207 +0x698
modernc.org/sqlite/lib._pager_write()
/xxx/pkg/mod/modernc.org/sqlite@v1.29.1/lib/sqlite_darwin_arm64.go:43371 +0xd8
modernc.org/sqlite/lib._sqlite3PagerWrite()
/xxx/pkg/mod/modernc.org/sqlite@v1.29.1/lib/sqlite_darwin_arm64.go:43553 +0x318
modernc.org/sqlite/lib._newDatabase()
/xxx/pkg/mod/modernc.org/sqlite@v1.29.1/lib/sqlite_darwin_arm64.go:53180 +0x168
modernc.org/sqlite/lib._btreeBeginTrans()
/xxx/pkg/mod/modernc.org/sqlite@v1.29.1/lib/sqlite_darwin_arm64.go:53348 +0xe7c
modernc.org/sqlite/lib._sqlite3BtreeBeginTrans()
/xxx/pkg/mod/modernc.org/sqlite@v1.29.1/lib/sqlite_darwin_arm64.go:53426 +0x158
modernc.org/sqlite/lib._sqlite3BtreeSetVersion()
/xxx/pkg/mod/modernc.org/sqlite@v1.29.1/lib/sqlite_darwin_arm64.go:61011 +0x31c
modernc.org/sqlite/lib._sqlite3VdbeExec()
/xxx/pkg/mod/modernc.org/sqlite@v1.29.1/lib/sqlite_darwin_arm64.go:77775 +0x2850
modernc.org/sqlite/lib._sqlite3Step()
/xxx/pkg/mod/modernc.org/sqlite@v1.29.1/lib/sqlite_darwin_arm64.go:69107 +0x19c
modernc.org/sqlite/lib.Xsqlite3_step()
/xxx/pkg/mod/modernc.org/sqlite@v1.29.1/lib/sqlite_darwin_arm64.go:69168 +0x1a4
modernc.org/sqlite.(*conn).step()
/xxx/pkg/mod/modernc.org/sqlite@v1.29.1/sqlite.go:972 +0x44
modernc.org/sqlite.(*stmt).exec.func1()
/xxx/pkg/mod/modernc.org/sqlite@v1.29.1/sqlite.go:528 +0x1c0
modernc.org/sqlite.(*stmt).exec()
/xxx/pkg/mod/modernc.org/sqlite@v1.29.1/sqlite.go:541 +0x1c8
modernc.org/sqlite.(*conn).exec()
/xxx/pkg/mod/modernc.org/sqlite@v1.29.1/sqlite.go:1657 +0xe4
modernc.org/sqlite.applyQueryParams()
/xxx/pkg/mod/modernc.org/sqlite@v1.29.1/sqlite.go:834 +0x184
modernc.org/sqlite.newConn()
/xxx/pkg/mod/modernc.org/sqlite@v1.29.1/sqlite.go:801 +0x208
modernc.org/sqlite.(*Driver).Open()
/xxx/pkg/mod/modernc.org/sqlite@v1.29.1/sqlite.go:1910 +0x38
database/sql.dsnConnector.Connect()
/opt/homebrew/Cellar/go/1.22.0/libexec/src/database/sql/sql.go:791 +0x58
database/sql.(*dsnConnector).Connect()
<autogenerated>:1 +0x20
database/sql.(*DB).conn()
/opt/homebrew/Cellar/go/1.22.0/libexec/src/database/sql/sql.go:1415 +0x76c
database/sql.(*DB).PingContext.func1()
/opt/homebrew/Cellar/go/1.22.0/libexec/src/database/sql/sql.go:883 +0x5c
database/sql.(*DB).retry()
/opt/homebrew/Cellar/go/1.22.0/libexec/src/database/sql/sql.go:1566 +0x4c
database/sql.(*DB).PingContext()
/opt/homebrew/Cellar/go/1.22.0/libexec/src/database/sql/sql.go:882 +0xa8
database/sql.(*DB).Ping()
/opt/homebrew/Cellar/go/1.22.0/libexec/src/database/sql/sql.go:900 +0x148
Previous read at 0x0001040887f8 by goroutine 21:
modernc.org/sqlite/lib._unixOpen()
/xxx/pkg/mod/modernc.org/sqlite@v1.29.1/lib/sqlite_darwin_arm64.go:31396 +0xe4
modernc.org/sqlite/lib._sqlite3OsOpen()
/xxx/pkg/mod/modernc.org/sqlite@v1.29.1/lib/sqlite_darwin_arm64.go:17256 +0xe8
modernc.org/sqlite/lib._sqlite3JournalOpen()
/xxx/pkg/mod/modernc.org/sqlite@v1.29.1/lib/sqlite_darwin_arm64.go:82679 +0x2c0
modernc.org/sqlite/lib._pager_open_journal()
/xxx/pkg/mod/modernc.org/sqlite@v1.29.1/lib/sqlite_darwin_arm64.go:43194 +0x558
modernc.org/sqlite/lib._pager_write()
/xxx/pkg/mod/modernc.org/sqlite@v1.29.1/lib/sqlite_darwin_arm64.go:43371 +0xd8
modernc.org/sqlite/lib._sqlite3PagerWrite()
/xxx/pkg/mod/modernc.org/sqlite@v1.29.1/lib/sqlite_darwin_arm64.go:43553 +0x318
modernc.org/sqlite/lib._newDatabase()
/xxx/pkg/mod/modernc.org/sqlite@v1.29.1/lib/sqlite_darwin_arm64.go:53180 +0x168
modernc.org/sqlite/lib._btreeBeginTrans()
/xxx/pkg/mod/modernc.org/sqlite@v1.29.1/lib/sqlite_darwin_arm64.go:53348 +0xe7c
modernc.org/sqlite/lib._sqlite3BtreeBeginTrans()
/xxx/pkg/mod/modernc.org/sqlite@v1.29.1/lib/sqlite_darwin_arm64.go:53426 +0x158
modernc.org/sqlite/lib._sqlite3BtreeSetVersion()
/xxx/pkg/mod/modernc.org/sqlite@v1.29.1/lib/sqlite_darwin_arm64.go:61011 +0x31c
modernc.org/sqlite/lib._sqlite3VdbeExec()
/xxx/pkg/mod/modernc.org/sqlite@v1.29.1/lib/sqlite_darwin_arm64.go:77775 +0x2850
modernc.org/sqlite/lib._sqlite3Step()
/xxx/pkg/mod/modernc.org/sqlite@v1.29.1/lib/sqlite_darwin_arm64.go:69107 +0x19c
modernc.org/sqlite/lib.Xsqlite3_step()
/xxx/pkg/mod/modernc.org/sqlite@v1.29.1/lib/sqlite_darwin_arm64.go:69168 +0x1a4
modernc.org/sqlite.(*conn).step()
/xxx/pkg/mod/modernc.org/sqlite@v1.29.1/sqlite.go:972 +0x44
modernc.org/sqlite.(*stmt).exec.func1()
/xxx/pkg/mod/modernc.org/sqlite@v1.29.1/sqlite.go:528 +0x1c0
modernc.org/sqlite.(*stmt).exec()
/xxx/pkg/mod/modernc.org/sqlite@v1.29.1/sqlite.go:541 +0x1c8
modernc.org/sqlite.(*conn).exec()
/xxx/pkg/mod/modernc.org/sqlite@v1.29.1/sqlite.go:1657 +0xe4
modernc.org/sqlite.applyQueryParams()
/xxx/pkg/mod/modernc.org/sqlite@v1.29.1/sqlite.go:834 +0x184
modernc.org/sqlite.newConn()
/xxx/pkg/mod/modernc.org/sqlite@v1.29.1/sqlite.go:801 +0x208
modernc.org/sqlite.(*Driver).Open()
/xxx/pkg/mod/modernc.org/sqlite@v1.29.1/sqlite.go:1910 +0x38
database/sql.dsnConnector.Connect()
/opt/homebrew/Cellar/go/1.22.0/libexec/src/database/sql/sql.go:791 +0x58
database/sql.(*dsnConnector).Connect()
<autogenerated>:1 +0x20
database/sql.(*DB).conn()
/opt/homebrew/Cellar/go/1.22.0/libexec/src/database/sql/sql.go:1415 +0x76c
database/sql.(*DB).PingContext.func1()
/opt/homebrew/Cellar/go/1.22.0/libexec/src/database/sql/sql.go:883 +0x5c
database/sql.(*DB).retry()
/opt/homebrew/Cellar/go/1.22.0/libexec/src/database/sql/sql.go:1566 +0x4c
database/sql.(*DB).PingContext()
/opt/homebrew/Cellar/go/1.22.0/libexec/src/database/sql/sql.go:882 +0xa8
database/sql.(*DB).Ping()
/opt/homebrew/Cellar/go/1.22.0/libexec/src/database/sql/sql.go:900 +0x148
Downgrading to v1.28.0 resolved the issue.