On Wed, Feb 22, 2017 at 10:02:17PM +0100, Jakub Bogusz wrote:
> On Tue, Feb 21, 2017 at 09:51:13PM +0100, Jakub Bogusz wrote:
> > On Tue, Jan 10, 2017 at 09:36:24PM +0200, Elan Ruusamäe wrote:
> > > not cool.
> > > 
> > > $ rpm -q rpm
> > > BDB0056 DB->cursor: DB_READ_COMMITTED, DB_READ_UNCOMMITTED and DB_RMW 
> > > require locking
> > > error: db3copen:db3.c:1470: db->cursor(22): Invalid argument
> > > BDB0056 DB->cursor: DB_READ_COMMITTED, DB_READ_UNCOMMITTED and DB_RMW 
> > > require locking
> > > error: db3copen:db3.c:1470: db->cursor(22): Invalid argument
> > > BDB0630 DB_THREAD mandates memory allocation flag on primary key DBT
> > > error: db3cpget:db3.c:1568: db->pget(22): Invalid argument
> > > error: error(22) getting keys from Nvra index
> > > error: error(1) getting records from Nvra index
> > > package rpm is not installed
> > > 
> > > luckily was able to downgrade.
> > 
> > Which db version was used?
> > Was that default system db (with headers in /usr/include)?
> > 
> > I experienced such behaviour when trying to upgrade rpm 5.4.15+db 6.1.19
> > to 5.4.17+db 6.1.29 (while the system db is 6.2.23, maybe some file
> > caught system db.h)
> 
> Update: still the same with uid>0 (no write permission to /var/lib/rpm).
> It seems that DB_READ_COMMITTED and DB_READ_UNCOMMITTED require +w,
> so they should be filtered out in unprivileged mode.

Issue explained:

DB_READ_COMMITTED and DB_READ_UNCOMMITTED are cursor/get/set/txn options.
DB_RDONLY and DB_READ_UNCOMMITTED are open options.

But... DB_READ_COMMITTED and DB_RDONLY have the same value!
So "read_committed" cannot be applied to dbi_oflags (should be in
eflags?) and applied to DB->cursor operations, like it's done since rpm
5.4.17 (leaving DB_READ_COMMITTED bit from oflags to cursor causes DB_RDONLY
bit to be passed as DB_READ_COMITTED, which conflicts with read-only database).


-- 
Jakub Bogusz    http://qboosh.pl/
_______________________________________________
pld-devel-en mailing list
pld-devel-en@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-devel-en

Reply via email to