From Bugzilla Helper: User-Agent: Mozilla/5.0 (compatible; Konqueror/3; Linux 2.4.20-18.7; X11; i686; en_US) Description of problem: Version-Release number of selected component (if applicable): kernel-2.6.0-0.test1.1.26 How reproducible: Always Steps to Reproduce: 1.login as root 2.rpm -q kernel 3. Actual Results: 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 package kernel is not installed Expected Results: kernel-2.4.20-18.9 kernel-2.6.0-0.test1.1.26 Additional info: I didn't try rpm -b, but -q, -i and -e don't work.
I had this same problem, I haven't had much time to test it. Running Redhat 9 1.2 athlon 1 gig RAM (pc133) geforce 3 (not using nvidia closed source drivers)
I had the same problem while trying to build an RPM: 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 I went into /var/lib/rpm and cleared out a __db.001 lock file and then tried something simpler, like 'rpm -q rpm': rpmdb: write: 0xbfff7a50, 8192: Invalid argument error: db4 error(22) from dbenv->open: Invalid argument error: cannot open Packages index using db3 - Invalid argument (22) error: cannot open Packages database in /var/lib/rpm package rpm is not installed Here is the end of an strace from the run: 17725 0.000156 open("/usr/share/locale/en_US.UTF-8/LC_MESSAGES/rpm.mo", O_R DONLY) = -1 ENOENT (No such file or directory) 17725 0.000136 open("/usr/share/locale/en_US.utf8/LC_MESSAGES/rpm.mo", O_RD ONLY) = -1 ENOENT (No such file or directory) 17725 0.000153 open("/usr/share/locale/en_US/LC_MESSAGES/rpm.mo", O_RDONLY) = -1 ENOENT (No such file or directory) 17725 0.000109 open("/usr/share/locale/en.UTF-8/LC_MESSAGES/rpm.mo", O_RDON LY) = -1 ENOENT (No such file or directory) 17725 0.000107 open("/usr/share/locale/en.utf8/LC_MESSAGES/rpm.mo", O_RDONL Y) = -1 ENOENT (No such file or directory) 17725 0.000114 open("/usr/share/locale/en/LC_MESSAGES/rpm.mo", O_RDONLY) = -1 ENOENT (No such file or directory) 17725 0.000159 brk(0) = 0x805d000 17725 0.000050 brk(0x805e000) = 0x805e000 17725 0.000289 stat64("/var/lib/rpm/DB_CONFIG", 0xbfffc280) = -1 ENOENT (No such file or directory) 17725 0.000178 open("/var/lib/rpm/DB_CONFIG", O_RDONLY|O_LARGEFILE) = -1 EN OENT (No such file or directory) 17725 0.000132 stat64("/var/lib/rpm/__db.001", 0xbfffc2b0) = -1 ENOENT (No such file or directory) 17725 0.000493 open("/var/lib/rpm/__db.001", O_RDWR|O_CREAT|O_EXCL|O_DIRECT |O_LARGEFILE, 0644) = 3 17725 0.000190 fcntl64(3, F_SETFD, FD_CLOEXEC) = 0 17725 0.000063 open("/var/lib/rpm/__db.001", O_RDWR|O_CREAT|O_DIRECT|O_LARG EFILE, 0644) = 4 17725 0.000199 fcntl64(4, F_SETFD, FD_CLOEXEC) = 0 17725 0.000089 _llseek(4, 0, [0], SEEK_END) = 0 17725 0.000258 _llseek(4, 8192, [8192], SEEK_CUR) = 0 17725 0.000195 write(4, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0 \0\0"..., 8192) = -1 EINVAL (Invalid argument) 17725 0.000245 open("/usr/share/locale/en_US.UTF-8/LC_MESSAGES/libc.mo", O_ RDONLY) = -1 ENOENT (No such file or directory) 17725 0.000170 open("/usr/share/locale/en_US.utf8/LC_MESSAGES/libc.mo", O_R DONLY) = -1 ENOENT (No such file or directory) 17725 0.000125 open("/usr/share/locale/en_US/LC_MESSAGES/libc.mo", O_RDONLY ) = -1 ENOENT (No such file or directory) 17725 0.000104 open("/usr/share/locale/en.UTF-8/LC_MESSAGES/libc.mo", O_RDO NLY) = -1 ENOENT (No such file or directory) 17725 0.000105 open("/usr/share/locale/en.utf8/LC_MESSAGES/libc.mo", O_RDON LY) = -1 ENOENT (No such file or directory) 17725 0.000357 open("/usr/share/locale/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory) 17725 0.000363 write(2, "rpmdb: ", 7) = 7 | 00000 72 70 6d 64 62 3a 20 rpmdb: | 17725 0.000335 write(2, "write: 0xbfffa2c0, 8192: Invalid"..., 41) = 41 | 00000 77 72 69 74 65 3a 20 30 78 62 66 66 66 61 32 63 write: 0 xbfffa2c | | 00010 30 2c 20 38 31 39 32 3a 20 49 6e 76 61 6c 69 64 0, 8192: Invalid | | 00020 20 61 72 67 75 6d 65 6e 74 argumen t | 17725 0.000421 write(2, "\n", 1) = 1 | 00000 0a . | 17725 0.000127 close(4) = 0 17725 0.000056 close(3) = 0 17725 0.000084 brk(0) = 0x805e000 17725 0.000043 brk(0x8060000) = 0x8060000 17725 0.000119 write(2, "error: ", 7) = 7 | 00000 65 72 72 6f 72 3a 20 error: | 17725 0.000156 write(2, "db4 error(22) from dbenv->open: "..., 49) = 49 | 00000 64 62 34 20 65 72 72 6f 72 28 32 32 29 20 66 72 db4 erro r(22) fr | | 00010 6f 6d 20 64 62 65 6e 76 2d 3e 6f 70 65 6e 3a 20 om dbenv ->open: | | 00020 49 6e 76 61 6c 69 64 20 61 72 67 75 6d 65 6e 74 Invalid argument | | 00030 0a . | 17725 0.000360 write(2, "error: ", 7) = 7 | 00000 65 72 72 6f 72 3a 20 error: | 17725 0.000099 write(2, "cannot open Packages index using"..., 61) = 61 | 00000 63 61 6e 6e 6f 74 20 6f 70 65 6e 20 50 61 63 6b cannot o pen Pack | | 00010 61 67 65 73 20 69 6e 64 65 78 20 75 73 69 6e 67 ages ind ex using | | 00020 20 64 62 33 20 2d 20 49 6e 76 61 6c 69 64 20 61 db3 - I nvalid a | | 00030 72 67 75 6d 65 6e 74 20 28 32 32 29 0a rgument (22). | 17725 0.000260 rt_sigprocmask(SIG_BLOCK, ~[], [33], 8) = 0 17725 0.000096 rt_sigaction(SIGHUP, {SIG_DFL}, NULL, 8) = 0 17725 0.000072 rt_sigaction(SIGINT, {SIG_DFL}, NULL, 8) = 0 17725 0.000067 rt_sigaction(SIGTERM, {SIG_DFL}, NULL, 8) = 0 17725 0.000070 rt_sigaction(SIGQUIT, {SIG_DFL}, NULL, 8) = 0 17725 0.000487 rt_sigaction(SIGPIPE, {SIG_DFL}, NULL, 8) = 0 17725 0.000078 rt_sigprocmask(SIG_SETMASK, [33], NULL, 8) = 0 17725 0.000231 write(2, "error: ", 7) = 7 | 00000 65 72 72 6f 72 3a 20 error: | 17725 0.000120 write(2, "cannot open Packages database in"..., 46) = 46 | 00000 63 61 6e 6e 6f 74 20 6f 70 65 6e 20 50 61 63 6b cannot o pen Pack | | 00010 61 67 65 73 20 64 61 74 61 62 61 73 65 20 69 6e ages dat abase in | | 00020 20 2f 76 61 72 2f 6c 69 62 2f 72 70 6d 0a /var/li b/rpm. | 17725 0.000194 fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 3), . ..}) = 0 17725 0.000133 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON YMOUS, -1, 0) = 0x4042d000 17725 0.000087 write(1, "package rpm is not installed\n", 29) = 29 | 00000 70 61 63 6b 61 67 65 20 72 70 6d 20 69 73 20 6e package rpm is n | | 00010 6f 74 20 69 6e 73 74 61 6c 6c 65 64 0a ot insta lled. | 17725 0.000646 munmap(0x4042d000, 4096) = 0 17725 0.000084 exit_group(1) = ?
I can query the rpm database as a regular user, but not as root or sudo.
Have you tried an export LD_ASSUME_KERNEL=2.4.1 or export LD_ASSUME_KERNEL=2.2.5 before running `rpm'?
That does work. Can we get a real fix for this though ?
The "real" fix for this (kernel O_DIRECT imho) problem is in rpm-4.2-1 (RHL9) from ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.2.x