Bug 234442
| Summary: | RPM Updates Corrupt RPM Database | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 4 | Reporter: | Matt Thompson <matt.thompson> | ||||
| Component: | rpm | Assignee: | Panu Matilainen <pmatilai> | ||||
| Status: | CLOSED NOTABUG | QA Contact: | |||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | medium | ||||||
| Version: | 4.4 | ||||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | x86_64 | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2007-08-20 11:19:58 UTC | Type: | --- | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
|
Description
Matt Thompson
2007-03-29 09:23:56 UTC
Your system is not supporting posix shared mutexes for some reason. Without locking, you're likely to see cache inconsistencies as above. Try reverting the kernel upgrade and see whether the problem is in that kernel. Hello Jeff, Thanks for the reply. I tried booting off the original kernel (2.6.9-22.0.2.ELsmp) but this does not seem to have solved the issue. I removed /var/lib/rpm/__db*, did an rpm --rebuilddb, verified that rpmdb_verify did not return any errors on the Packages file, and then attempted to install a package via up2date. The up2date process returned: error: db4 error(-30988) from dbcursor->c_get: DB_PAGE_NOTFOUND: Requested page not found error: db4 error(-30988) from dbcursor->c_get: DB_PAGE_NOTFOUND: Requested page not found ... and I now see this when running rpmdb_verify on Packages: db_verify: unable to initialize mutex: Function not implemented db_verify: /var/lib/rpm/Packages: Function not implemented db_verify: DB->verify: /var/lib/rpm/Packages: Function not implemented Any further suggestions would be appreciated. Thank you! -Matt Could you run a strace with -vv and attach the output here? I can probably pinpoint what function is not implemented from that. Created attachment 151406 [details]
strace -vv from rpmdb_verify on the Packages file
Hi Jeff,
I've attached strace -vv output on an rpmdb_verify Packages.
Thanks,
Matt
Did the strace'd rpmdb_verify display the symptom?
db_verify: unable to initialize mutex: Function not implemented
If so, I'm not seeing in the strace.
I'm also not seeing any NPTL calls.
Here's why, you're using the old, non-NPTL, libpthread:
...
close(3) = 0
open("/lib64/libpthread.so.0", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0000S\0\0"..., 832) = 832
fstat(3, {st_dev=makedev(8, 5), st_ino=5670736, st_mode=S_IFREG|0755, st_nlink=1, st_uid=0,
st_gid=0, st_blksize=4096,
...
The old libpthread does not support the POSIX optional pthread_mutexattr_setpshared()
routine, that's the function that db_verify is whining about.
So that explains what you are seeing.
CHeck your glibc install to make sure that it has +NPTL enabled is what you need to fix.
Again , you won't be happy running rpm (which expects +NPTL) on a -NPTL system, you
can expect frequent occurences of cache inconsistency because of (at least) lack of
interprocess pthread_mutex* locking.
That's what the function pthread_mutexattr_setpshared() provides.
Hi Jeff, After reading your last update I ran "getconf GNU_LIBPTHREAD_VERSION" on this machine and noticed that it was in fact using linuxthreads-0.10 and not NPTL 2.3.4. Using the information found on http://dag.wieers.com/howto/compatibility I was able to use NPTL and when I tested installing / removing RPMs via up2date this did not result the Packages file getting corrupted. I have since searched through /etc and found "export LD_ASSUME_KERNEL=2.4.1" hard-coded in /etc/profile so can now explain why this is happening. Thanks again for your assistance. This issue can be resolved. Regards, Matt Thompson Closing NOTABUG as per comment #6 (custom, global LD_ASSUME_KERNEL setting disabling NPTL which rpm requires to function) |