spacchetti / pacchettibotti

Automation bot for PureScript's package infrastructure
7 stars 1 forks source link

SQLite3 returned ErrorBusy while attempting to perform prepare "PRAGMA journal_mode=WAL;": database is locked #4

Open kl0tl opened 4 years ago

kl0tl commented 4 years ago

I get the following error when trying to run pacchettibotti:

Capture d’écran 2020-06-14 à 18 43 55

Stack used to exhibit the same error and fixed it with a file lock, as @f-f did. Stack depends on more recent versions of persistent and persistent-sqlite than this project though, so I tried to update to persistent-2.9.2@rev:1 and persistent-sqlite-2.9.3 but without success:

Capture d’écran 2020-06-14 à 18 46 03
f-f commented 4 years ago

This is super weird. What OS are you on? Are you able to reproduce on any other machine?

f-f commented 4 years ago

Also note that we're building this with GHC 8.4. Maybe upgrading to 8.6 could help?

kl0tl commented 4 years ago

This happened on macOS v10.14.5 with Stack v2.1.3 and updating the LTS to 14.27 for GHC 8.6.5 didn’t change anything.

kl0tl commented 4 years ago

Here‘s what I get when querying sqlite3 compile options:

> import Database.Persist.Sql
> import Database.Persist.Sqlite
> runSqlite "db.sqlite" $ rawSql "PRAGMA compile_options;" [] :: IO [Single Text]
[ Single {unSingle = "COMPILER=clang-11.0.0"}
, Single {unSingle = "ENABLE_FTS3"}
, Single {unSingle = "ENABLE_FTS3_PARENTHESIS"}
, Single {unSingle = "ENABLE_FTS4"}
, Single {unSingle = "ENABLE_FTS5"}
, Single {unSingle = "ENABLE_JSON1"}
, Single {unSingle = "THREADSAFE=1"}
, Single {unSingle = "USE_URI"}
]

Do you see any difference perhaps?

f-f commented 4 years ago

@kl0tl I get this:

[ Single {unSingle = "COMPILER=gcc-9.2.1 20191008"}
, Single {unSingle = "ENABLE_FTS3"}
, Single {unSingle = "ENABLE_FTS3_PARENTHESIS"}
, Single {unSingle = "ENABLE_FTS4"}
, Single {unSingle = "ENABLE_FTS5"}
, Single {unSingle = "ENABLE_JSON1"}
, Single {unSingle = "THREADSAFE=1"}
, Single {unSingle = "USE_URI"}
]

..the only difference seems to be the compiler :thinking: