[Bug 232350] periodic: pkg-checksum and pkg-backup interfere with 'overnight' port builds

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Fri Jan 10 06:46:15 UTC 2020


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=232350

Matthew Seaman <matthew at FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |matthew at FreeBSD.org

--- Comment #28 from Matthew Seaman <matthew at FreeBSD.org> ---
(In reply to Tatsuki Makino from comment #27)

The pkg_lock table is used by pkg-lock(8), not for the database locking used as
a part of the routine operations of pkg(8) as a whole.

The sqlite3 locking used by pkg(8) is a global lock over the whole database --
sqlite3 is not a multiuser database and has essentially no support for
concurrent access or MVCC.  If one instance of pkg(8) is active it will hold
either a write lock -- giving it exclusive access -- or a read lock -- which
could be shared with other consumers, but all are blocked from writing or
obtaining a write lock themselves.  That's always going to be a potential cause
of problems whenever multiple invocations of pkg(8) are run simultaneously.

This is unfortunately intrinsic to the use of sqlite3.  Possible alternatives
might include much heavier-weight RDBMSes like mysql or postgresql, which would
solve the concurrency problem but doesn't really seem practical for general
use.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list