rpmdb locking broken by other-arch rpmquery
Bug #635869 reported by
Jeff Johnson
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
RPM |
Triaged
|
Low
|
Unassigned | ||
Fedora |
Won't Fix
|
Low
|
Bug Description
tracker
tags: | added: fedora multilib rpmdb |
Changed in rpm: | |
status: | New → Triaged |
importance: | Undecided → Low |
tags: | added: locking |
tags: | removed: multilib |
tags: | added: multilib |
Changed in fedora: | |
importance: | Unknown → Low |
status: | Unknown → Won't Fix |
To post a comment you must log in.
rpmquery from rpm.i386 run by root on rpm.x86_64 is either refused or rpm.i386 makes rpmdb unusable for later runs of rpm.x86_64. Both cases are not right.
Tried to use rpm.i386 on x86_64 F10 and it was refused: 4.6.0-1. fc10.i386/ usr/bin/ rpmquery -q rpm rpm/__db. 001: unable to find environment rpm/__db. 001: unable to find environment
# /tmp/rpm-
rpmdb: /var/lib/
error: db4 error(2) from dbenv->open: No such file or directory
error: cannot open Packages index using db3 - No such file or directory (2)
error: cannot open Packages database in /var/lib/rpm
rpmdb: /var/lib/
error: db4 error(2) from dbenv->open: No such file or directory
error: cannot open Packages database in /var/lib/rpm
package rpm is not installed
As the error was printed after rpmquery.i386 examined `/var/lib/ rpm/__db. 001' tried to run normal x86_64:
# rpm --rebuilddb
# _
Everything was OK and /var/lib/rpm/__db.* files got deleted as usual.
Now I tried to run again: 4.6.0-1. fc10.i386/ usr/bin/ rpmquery -q rpm 0-1.fc10. x86_64
# /tmp/rpm-
rpm-4.6.
on Fedora 10 x86_64 and it worked fine now!
But now x86_64 rpm started to fail:
# rpm -qv rpm
rpmdb: munmap: Invalid argument
rpmdb: munmap: Invalid argument
<hang>
<later:>
rpmdb: unable to join the environment
error: db4 error(11) from dbenv->open: Resource temporarily unavailable
error: cannot open Packages index using db3 - Resource temporarily unavailable (11)
error: cannot open Packages database in /var/lib/rpm
rpmdb: munmap: Invalid argument
After `rm -f /var/lib/ rpm/__db. *' it started working again.
(Bug 480510 Comment #3)
> the *database* is 32/64bit portable, the db environment is not. Going through
> the environment is the means to safe concurrent access to the db,
Therefore asking for fixing the biarch problem of the environment locking.
More user visible problem is that gdb.ppc64 using rpm-libs.ppc64 does not work because default rpm is rpm.ppc(32).
Possible workaround for GDB is to run popen("rpmquery ...") instead of librpm calls.