Bug 89734
| Summary: | rpm -qa simultaneous with rpm -i or -e causes rpmdbNextIterator error | ||
|---|---|---|---|
| Product: | [Retired] Red Hat Linux | Reporter: | Barry K. Nathan <barryn> |
| Component: | rpm | Assignee: | Paul Nasrat <nobody+pnasrat> |
| Status: | CLOSED RAWHIDE | QA Contact: | Mike McLean <mikem> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 9 | CC: | mitr |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | i686 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2005-09-29 21:39:50 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: | |||
|
Description
Barry K. Nathan
2003-04-27 05:27:28 UTC
Yes. Running as non-root cannot create shared locks because of permissions on /var/lib/rpm and /var/lib/rpm/__db* that would prevent a concurrent exclusive lock. So there is a window where non-root "rpm -qa" can see inconsistent results of operation in progress This needs a setgid helper to open __db files, with associated transfer of opened fd's, to fix correctly, aka privilege separation. I can reproduce this even if the rpm -qa's are being run as root. Example: [root@localhost root]# for z in `seq 1 16`;do rpm -qa > /dev/null & done [1] 17679 [2] 17680 [3] 17681 [4] 17682 [5] 17683 [6] 17684 [7] 17685 [8] 17686 [9] 17687 [10] 17688 [11] 17689 [12] 17690 [13] 17691 [14] 17692 [15] 17693 [16] 17694 [root@localhost root]# error: rpmdbNextIterator: skipping h# 927 blob size(9404): BAD, 8 + 16 * il(0) + dl(0) error: rpmdbNextIterator: skipping h# 927 blob size(9404): BAD, 8 + 16 * il(0) + dl(0) Hmmm, not for me, will try a couple times more. rpm-4.1.1? Ah, root. Nope, 80 simultaneous rpm -qa jobs run fine with NPTL locking on SMP. rpm-4.1.1? It happens with either RPM 4.1.1 (on RH 8.0) or with non-NPTL locking (LD_ASSUME_KERNEL=2.2.5) on RPM 4.2 (on RH 9). Red Hat Linux 9 is no longer supported and Fedora rawhide/devel is now purely NPTL. This should no longer be hit. |