[zypp-devel] rpmdb: illegal flag specified to DB->cursor
I'm having this problem on Fedora (9): rpmdb: illegal flag specified to DB->cursor error: db4 error(22) from db->cursor: Invalid argument This usually happens when using zypper and then yum or vice-versa. I don't know what's causing this problem but running rpm --rebuilddb usually fixes this. I am willing to do all the tests needed since I'm interested to get the ZYpp stack working on Fedora. Packages versions: libzypp-4.27.24.1-2.fc9.i386 sat-solver-0.9.4-1.fc9.i386 zypper-0.11.10-1.fc9.i386 Regards -- Lorenzo Villani Blog: http://blog.binaryhelix.net -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
On Fri, Aug 22, 2008 at 11:31:55AM +0200, Lorenzo Villani wrote:
I'm having this problem on Fedora (9):
rpmdb: illegal flag specified to DB->cursor error: db4 error(22) from db->cursor: Invalid argument
This usually happens when using zypper and then yum or vice-versa. I don't know what's causing this problem but running rpm --rebuilddb usually fixes this.
Looking at the berkeley db code it seems to me that libzypp or libsatsolver use the dbenv somewhat different than rpm: switch (flags) { case 0: break; case DB_WRITECURSOR: if (IS_READONLY(dbp)) return (__db_rdonly(dbenv, "DB->cursor")); if (!CDB_LOCKING(dbenv)) return (__db_ferr(dbenv, "DB->cursor", 0)); break; It must be that CDB_LOCKING() test. I've no clue why this happens, though. Cheers, Michael. -- Michael Schroeder mls@suse.de SUSE LINUX Products GmbH, GF Markus Rex, HRB 16746 AG Nuernberg main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);} -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
On Fri, Aug 22, 2008 at 12:57:50PM +0200, Michael Schroeder wrote:
On Fri, Aug 22, 2008 at 11:31:55AM +0200, Lorenzo Villani wrote:
I'm having this problem on Fedora (9):
rpmdb: illegal flag specified to DB->cursor error: db4 error(22) from db->cursor: Invalid argument
This usually happens when using zypper and then yum or vice-versa. I don't know what's causing this problem but running rpm --rebuilddb usually fixes this.
Looking at the berkeley db code it seems to me that libzypp or libsatsolver use the dbenv somewhat different than rpm:
switch (flags) { case 0: break; case DB_WRITECURSOR: if (IS_READONLY(dbp)) return (__db_rdonly(dbenv, "DB->cursor")); if (!CDB_LOCKING(dbenv)) return (__db_ferr(dbenv, "DB->cursor", 0)); break;
It must be that CDB_LOCKING() test. I've no clue why this happens, though.
Does it still happen if you add DB_INIT_CDB to the dbenv->open call in repo_rpmdb.c? (Maybe you also have to delete DB_PRIVATE, but first try with just DB_INIT_CDB.) Cheers, Michael. -- Michael Schroeder mls@suse.de SUSE LINUX Products GmbH, GF Markus Rex, HRB 16746 AG Nuernberg main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);} -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
On Friday 22 August 2008 13:06:55 Michael Schroeder wrote:
Does it still happen if you add DB_INIT_CDB to the dbenv->open call in repo_rpmdb.c? (Maybe you also have to delete DB_PRIVATE, but first try with just DB_INIT_CDB.)
I tried adding DB_INIT_CDB without leaving DB_PRIVATE but the corruption still happens. I'm going to remove DB_PRIVATE and try again. -- Regards, Lorenzo Villani Blog: http://blog.binaryhelix.net LinkedIn Profile: http://www.linkedin.com/in/lorenzovillani GPG Public Key ID: 72FE265D513BDC5C SSH Public Key Fingerprint: f1:34:00:f2:48:d6:63:41:a9:0f:17:a2:d8:38:32:80
participants (2)
-
Lorenzo Villani
-
Michael Schroeder