Bug 161022
Summary: | rpmdb fails if run as su root | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Larry Weaver <lweaver> | ||||
Component: | rpm | Assignee: | Paul Nasrat <nobody+pnasrat> | ||||
Status: | CLOSED NOTABUG | QA Contact: | Mike McLean <mikem> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 4 | CC: | cheng, n3npq | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | i386 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2005-06-21 18:12:12 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
Larry Weaver
2005-06-19 22:41:56 UTC
DO you have NPTL enabled in your kernel and glibc? rpm expects shared posix mutexes. I have the default FC4 configuration. As noted, rpm works fine under a native login, either as a user or as root, so the kernel and glibc must have the necessary features. It only fails when I su to root. Only root can create locks because /var/lib/rpm/__db* are usually RDONLY. Change the permissions on /var/lib/rpm files temporarily to permit some user access, and you should see the same problem. Run an strac on the root command that is failing, and I should be able to tell more precisely what is fubar. The fix is gonna be with glibc and/or the kernel I'm almost positive however. Created attachment 115762 [details]
strace output on rpm -qa when executed as "su root"
I had exactly the same problem. Attached is the strace output. How do I know if I am running an NPTL kernel/glibc? I am using the default FC4 configuration. The strace is not showing a syscall, so I can't pin down details. No matter what, the error message displayed is precise. You are trying to run rpm+db4 which is compiled for an NPTL environment on a non-NPTL system. Default FC4 has NPTL enabled. Something else is misconfigured on your system, like installing "i386" rather than "i686" glibc (i.e. glibc.i386 is compiled w/o NPTL). I did not have a chance to choose i686/i386 for glibc (or any other packages): it was picked for me automatically by the installer. In any case, my glibc appears to be i686 (the glibc package installed some files under /lib/i686/). I just discovered the problem. In my startup files for my shell, I had LD_ASSUME_KERNEL=2.4.1 because there was some software that required this a long time ago (I have to check if it still does). Once I removed this everything works as expected. My clue was that I can get things to work when I used "su - root" instead of "su root", which pointed me to look at the environment. Yep, LD_ASSUME_KERNEL explains -NPTL. That was my problem also. I am setting this to Resolved: NOTABUG. |