Bug 166137 - rpm 4.2 does not close its database properly with --root opt
rpm 4.2 does not close its database properly with --root opt
Status: CLOSED WORKSFORME
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: rpm (Show other bugs)
3.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Paul Nasrat
Mike McLean
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-08-17 05:22 EDT by Bastien Nocera
Modified: 2007-11-30 17:07 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-12-01 05:01:34 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Test case shell script (317 bytes, text/plain)
2005-11-30 15:22 EST, Paul Nasrat
no flags Details
Specfile for test case (514 bytes, text/plain)
2005-11-30 15:24 EST, Paul Nasrat
no flags Details

  None (edit)
Description Bastien Nocera 2005-08-17 05:22:17 EDT
The same occurs with rpm 4.2.3-21_nonptl on RHEL3.

+++ This bug was initially created as a clone of Bug #117997 +++

Description of problem:
rpm 4.2 (at least 2004-01-07 cvs snapshot) does not close 
its database properly with --root option. 

Seems that all database files except Packages and Name
are opened after rpm calls chroot(), but the database 
is closing by one (AFAIK) function dbenv->close() 
(called from db_fini()) after rpm leaves "chroot jail". 

How reproducible:
Every time

Steps to Reproduce:
# mv /var/lib/rpm /var/lib/rpm-
# mkdir /tmp/foo
# rpm --root=/tmp/foo --initdb 
# rpm --root=/tmp/foo -i foo.rpm    
rpmdb: /var/lib/rpm/Filemd5s: unable to flush: No such file or directory
rpmdb: /var/lib/rpm/Sha1header: unable to flush: No such file or directory
rpmdb: /var/lib/rpm/Sigmd5: unable to flush: No such file or directory
rpmdb: /var/lib/rpm/Installtid: unable to flush: No such file or directory
rpmdb: /var/lib/rpm/Provideversion: unable to flush: No such file or
directory
rpmdb: /var/lib/rpm/Requireversion: unable to flush: No such file or
directory
rpmdb: /var/lib/rpm/Dirnames: unable to flush: No such file or
directory    
rpmdb: /var/lib/rpm/Triggername: unable to flush: No such file or
directory
rpmdb: /var/lib/rpm/Providename: unable to flush: No such file or
directory
rpmdb: /var/lib/rpm/Requirename: unable to flush: No such file or
directory
rpmdb: /var/lib/rpm/Group: unable to flush: No such file or directory
rpmdb: /var/lib/rpm/Basenames: unable to flush: No such file or directory
error: db4 error(2) from dbenv->close: No such file or directory
Comment 6 Paul Nasrat 2005-11-30 15:22:47 EST
Created attachment 121653 [details]
Test case shell script

Script to attempt to reproduce
Comment 7 Paul Nasrat 2005-11-30 15:24:27 EST
Created attachment 121654 [details]
Specfile for test case

Build then place in same dir as test script and run test.sh

Look for messages.
Comment 8 Paul Nasrat 2005-11-30 15:26:11 EST
The above test case works fine for me (ie no error) on rpm 4.2.3-24_nonptl.

Are people still seeing this with U6?  If so can they ammend the test case
appropriately so I reproduce here.
Comment 9 Bastien Nocera 2005-12-01 05:01:34 EST
Works with U6, thanks.

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