Bug 59163 - RPM produces assertion violation on NFS mounted directory
RPM produces assertion violation on NFS mounted directory
Status: CLOSED WONTFIX
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
7.2
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-01-31 21:31 EST by Bruce Bigby
Modified: 2008-05-01 11:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-02-09 06:51:48 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)

  None (edit)
Description Bruce Bigby 2002-01-31 21:31:52 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.5) Gecko/20011013

Description of problem:
I'm not sure whether rpm's production of an assertion violation is a valid
response under the conditions under which I executed it.  Basically, I tried to
'su' to root and install an RPM on an NFS mounted home directory.  The NFS
client machine does not have root permssion for the file system.  I wouldn't
expect that to matter, since I was just going to read the file -- not change it.
 As root, I executed,


rpm -ivh *.rpm

and rpm produced the following error:


rpm: rpmio_internal.h:338: c2f: Assertion `fd && fd->magic == 0x04463138' failed

Is this a problem or is the behavior valid under the above conditions?

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


How reproducible:
Always

Steps to Reproduce:
1. Log into an NFS mounted partition
2. Make sure that the NFS client does have root priveledges on the server.
3. As root, try to install the rpm, using the following command:

rpm -ivh *.rpm


Actual Results:  rpm produced the following error:

rpm: rpmio_internal.h:338: c2f: Assertion `fd && fd->magic == 0x04463138' failed


Expected Results:  I expected rpm to report a sucess.

Additional info:

I had to copy the rpm to local machine's /tmp.  Then I could install it just
fine, using

rpm -ivh *.rpm

It seems that the installed failed while I was in an NFS mounted directory.  I'm
actually running kernel 2.4.16.  I don't know whether NFS produces this behavior
in 2.4.9.
Comment 1 Jeff Johnson 2002-02-01 12:48:35 EST
Please add "--rpmiodebug -vv" and attach the
copious output here.

The assertion is firing off to prevent a double free on
a refcounted FD_t, this is a "never happens" programming
errror, probably on an obscure error pathway through rpm code
that is triggerd by some difficult to reproduce NFS error.
Comment 2 Bruce Bigby 2002-02-04 21:21:30 EST
Here's the copius error messages when I invoked the following:

rpm -ivh -vv --rpmiodebug GEF* 2>/tmp/rpm.out


####################################################

*** Fopen ufdio path /usr/lib/rpm/rpmrc fmode r.fpio
*** ufdOpen(/usr/lib/rpm/rpmrc,0x0,0666)
--> fd  0x81b75d8 ++ 1 open (fdOpen) at rpmio.c:376 	| FD -1 fp (nil)
==>
fdOpen("/usr/lib/rpm/rpmrc",0,0666) 	| FD 3 fp (nil)
==> Fileno(0x81b75d8) rc 3 	| UFD 3 fp (nil)
==>
ufdOpen("/usr/lib/rpm/rpmrc",0,0666) 	| UFD 3 fp (nil)
*** Fdopen(0x81b75d8,r.fpio) 	| UFD 3 fp (nil)
==> fopencookie(0x81b75d8,"r",*0x819fc40) returns fp 0x81b76d0
--> fd  0x81b75d8 ++ 2 fopencookie at rpmio.c:2506 	| LIBIO 0x81b76d0(-1) fdno -1
| UFD 3 fp 0x81b76d0
==> Fdopen(0x81b75d8,"r.fpio") returns fd 0x81b75d8 	| LIBIO 0x81b76d0(-1) fdno -1
| UFD 3 fp 0x81b76d0
==> Ferror(0x81b75d8) rc 0 	| LIBIO 0x81b76d0(-1) fdno -1 | UFD 3 fp 0x81b76d0
==> Fileno(0x81b75d8) rc 3 	| LIBIO 0x81b76d0(-1) fdno -1 | UFD 3 fp 0x81b76d0
==> Fread(0xbfffc560,1,8907,0x81b75d8) 	| LIBIO 0x81b76d0(-1) fdno -1 | UFD 3 fp
0x81b76d0
==>
fdRead(0x81b75d8,0x4003b000,8192) rc 8192 	| LIBIO 0x81b76d0(-1) fdno -1 | UFD 3
fp 0x81b76d0
==>
fdRead(0x81b75d8,0x4003b000,8192) rc 715 	| LIBIO 0x81b76d0(-1) fdno -1 | UFD 3 fp
0x81b76d0
==>
fdRead(0x81b75d8,0x4003b2cb,7477) rc 0 	| LIBIO 0x81b76d0(-1) fdno -1 | UFD 3 fp
0x81b76d0
==> Ferror(0x81b75d8) rc 0 	| LIBIO 0x81b76d0(-1) fdno -1 | UFD 3 fp 0x81b76d0
==> Fclose(0x81b75d8) 	| LIBIO 0x81b76d0(-1) fdno -1 | UFD 3 fp 0x81b76d0
--> fd  0x81b75d8 ++ 3 Fclose at rpmio.c:2296 	| LIBIO 0x81b76d0(-1) fdno -1 | UFD
3 fp 0x81b76d0
==>
fdClose(0x81b75d8) rc 0 	| UFD -1 fp 0x81b76d0
--> fd  0x81b75d8 -- 3 open (fdClose) at rpmio.c:366 	| UFD -1 fp 0x81b76d0
==>
fdClose(0x81b75d8) rc fffffffe 	| LIBIO 0x81b76d0(-1) fdno -1 | UFD -1 fp (nil)
--> fd  0x81b75d8 -- 2 open (fdClose) at rpmio.c:366 	| LIBIO 0x81b76d0(-1) fdno
-1 | UFD -1 fp (nil)
--> fd  0x81b75d8 -- 1 Fclose at rpmio.c:2342 	| UFD -1 fp (nil)
*** Fopen ufdio path /etc/rpmrc fmode r.fpio
*** ufdOpen(/etc/rpmrc,0x0,0666)
*** Fopen ufdio path /root/.rpmrc fmode r.fpio
*** ufdOpen(/root/.rpmrc,0x0,0666)
*** Fopen ufdio path /usr/lib/rpm/macros fmode r.fpio
*** ufdOpen(/usr/lib/rpm/macros,0x0,0666)
--> fd  0x81bb7a8 ++ 1 open (fdOpen) at rpmio.c:376 	| FD -1 fp (nil)
==>
fdOpen("/usr/lib/rpm/macros",0,0666) 	| FD 3 fp (nil)
==> Fileno(0x81bb7a8) rc 3 	| UFD 3 fp (nil)
==>
ufdOpen("/usr/lib/rpm/macros",0,0666) 	| UFD 3 fp (nil)
*** Fdopen(0x81bb7a8,r.fpio) 	| UFD 3 fp (nil)
==> fopencookie(0x81bb7a8,"r",*0x819fc40) returns fp 0x81bb858
--> fd  0x81bb7a8 ++ 2 fopencookie at rpmio.c:2506 	| LIBIO 0x81bb858(-1) fdno -1
| UFD 3 fp 0x81bb858
==> Fdopen(0x81bb7a8,"r.fpio") returns fd 0x81bb7a8 	| LIBIO 0x81bb858(-1) fdno -1
| UFD 3 fp 0x81bb858
==> Ferror(0x81bb7a8) rc 0 	| LIBIO 0x81bb858(-1) fdno -1 | UFD 3 fp 0x81bb858
==>
fdRead(0x81bb7a8,0x4003b000,8192) rc 8192 	| LIBIO 0x81bb858(-1) fdno -1 | UFD 3
fp 0x81bb858
==>
fdRead(0x81bb7a8,0x4003b000,8192) rc 8192 	| LIBIO 0x81bb858(-1) fdno -1 | UFD 3
fp 0x81bb858
==>
fdRead(0x81bb7a8,0x4003b000,8192) rc 4251 	| LIBIO 0x81bb858(-1) fdno -1 | UFD 3
fp 0x81bb858
==>
fdRead(0x81bb7a8,0x4003c09b,3941) rc 0 	| LIBIO 0x81bb858(-1) fdno -1 | UFD 3 fp
0x81bb858
==>
fdRead(0x81bb7a8,0x4003b000,8192) rc 0 	| LIBIO 0x81bb858(-1) fdno -1 | UFD 3 fp
0x81bb858
==> Fclose(0x81bb7a8) 	| LIBIO 0x81bb858(-1) fdno -1 | UFD 3 fp 0x81bb858
--> fd  0x81bb7a8 ++ 3 Fclose at rpmio.c:2296 	| LIBIO 0x81bb858(-1) fdno -1 | UFD
3 fp 0x81bb858
==>
fdClose(0x81bb7a8) rc 0 	| UFD -1 fp 0x81bb858
--> fd  0x81bb7a8 -- 3 open (fdClose) at rpmio.c:366 	| UFD -1 fp 0x81bb858
==>
fdClose(0x81bb7a8) rc fffffffe 	| LIBIO 0x81bb858(-1) fdno -1 | UFD -1 fp (nil)
--> fd  0x81bb7a8 -- 2 open (fdClose) at rpmio.c:366 	| LIBIO 0x81bb858(-1) fdno
-1 | UFD -1 fp (nil)
--> fd  0x81bb7a8 -- 1 Fclose at rpmio.c:2342 	| UFD -1 fp (nil)
*** Fopen ufdio path /usr/lib/rpm/i686-linux/macros fmode r.fpio
*** ufdOpen(/usr/lib/rpm/i686-linux/macros,0x0,0666)
--> fd  0x81bb7a8 ++ 1 open (fdOpen) at rpmio.c:376 	| FD -1 fp (nil)
==>
fdOpen("/usr/lib/rpm/i686-linux/macros",0,0666) 	| FD 3 fp (nil)
==> Fileno(0x81bb7a8) rc 3 	| UFD 3 fp (nil)
==>
ufdOpen("/usr/lib/rpm/i686-linux/macros",0,0666) 	| UFD 3 fp (nil)
*** Fdopen(0x81bb7a8,r.fpio) 	| UFD 3 fp (nil)
==> fopencookie(0x81bb7a8,"r",*0x819fc40) returns fp 0x81bb858
--> fd  0x81bb7a8 ++ 2 fopencookie at rpmio.c:2506 	| LIBIO 0x81bb858(-1) fdno -1
| UFD 3 fp 0x81bb858
==> Fdopen(0x81bb7a8,"r.fpio") returns fd 0x81bb7a8 	| LIBIO 0x81bb858(-1) fdno -1
| UFD 3 fp 0x81bb858
==> Ferror(0x81bb7a8) rc 0 	| LIBIO 0x81bb858(-1) fdno -1 | UFD 3 fp 0x81bb858
==>
fdRead(0x81bb7a8,0x4003b000,8192) rc 1688 	| LIBIO 0x81bb858(-1) fdno -1 | UFD 3
fp 0x81bb858
==>
fdRead(0x81bb7a8,0x4003b698,6504) rc 0 	| LIBIO 0x81bb858(-1) fdno -1 | UFD 3 fp
0x81bb858
==>
fdRead(0x81bb7a8,0x4003b000,8192) rc 0 	| LIBIO 0x81bb858(-1) fdno -1 | UFD 3 fp
0x81bb858
==> Fclose(0x81bb7a8) 	| LIBIO 0x81bb858(-1) fdno -1 | UFD 3 fp 0x81bb858
--> fd  0x81bb7a8 ++ 3 Fclose at rpmio.c:2296 	| LIBIO 0x81bb858(-1) fdno -1 | UFD
3 fp 0x81bb858
==>
fdClose(0x81bb7a8) rc 0 	| UFD -1 fp 0x81bb858
--> fd  0x81bb7a8 -- 3 open (fdClose) at rpmio.c:366 	| UFD -1 fp 0x81bb858
==>
fdClose(0x81bb7a8) rc fffffffe 	| LIBIO 0x81bb858(-1) fdno -1 | UFD -1 fp (nil)
--> fd  0x81bb7a8 -- 2 open (fdClose) at rpmio.c:366 	| LIBIO 0x81bb858(-1) fdno
-1 | UFD -1 fp (nil)
--> fd  0x81bb7a8 -- 1 Fclose at rpmio.c:2342 	| UFD -1 fp (nil)
*** Fopen ufdio path /etc/rpm/macros.specspo fmode r.fpio
*** ufdOpen(/etc/rpm/macros.specspo,0x0,0666)
*** Fopen ufdio path /etc/rpm/macros.db1 fmode r.fpio
*** ufdOpen(/etc/rpm/macros.db1,0x0,0666)
*** Fopen ufdio path /etc/rpm/macros fmode r.fpio
*** ufdOpen(/etc/rpm/macros,0x0,0666)
*** Fopen ufdio path /etc/rpm/i686-linux/macros fmode r.fpio
*** ufdOpen(/etc/rpm/i686-linux/macros,0x0,0666)
*** Fopen ufdio path /root/.rpmmacros fmode r.fpio
*** ufdOpen(/root/.rpmmacros,0x0,0666)
D: counting packages to install
D: found 2 packages
D: looking for packages to download
D: retrieved 0 packages
*** Fopen ufdio path GEF-client-7.0.0-2.i586.rpm fmode r.ufdio
*** ufdOpen(GEF-client-7.0.0-2.i586.rpm,0x0,0666)
--> fd  0x81bb780 ++ 1 open (fdOpen) at rpmio.c:376 	| FD -1 fp (nil)
==>
fdOpen("GEF-client-7.0.0-2.i586.rpm",0,0666) 	| FD 3 fp (nil)
==> Fileno(0x81bb780) rc 3 	| UFD 3 fp (nil)
==>
ufdOpen("GEF-client-7.0.0-2.i586.rpm",0,0666) 	| UFD 3 fp (nil)
*** Fdopen(0x81bb780,r.ufdio) 	| UFD 3 fp (nil)
==> fopencookie(0x81bb780,"r",*0x819fb20) returns fp 0x81c0638
--> fd  0x81bb780 ++ 2 fopencookie at rpmio.c:2506 	| LIBIO 0x81c0638(-1) fdno -1
| UFD 3 fp 0x81c0638
==> Fdopen(0x81bb780,"r.ufdio") returns fd 0x81bb780 	| LIBIO 0x81c0638(-1) fdno
-1 | UFD 3 fp 0x81c0638
==> Ferror(0x81bb780) rc 0 	| LIBIO 0x81c0638(-1) fdno -1 | UFD 3 fp 0x81c0638
==> Fileno(0x81bb780) rc 3 	| LIBIO 0x81c0638(-1) fdno -1 | UFD 3 fp 0x81c0638
==>
fdRead(0x81bb780,0xbffff770,96) rc 96 	| LIBIO 0x81c0638(-1) fdno -1 | UFD 3 fp
0x81c0638
==>
fdRead(0x81bb780,0xbfffed50,16) rc 16 	| LIBIO 0x81c0638(-1) fdno -1 | UFD 3 fp
0x81c0638
==>
fdRead(0x81bb780,0x81c0708,252) rc 252 	| LIBIO 0x81c0638(-1) fdno -1 | UFD 3 fp
0x81c0638
==> Fileno(0x81bb780) rc 3 	| LIBIO 0x81c0638(-1) fdno -1 | UFD 3 fp 0x81c0638
D: Expected size:        42006 = lead(96)+sigs(268)+pad(4)+data(41638)
D:   Actual size:        42006
==>
fdRead(0x81bb780,0xbfffee20,4) rc 4 	| LIBIO 0x81c0638(-1) fdno -1 | UFD 3 fp
0x81c0638
==>
fdRead(0x81bb780,0xbffff610,16) rc 16 	| LIBIO 0x81c0638(-1) fdno -1 | UFD 3 fp
0x81c0638
==>
fdRead(0x81bb780,0x81c08a0,3409) rc 3409 	| LIBIO 0x81c0638(-1) fdno -1 | UFD 3 fp
0x81c0638
D: opening db index       /var/lib/rpm/Packages create mode=0x42
D: locked  db index       /var/lib/rpm/Packages
==> Fclose(0x81bb780) 	| LIBIO 0x81c0638(-1) fdno -1 | UFD 3 fp 0x81c0638
--> fd  0x81bb780 ++ 3 Fclose at rpmio.c:2296 	| LIBIO 0x81c0638(-1) fdno -1 | UFD
3 fp 0x81c0638
==>
fdClose(0x81bb780) rc 0 	| UFD -1 fp 0x81c0638
--> fd  0x81bb780 -- 3 open (fdClose) at rpmio.c:366 	| UFD -1 fp 0x81c0638
==>
fdClose(0x81bb780) rc fffffffe 	| LIBIO 0x81c0638(-1) fdno -1 | UFD -1 fp (nil)
--> fd  0x81bb780 -- 2 open (fdClose) at rpmio.c:366 	| LIBIO 0x81c0638(-1) fdno
-1 | UFD -1 fp (nil)
--> fd  0x81bb780 -- 1 Fclose at rpmio.c:2342 	| UFD -1 fp (nil)
*** Fopen ufdio path GEF-devel-7.0.0-2.i586.rpm fmode r.ufdio
*** ufdOpen(GEF-devel-7.0.0-2.i586.rpm,0x0,0666)
--> fd  0x81c0638 ++ 1 open (fdOpen) at rpmio.c:376 	| FD -1 fp (nil)
==>
fdOpen("GEF-devel-7.0.0-2.i586.rpm",0,0666) 	| FD 3 fp (nil)
==> Fileno(0x81c0638) rc 3 	| UFD 3 fp (nil)
==>
ufdOpen("GEF-devel-7.0.0-2.i586.rpm",0,0666) 	| UFD 3 fp (nil)
*** Fdopen(0x81c0638,r.ufdio) 	| UFD 3 fp (nil)
==> fopencookie(0x81c0638,"r",*0x819fb20) returns fp 0x81c5ad8
--> fd  0x81c0638 ++ 2 fopencookie at rpmio.c:2506 	| LIBIO 0x81c5ad8(-1) fdno -1
| UFD 3 fp 0x81c5ad8
==> Fdopen(0x81c0638,"r.ufdio") returns fd 0x81c0638 	| LIBIO 0x81c5ad8(-1) fdno
-1 | UFD 3 fp 0x81c5ad8
==> Ferror(0x81c0638) rc 0 	| LIBIO 0x81c5ad8(-1) fdno -1 | UFD 3 fp 0x81c5ad8
==> Fileno(0x81c0638) rc 3 	| LIBIO 0x81c5ad8(-1) fdno -1 | UFD 3 fp 0x81c5ad8
==>
fdRead(0x81c0638,0xbffff770,96) rc 96 	| LIBIO 0x81c5ad8(-1) fdno -1 | UFD 3 fp
0x81c5ad8
==>
fdRead(0x81c0638,0xbfffed50,16) rc 16 	| LIBIO 0x81c5ad8(-1) fdno -1 | UFD 3 fp
0x81c5ad8
==>
fdRead(0x81c0638,0x81c5ba8,252) rc 252 	| LIBIO 0x81c5ad8(-1) fdno -1 | UFD 3 fp
0x81c5ad8
==> Fileno(0x81c0638) rc 3 	| LIBIO 0x81c5ad8(-1) fdno -1 | UFD 3 fp 0x81c5ad8
D: Expected size:        61264 = lead(96)+sigs(268)+pad(4)+data(60896)
D:   Actual size:        61264
==>
fdRead(0x81c0638,0xbfffee20,4) rc 4 	| LIBIO 0x81c5ad8(-1) fdno -1 | UFD 3 fp
0x81c5ad8
==>
fdRead(0x81c0638,0xbffff610,16) rc 16 	| LIBIO 0x81c5ad8(-1) fdno -1 | UFD 3 fp
0x81c5ad8
==>
fdRead(0x81c0638,0x81c5cb0,10008) rc 10008 	| LIBIO 0x81c5ad8(-1) fdno -1 | UFD 3
fp 0x81c5ad8
==> Fclose(0x81c0638) 	| LIBIO 0x81c5ad8(-1) fdno -1 | UFD 3 fp 0x81c5ad8
--> fd  0x81c0638 ++ 3 Fclose at rpmio.c:2296 	| LIBIO 0x81c5ad8(-1) fdno -1 | UFD
3 fp 0x81c5ad8
==>
fdClose(0x81c0638) rc 0 	| UFD -1 fp 0x81c5ad8
--> fd  0x81c0638 -- 3 open (fdClose) at rpmio.c:366 	| UFD -1 fp 0x81c5ad8
==>
fdClose(0x81c0638) rc fffffffe 	| LIBIO 0x81c5ad8(-1) fdno -1 | UFD -1 fp (nil)
--> fd  0x81c0638 -- 2 open (fdClose) at rpmio.c:366 	| LIBIO 0x81c5ad8(-1) fdno
-1 | UFD -1 fp (nil)
--> fd  0x81c0638 -- 1 Fclose at rpmio.c:2342 	| UFD -1 fp (nil)
D: found 0 source and 2 binary packages
D: opening db index       /var/lib/rpm/Depends create mode=0x42
D: opening db index       /var/lib/rpm/Basenames create mode=0x42
D:  Requires: /bin/sh                                       YES (db files)
D:   NO     A rpmlib(PayloadFilesHavePrefix) <= 4.0-1	B rpmlib(VersionedDependencies) =
3.0.3-1
D:   NO     A rpmlib(PayloadFilesHavePrefix) <= 4.0-1	B rpmlib(CompressedFileNames) =
3.0.4-1
D:   NO     A rpmlib(PayloadFilesHavePrefix) <= 4.0-1	B rpmlib(PayloadIsBzip2) = 3.0.5-1
D:   YES    A rpmlib(PayloadFilesHavePrefix) <= 4.0-1	B rpmlib(PayloadFilesHavePrefix)
= 4.0-1
D:  Requires: rpmlib(PayloadFilesHavePrefix) <= 4.0-1       YES (rpmlib provides)
D: opening db index       /var/lib/rpm/Providename create mode=0x42
D:  Requires: ld-linux.so.2                                 YES (db provides)
D:  Requires: libc.so.6                                     YES (db provides)
D:  Requires: libc.so.6(GLIBC_2.0)                          YES (db provides)
D:   NO     A rpmlib(CompressedFileNames) <= 3.0.4-1	B rpmlib(VersionedDependencies) =
3.0.3-1
D:   YES    A rpmlib(CompressedFileNames) <= 3.0.4-1	B rpmlib(CompressedFileNames) = 3.0.4-1
D:  Requires: rpmlib(CompressedFileNames) <= 3.0.4-1        YES (rpmlib provides)
D: opening db index       /var/lib/rpm/Conflictname create mode=0x42
D:   YES    A GEF-client = 7.0.0-2	B GEF-client = 7.0.0
D:  Requires: GEF-client = 7.0.0                            YES (added provide)
D:  Requires: R /bin/sh                                     YES (cached)
D:  Requires: R rpmlib(PayloadFilesHavePrefix) <= 4.0-1     YES (cached)
D:  Requires: R rpmlib(CompressedFileNames) <= 3.0.4-1      YES (cached)
D: ========== recording tsort relations
D:   YES    A GEF-client = 7.0.0-2	B GEF-client = 7.0.0
D: ========== tsorting packages
D:     0 (1,2) GEF-client-7.0.0-2
D: ========== successors only (presentation order)
D:     1 (1,1) GEF-devel-7.0.0-2
D: installing binary packages
D: getting list of mounted filesystems
D: opening db index       /var/lib/rpm/Name create mode=0x42
D: opening db index       /var/lib/rpm/Group create mode=0x42
D: opening db index       /var/lib/rpm/Requirename create mode=0x42
D: opening db index       /var/lib/rpm/Triggername create mode=0x42
*** Fopen ufdio path GEF-client-7.0.0-2.i586.rpm fmode r.ufdio
*** ufdOpen(GEF-client-7.0.0-2.i586.rpm,0x0,0666)
--> fd  (nil) ++ -8 persist (showProgress) at rpminstall.c:89
rpm: rpmio_internal.h:338: c2f: Assertion `fd && fd->magic == 0x04463138' failed.
Comment 3 Jeff Johnson 2002-02-05 10:34:01 EST
Hmmm, looks like rpm-4.0.2 output.

The failure is happening when the package
file is reopened to perform the install,  this
is the "shouldn't happen" (because the file
was opened/closed earlier) condition.

An strace (prefix the same command with
"strace -o /tmp/xxx"), please, appended
here so I can try to tell tell exactly what
system call is failing.
Comment 4 Bruce Bigby 2002-02-07 20:58:43 EST
I ran the following command,

strace -o /tmp/rpm-strace.txt rpm -ivh -vv --rpmiodebug GEF*.rpm
2>/tmp/rpm-strace-error.txt

and here's the strace output of that command:


#################################################
*** Fopen ufdio path /usr/lib/rpm/rpmrc fmode r.fpio
*** ufdOpen(/usr/lib/rpm/rpmrc,0x0,0666)
--> fd  0x81b75d8 ++ 1 open (fdOpen) at rpmio.c:376 	| FD -1 fp (nil)
==>
fdOpen("/usr/lib/rpm/rpmrc",0,0666) 	| FD 3 fp (nil)
==> Fileno(0x81b75d8) rc 3 	| UFD 3 fp (nil)
==>
ufdOpen("/usr/lib/rpm/rpmrc",0,0666) 	| UFD 3 fp (nil)
*** Fdopen(0x81b75d8,r.fpio) 	| UFD 3 fp (nil)
==> fopencookie(0x81b75d8,"r",*0x819fc40) returns fp 0x81b76d0
--> fd  0x81b75d8 ++ 2 fopencookie at rpmio.c:2506 	| LIBIO 0x81b76d0(-1) fdno -1
| UFD 3 fp 0x81b76d0
==> Fdopen(0x81b75d8,"r.fpio") returns fd 0x81b75d8 	| LIBIO 0x81b76d0(-1) fdno -1
| UFD 3 fp 0x81b76d0
==> Ferror(0x81b75d8) rc 0 	| LIBIO 0x81b76d0(-1) fdno -1 | UFD 3 fp 0x81b76d0
==> Fileno(0x81b75d8) rc 3 	| LIBIO 0x81b76d0(-1) fdno -1 | UFD 3 fp 0x81b76d0
==> Fread(0xbfffc550,1,8907,0x81b75d8) 	| LIBIO 0x81b76d0(-1) fdno -1 | UFD 3 fp
0x81b76d0
==>
fdRead(0x81b75d8,0x4003b000,8192) rc 8192 	| LIBIO 0x81b76d0(-1) fdno -1 | UFD 3
fp 0x81b76d0
==>
fdRead(0x81b75d8,0x4003b000,8192) rc 715 	| LIBIO 0x81b76d0(-1) fdno -1 | UFD 3 fp
0x81b76d0
==>
fdRead(0x81b75d8,0x4003b2cb,7477) rc 0 	| LIBIO 0x81b76d0(-1) fdno -1 | UFD 3 fp
0x81b76d0
==> Ferror(0x81b75d8) rc 0 	| LIBIO 0x81b76d0(-1) fdno -1 | UFD 3 fp 0x81b76d0
==> Fclose(0x81b75d8) 	| LIBIO 0x81b76d0(-1) fdno -1 | UFD 3 fp 0x81b76d0
--> fd  0x81b75d8 ++ 3 Fclose at rpmio.c:2296 	| LIBIO 0x81b76d0(-1) fdno -1 | UFD
3 fp 0x81b76d0
==>
fdClose(0x81b75d8) rc 0 	| UFD -1 fp 0x81b76d0
--> fd  0x81b75d8 -- 3 open (fdClose) at rpmio.c:366 	| UFD -1 fp 0x81b76d0
==>
fdClose(0x81b75d8) rc fffffffe 	| LIBIO 0x81b76d0(-1) fdno -1 | UFD -1 fp (nil)
--> fd  0x81b75d8 -- 2 open (fdClose) at rpmio.c:366 	| LIBIO 0x81b76d0(-1) fdno
-1 | UFD -1 fp (nil)
--> fd  0x81b75d8 -- 1 Fclose at rpmio.c:2342 	| UFD -1 fp (nil)
*** Fopen ufdio path /etc/rpmrc fmode r.fpio
*** ufdOpen(/etc/rpmrc,0x0,0666)
*** Fopen ufdio path /root/.rpmrc fmode r.fpio
*** ufdOpen(/root/.rpmrc,0x0,0666)
*** Fopen ufdio path /usr/lib/rpm/macros fmode r.fpio
*** ufdOpen(/usr/lib/rpm/macros,0x0,0666)
--> fd  0x81bb7a8 ++ 1 open (fdOpen) at rpmio.c:376 	| FD -1 fp (nil)
==>
fdOpen("/usr/lib/rpm/macros",0,0666) 	| FD 3 fp (nil)
==> Fileno(0x81bb7a8) rc 3 	| UFD 3 fp (nil)
==>
ufdOpen("/usr/lib/rpm/macros",0,0666) 	| UFD 3 fp (nil)
*** Fdopen(0x81bb7a8,r.fpio) 	| UFD 3 fp (nil)
==> fopencookie(0x81bb7a8,"r",*0x819fc40) returns fp 0x81bb858
--> fd  0x81bb7a8 ++ 2 fopencookie at rpmio.c:2506 	| LIBIO 0x81bb858(-1) fdno -1
| UFD 3 fp 0x81bb858
==> Fdopen(0x81bb7a8,"r.fpio") returns fd 0x81bb7a8 	| LIBIO 0x81bb858(-1) fdno -1
| UFD 3 fp 0x81bb858
==> Ferror(0x81bb7a8) rc 0 	| LIBIO 0x81bb858(-1) fdno -1 | UFD 3 fp 0x81bb858
==>
fdRead(0x81bb7a8,0x4003b000,8192) rc 8192 	| LIBIO 0x81bb858(-1) fdno -1 | UFD 3
fp 0x81bb858
==>
fdRead(0x81bb7a8,0x4003b000,8192) rc 8192 	| LIBIO 0x81bb858(-1) fdno -1 | UFD 3
fp 0x81bb858
==>
fdRead(0x81bb7a8,0x4003b000,8192) rc 4251 	| LIBIO 0x81bb858(-1) fdno -1 | UFD 3
fp 0x81bb858
==>
fdRead(0x81bb7a8,0x4003c09b,3941) rc 0 	| LIBIO 0x81bb858(-1) fdno -1 | UFD 3 fp
0x81bb858
==>
fdRead(0x81bb7a8,0x4003b000,8192) rc 0 	| LIBIO 0x81bb858(-1) fdno -1 | UFD 3 fp
0x81bb858
==> Fclose(0x81bb7a8) 	| LIBIO 0x81bb858(-1) fdno -1 | UFD 3 fp 0x81bb858
--> fd  0x81bb7a8 ++ 3 Fclose at rpmio.c:2296 	| LIBIO 0x81bb858(-1) fdno -1 | UFD
3 fp 0x81bb858
==>
fdClose(0x81bb7a8) rc 0 	| UFD -1 fp 0x81bb858
--> fd  0x81bb7a8 -- 3 open (fdClose) at rpmio.c:366 	| UFD -1 fp 0x81bb858
==>
fdClose(0x81bb7a8) rc fffffffe 	| LIBIO 0x81bb858(-1) fdno -1 | UFD -1 fp (nil)
--> fd  0x81bb7a8 -- 2 open (fdClose) at rpmio.c:366 	| LIBIO 0x81bb858(-1) fdno
-1 | UFD -1 fp (nil)
--> fd  0x81bb7a8 -- 1 Fclose at rpmio.c:2342 	| UFD -1 fp (nil)
*** Fopen ufdio path /usr/lib/rpm/i686-linux/macros fmode r.fpio
*** ufdOpen(/usr/lib/rpm/i686-linux/macros,0x0,0666)
--> fd  0x81bb7a8 ++ 1 open (fdOpen) at rpmio.c:376 	| FD -1 fp (nil)
==>
fdOpen("/usr/lib/rpm/i686-linux/macros",0,0666) 	| FD 3 fp (nil)
==> Fileno(0x81bb7a8) rc 3 	| UFD 3 fp (nil)
==>
ufdOpen("/usr/lib/rpm/i686-linux/macros",0,0666) 	| UFD 3 fp (nil)
*** Fdopen(0x81bb7a8,r.fpio) 	| UFD 3 fp (nil)
==> fopencookie(0x81bb7a8,"r",*0x819fc40) returns fp 0x81bb858
--> fd  0x81bb7a8 ++ 2 fopencookie at rpmio.c:2506 	| LIBIO 0x81bb858(-1) fdno -1
| UFD 3 fp 0x81bb858
==> Fdopen(0x81bb7a8,"r.fpio") returns fd 0x81bb7a8 	| LIBIO 0x81bb858(-1) fdno -1
| UFD 3 fp 0x81bb858
==> Ferror(0x81bb7a8) rc 0 	| LIBIO 0x81bb858(-1) fdno -1 | UFD 3 fp 0x81bb858
==>
fdRead(0x81bb7a8,0x4003b000,8192) rc 1688 	| LIBIO 0x81bb858(-1) fdno -1 | UFD 3
fp 0x81bb858
==>
fdRead(0x81bb7a8,0x4003b698,6504) rc 0 	| LIBIO 0x81bb858(-1) fdno -1 | UFD 3 fp
0x81bb858
==>
fdRead(0x81bb7a8,0x4003b000,8192) rc 0 	| LIBIO 0x81bb858(-1) fdno -1 | UFD 3 fp
0x81bb858
==> Fclose(0x81bb7a8) 	| LIBIO 0x81bb858(-1) fdno -1 | UFD 3 fp 0x81bb858
--> fd  0x81bb7a8 ++ 3 Fclose at rpmio.c:2296 	| LIBIO 0x81bb858(-1) fdno -1 | UFD
3 fp 0x81bb858
==>
fdClose(0x81bb7a8) rc 0 	| UFD -1 fp 0x81bb858
--> fd  0x81bb7a8 -- 3 open (fdClose) at rpmio.c:366 	| UFD -1 fp 0x81bb858
==>
fdClose(0x81bb7a8) rc fffffffe 	| LIBIO 0x81bb858(-1) fdno -1 | UFD -1 fp (nil)
--> fd  0x81bb7a8 -- 2 open (fdClose) at rpmio.c:366 	| LIBIO 0x81bb858(-1) fdno
-1 | UFD -1 fp (nil)
--> fd  0x81bb7a8 -- 1 Fclose at rpmio.c:2342 	| UFD -1 fp (nil)
*** Fopen ufdio path /etc/rpm/macros.specspo fmode r.fpio
*** ufdOpen(/etc/rpm/macros.specspo,0x0,0666)
*** Fopen ufdio path /etc/rpm/macros.db1 fmode r.fpio
*** ufdOpen(/etc/rpm/macros.db1,0x0,0666)
*** Fopen ufdio path /etc/rpm/macros fmode r.fpio
*** ufdOpen(/etc/rpm/macros,0x0,0666)
*** Fopen ufdio path /etc/rpm/i686-linux/macros fmoder.fpio
*** ufdOpen(/etc/rpm/i686-linux/macros,0x0,0666)
*** Fopen ufdio path /root/.rpmmacros fmode r.fpio
*** ufdOpen(/root/.rpmmacros,0x0,0666)
D: counting packages to install
D: found 2 packages
D: looking for packages to download
D: retrieved 0 packages
*** Fopen ufdio path GEF-client-7.0.0-2.i586.rpm fmode r.ufdio
*** ufdOpen(GEF-client-7.0.0-2.i586.rpm,0x0,0666)
--> fd  0x81bb780 ++ 1 open (fdOpen) at rpmio.c:376 	| FD -1 fp (nil)
==>
fdOpen("GEF-client-7.0.0-2.i586.rpm",0,0666) 	| FD 3 fp (nil)
==> Fileno(0x81bb780) rc 3 	| UFD 3 fp (nil)
==>
ufdOpen("GEF-client-7.0.0-2.i586.rpm",0,0666) 	| UFD 3 fp (nil)
*** Fdopen(0x81bb780,r.ufdio) 	| UFD 3 fp (nil)
==> fopencookie(0x81bb780,"r",*0x819fb20) returns fp 0x81c0638
--> fd  0x81bb780 ++ 2 fopencookie at rpmio.c:2506 	| LIBIO 0x81c0638(-1) fdno -1
| UFD 3 fp 0x81c0638
==> Fdopen(0x81bb780,"r.ufdio") returns fd 0x81bb780 	| LIBIO 0x81c0638(-1) fdno
-1 | UFD 3 fp 0x81c0638
==> Ferror(0x81bb780) rc 0 	| LIBIO 0x81c0638(-1) fdno -1 | UFD 3 fp 0x81c0638
==> Fileno(0x81bb780) rc 3 	| LIBIO 0x81c0638(-1) fdno -1 | UFD 3 fp 0x81c0638
==>
fdRead(0x81bb780,0xbffff760,96) rc 96 	| LIBIO 0x81c0638(-1) fdno -1 | UFD 3 fp
0x81c0638
==>
fdRead(0x81bb780,0xbfffed40,16) rc 16 	| LIBIO 0x81c0638(-1) fdno -1 | UFD 3 fp
0x81c0638
==>
fdRead(0x81bb780,0x81c0708,252) rc 252 	| LIBIO 0x81c0638(-1) fdno -1 | UFD 3 fp
0x81c0638
==> Fileno(0x81bb780) rc 3 	| LIBIO 0x81c0638(-1) fdno -1 | UFD 3 fp 0x81c0638
D: Expected size:        42006 = lead(96)+sigs(268)+pad(4)+data(41638)
D:   Actual size:        42006
==>
fdRead(0x81bb780,0xbfffee10,4) rc 4 	| LIBIO 0x81c0638(-1) fdno -1 | UFD 3 fp
0x81c0638
==>
fdRead(0x81bb780,0xbffff600,16) rc 16 	| LIBIO 0x81c0638(-1) fdno -1 | UFD 3 fp
0x81c0638
==>
fdRead(0x81bb780,0x81c08a0,3409) rc 3409 	| LIBIO 0x81c0638(-1) fdno -1 | UFD 3 fp
0x81c0638
D: opening db index       /var/lib/rpm/Packages create mode=0x42
D: locked  db index       /var/lib/rpm/Packages
==> Fclose(0x81bb780) 	| LIBIO 0x81c0638(-1) fdno -1 | UFD 3 fp 0x81c0638
--> fd  0x81bb780 ++ 3 Fclose at rpmio.c:2296 	| LIBIO 0x81c0638(-1) fdno -1 | UFD
3 fp 0x81c0638
==>
fdClose(0x81bb780) rc 0 	| UFD -1 fp 0x81c0638
--> fd  0x81bb780 -- 3 open (fdClose) at rpmio.c:366 	| UFD -1 fp 0x81c0638
==>
fdClose(0x81bb780) rc fffffffe 	| LIBIO 0x81c0638(-1) fdno -1 | UFD -1 fp (nil)
--> fd  0x81bb780 -- 2 open (fdClose) at rpmio.c:366 	| LIBIO 0x81c0638(-1) fdno
-1 | UFD -1 fp (nil)
--> fd  0x81bb780 -- 1 Fclose at rpmio.c:2342 	| UFD -1 fp (nil)
*** Fopen ufdio path GEF-devel-7.0.0-2.i586.rpm fmode r.ufdio
*** ufdOpen(GEF-devel-7.0.0-2.i586.rpm,0x0,0666)
--> fd  0x81c0638 ++ 1 open (fdOpen) at rpmio.c:376 	| FD -1 fp (nil)
==>
fdOpen("GEF-devel-7.0.0-2.i586.rpm",0,0666) 	| FD 3 fp (nil)
==> Fileno(0x81c0638) rc 3 	| UFD 3 fp (nil)
==>
ufdOpen("GEF-devel-7.0.0-2.i586.rpm",0,0666) 	| UFD 3 fp (nil)
*** Fdopen(0x81c0638,r.ufdio) 	| UFD 3 fp (nil)
==> fopencookie(0x81c0638,"r",*0x819fb20) returns fp 0x81c5ad8
--> fd  0x81c0638 ++ 2 fopencookie at rpmio.c:2506 	| LIBIO 0x81c5ad8(-1) fdno -1
| UFD 3 fp 0x81c5ad8
==> Fdopen(0x81c0638,"r.ufdio") returns fd 0x81c0638 	| LIBIO 0x81c5ad8(-1) fdno
-1 | UFD 3 fp 0x81c5ad8
==> Ferror(0x81c0638) rc 0 	| LIBIO 0x81c5ad8(-1) fdno -1 | UFD 3 fp 0x81c5ad8
==> Fileno(0x81c0638) rc 3 	| LIBIO 0x81c5ad8(-1) fdno -1 | UFD 3 fp 0x81c5ad8
==>
fdRead(0x81c0638,0xbffff760,96) rc 96 	| LIBIO 0x81c5ad8(-1) fdno -1 | UFD 3 fp
0x81c5ad8
==>
fdRead(0x81c0638,0xbfffed40,16) rc 16 	| LIBIO 0x81c5ad8(-1) fdno -1 | UFD 3 fp
0x81c5ad8
==>
fdRead(0x81c0638,0x81c5ba8,252) rc 252 	| LIBIO 0x81c5ad8(-1) fdno -1 | UFD 3 fp
0x81c5ad8
==> Fileno(0x81c0638) rc 3 	| LIBIO 0x81c5ad8(-1) fdno -1 | UFD 3 fp 0x81c5ad8
D: Expected size:        61264 = lead(96)+sigs(268)+pad(4)+data(60896)
D:   Actual size:        61264
==>
fdRead(0x81c0638,0xbfffee10,4) rc 4 	| LIBIO 0x81c5ad8(-1) fdno -1 | UFD 3 fp
0x81c5ad8
==>
fdRead(0x81c0638,0xbffff600,16) rc 16 	| LIBIO 0x81c5ad8(-1) fdno -1 | UFD 3 fp
0x81c5ad8
==>
fdRead(0x81c0638,0x81c5cb0,10008) rc 10008 	| LIBIO 0x81c5ad8(-1) fdno -1 | UFD 3
fp 0x81c5ad8
==> Fclose(0x81c0638) 	| LIBIO 0x81c5ad8(-1) fdno -1 | UFD 3 fp 0x81c5ad8
--> fd  0x81c0638 ++ 3 Fclose at rpmio.c:2296 	| LIBIO 0x81c5ad8(-1) fdno -1 | UFD
3 fp 0x81c5ad8
==>
fdClose(0x81c0638) rc 0 	| UFD -1 fp 0x81c5ad8
--> fd  0x81c0638 -- 3 open (fdClose) at rpmio.c:366 	| UFD -1 fp 0x81c5ad8
==>
fdClose(0x81c0638) rc fffffffe 	| LIBIO 0x81c5ad8(-1) fdno -1 | UFD -1 fp (nil)
--> fd  0x81c0638 -- 2 open (fdClose) at rpmio.c:366 	| LIBIO 0x81c5ad8(-1) fdno
-1 | UFD -1 fp (nil)
--> fd  0x81c0638 -- 1 Fclose at rpmio.c:2342 	| UFD -1 fp (nil)
D: found 0 source and 2 binary packages
D: opening db index       /var/lib/rpm/Depends create mode=0x42
D: opening db index       /var/lib/rpm/Basenames create mode=0x42
D:  Requires: /bin/sh                                       YES (db files)
D:   NO     A rpmlib(PayloadFilesHavePrefix) <= 4.0-1	B rpmlib(VersionedDependencies) =
3.0.3-1
D:   NO     A rpmlib(PayloadFilesHavePrefix) <= 4.0-1	B rpmlib(CompressedFileNames) =
3.0.4-1
D:   NO     A rpmlib(PayloadFilesHavePrefix) <= 4.0-1	B rpmlib(PayloadIsBzip2) = 3.0.5-1
D:   YES    A rpmlib(PayloadFilesHavePrefix) <= 4.0-1	B rpmlib(PayloadFilesHavePrefix)
= 4.0-1
D:  Requires: rpmlib(PayloadFilesHavePrefix) <= 4.0-1       YES (rpmlib provides)
D: opening db index       /var/lib/rpm/Providename create mode=0x42
D:  Requires: ld-linux.so.2                                 YES (db provides)
D:  Requires: libc.so.6                                     YES (db provides)
D:  Requires: libc.so.6(GLIBC_2.0)                          YES (db provides)
D:   NO     A rpmlib(CompressedFileNames) <= 3.0.4-1	B rpmlib(VersionedDependencies) =
3.0.3-1
D:   YES    A rpmlib(CompressedFileNames) <= 3.0.4-1	B rpmlib(CompressedFileNames) = 3.0.4-1
D:  Requires: rpmlib(CompressedFileNames) <= 3.0.4-1        YES (rpmlib provides)
D: opening db index       /var/lib/rpm/Conflictname create mode=0x42
D:   YES    A GEF-client = 7.0.0-2	B GEF-client = 7.0.0
D:  Requires: GEF-client = 7.0.0                            YES (added provide)
D:  Requires: R /bin/sh                                     YES (cached)
D:  Requires: R rpmlib(PayloadFilesHavePrefix) <= 4.0-1     YES (cached)
D:  Requires: R rpmlib(CompressedFileNames) <= 3.0.4-1      YES (cached)
D: ========== recording tsort relations
D:   YES    A GEF-client = 7.0.0-2	B GEF-client = 7.0.0
D: ========== tsorting packages
D:     0 (1,2) GEF-client-7.0.0-2
D: ========== successors only (presentation order)
D:     1 (1,1) GEF-devel-7.0.0-2
D: installing binary packages
D: getting list of mounted filesystems
D: opening db index       /var/lib/rpm/Name create mode=0x42
D: opening db index       /var/lib/rpm/Group create mode=0x42
D: opening db index       /var/lib/rpm/Requirename create mode=0x42
D: opening db index       /var/lib/rpm/Triggername create mode=0x42
*** Fopen ufdio path GEF-client-7.0.0-2.i586.rpm fmode r.ufdio
*** ufdOpen(GEF-client-7.0.0-2.i586.rpm,0x0,0666)
--> fd  (nil) ++ -8 persist (showProgress) at rpminstall.c:89
rpm: rpmio_internal.h:338: c2f: Assertion `fd && fd->magic == 0x04463138' failed.
Comment 5 Jeff Johnson 2002-02-08 08:23:49 EST
Sorry, i need the strace output from the file /tmp/xxx, not
the output from the command.

You might also try an attachment, as bugzilla's teensy
window is just a pain ...
Comment 6 Jeff Johnson 2002-02-09 06:51:43 EST
Apologies if the strace was attached, but I sure don't see it. No matter.

Here's the failure:

...
chroot(".")                             = 0
chdir("/home/bbigby/src")               = -1 EACCES (Permission denied)
write(2, "*** Fopen ufdio path GEF-client-"..., 63) = 63
write(2, "*** ufdOpen(GEF-client-7.0.0-2.i"..., 50) = 50

What's happening is that rpm is trying to exit from a chroot(2),
and cannot return to the original directory from which rpm was invoked
(and where the package was located), almost certainly because of
NFS root-squashing.

I predict that opening the permissions (temporarily) to 777 will succeessfully
install.

There's no easy fix here, as, for better or worse, rpm *must* be
able to exit the chroot(2) and restore the initial conditions, but,
due to the NFS admin policies, once the directory is changed, cannot
return to the original working directory because, indeed, the original
current directory is unreadable by the invoking user, presumably root.

So
        Don't do that.

is the best that I can offer. Either open up the permissions on the
directory you are trying to install from, or copy as a non-root user
to local storage before attempting an install.
Comment 7 Jeff Johnson 2002-02-24 12:18:36 EST
This is WONTFIX (i.e. Don't do that) for now.

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