[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#32234: Cuirass: The SQLite built in busy handler might block the Fib
bug#32234: Cuirass: The SQLite built in busy handler might block the Fibers scheduler
Sat, 21 Jul 2018 11:57:57 +0200
mu4e 1.0; emacs 26.1
I'm trying to understand why Berlin web API times out.
I think the SQlite built in busy handler may block the Fibers scheduler.
We use "PRAGMA busy_timeout = 30000;", which is an alternative to
calling sqlite3_busy_timeout(), whose description is:
This routine sets a busy handler that sleeps for a specified amount
of time when a table is locked. The handler will sleep multiple
times until at least "ms" milliseconds of sleeping have
accumulated. After at least "ms" milliseconds of sleeping, the
handler returns 0 which causes sqlite3_step() to return SQLITE_BUSY.
To me this sounds like non-cooperative and non-resumable code.
A solution would be to set a custom handler through
sqlite3_busy_handler that would be Fibers compatible, i.e. it would
let the scheduler schedule other fibers instead of just sleeping, using
Fibers 'sleep' procedure.
- bug#32234: Cuirass: The SQLite built in busy handler might block the Fibers scheduler,
Clément Lassieur <=