Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 90648 - rpmlib can lock against itself
rpmlib can lock against itself
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
i686 Linux
medium Severity low
: ---
: ---
Assigned To: Jeff Johnson
Mike McLean
Depends On:
  Show dependency treegraph
Reported: 2003-05-11 17:51 EDT by Greg Hudson
Modified: 2007-04-18 12:53 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-05-12 10:56:35 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Test program illustrating rpmlib hang (735 bytes, text/plain)
2003-05-11 17:52 EDT, Greg Hudson
no flags Details

  None (edit)
Description Greg Hudson 2003-05-11 17:51:47 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030406

Description of problem:
If you create an rpm iterator with rpmtsInitIterator() and don't free it before
running rpmtsRun() or possibly other things, rpmlib will hang in futex() trying
to lock against itself.

This is arguably a programmer error (though I'm not aware of any documentation
saying that you can't do this), but some assertions seem warranted if so.

I will attached a test program illustrating the hang.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Build the attached test program with:
   cc -I/usr/include/rpm rpmtest.c -o rpmtest -lrpm
2. Run it on a system with the ash rpm installed.

Additional info:
Comment 1 Greg Hudson 2003-05-11 17:52:34 EDT
Created attachment 91611 [details]
Test program illustrating rpmlib hang
Comment 2 Jeff Johnson 2003-05-12 10:56:35 EDT
Yup, a (shared) read lock will prevent an (exclusive) write lock
on the same object.

"Don't do that" is a bit nicer than "Programmer error.", as concurrent
access works just fine in Berkeley DB used by rpm-4.2-1.

Note You need to log in before you can comment on or make changes to this bug.