Skip to content

Flaky: TestOpen_SQLiteSharedFileWritersWait fails with SQLITE_BUSY under full -race run #429

Description

@MitulShah1

TestOpen_SQLiteSharedFileWritersWait (internal/sqldb/sqldb_test.go) failed once during a full go test -short -race ./... run while internal/requestlog was executing concurrently on the same disk:

sqldb_test.go:175: write against a shared SQLite file failed instead of waiting: database is locked (5) (SQLITE_BUSY)
sqldb_test.go:180: 9 of 100 writes failed
--- FAIL: TestOpen_SQLiteSharedFileWritersWait (54.95s)

The same test passes 3/3 with -count=3 -race in isolation, and internal/sqldb was not modified. The 100 concurrent writers appear to exceed the busy timeout when the host disk is under contention from other packages' tests.

Options: raise the busy timeout the test opens with, reduce writer count, or serialise the package with the other SQLite-heavy packages via -p in the pre-push hook.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions