Bug 494149

Summary: python callback <bound method RPMTransaction.callback ...> failed, aborting!
Product: [Fedora] Fedora Reporter: John Reiser <jreiser>
Component: yumAssignee: Seth Vidal <skvidal>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: ffesti, james.antill, pmatilai, tim.lauridsen
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-04-13 16:31:10 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 Flags
console log
none
rpm -qa | sort
none
ls -l /var/cache/pungi/rawhide/packages none

Description John Reiser 2009-04-05 01:05:55 UTC
Created attachment 338189 [details]
console log

Description of problem:


Version-Release number of selected component (if applicable):
yum-3.2.21-16.fc11.noarch


How reproducible: haven't tried


Steps to Reproduce:
1. Fresh install Fedora 11 Beta i386 DVD
2. yum update rpm\*    ### [results:
Apr 04 16:13:19 Updated: rpm-libs-4.7.0-0.beta1.9.fc11.i586
Apr 04 16:13:21 Updated: rpm-4.7.0-0.beta1.9.fc11.i586
Apr 04 16:13:22 Updated: rpm-build-4.7.0-0.beta1.9.fc11.i586
Apr 04 16:13:22 Updated: rpm-python-4.7.0-0.beta1.9.fc11.i586
Apr 04 16:13:22 Updated: rpm-devel-4.7.0-0.beta1.9.fc11.i586
]
3. yum --nogpgcheck --skip-broken localupdate *.fc11.i?86.rpm *.fc11.noarch.rpm   ### in directory /var/cache/pungi/rawhide/packages with up-to-date cache of rawhide packages for composing DVD from rawhide of 2009-04-04
  
Actual results:
   [snip: console log will be attached]
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating       : bash                                                                                                                1/935 
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/yum/rpmtrans.py", line 366, in callback
    return self._instOpenFile( bytes, total, h )
  File "/usr/lib/python2.6/site-packages/yum/rpmtrans.py", line 411, in _instOpenFile
    fd = os.open(rpmloc, os.O_RDONLY)
OSError: [Errno 2] No such file or directory: 'freetype-2.3.9-3.fc11.i586.rpm'
error: python callback <bound method RPMTransaction.callback of <yum.rpmtrans.RPMTransaction instance at 0xe98afac>> failed, aborting!


Expected results: successful transaction


Additional info: This is documents what I saw that I believed was related to https://bugzilla.redhat.com/show_bug.cgi?id=492947#c33 ("/etc/passwd moved to /etc/passwd.rpmsave during update transaction.")

Comment 1 John Reiser 2009-04-05 01:07:36 UTC
Created attachment 338190 [details]
rpm -qa  |  sort

Packages that were installed when yum failed.

Comment 2 John Reiser 2009-04-05 01:09:33 UTC
Created attachment 338191 [details]
ls -l /var/cache/pungi/rawhide/packages

The cached packages that were available for the "yum localupdate".

Comment 3 John Reiser 2009-04-05 01:18:19 UTC
"Description of problem:" should read "Unexpected abort from yum."

Comment 4 John Reiser 2009-04-05 02:38:29 UTC
Trying to recover:
     rpm --erase bash-4.0-2.fc11.i586   ## manually remove after 4.0-5 was installed
then
     strace -f -e trace=file -o strace.out yum --nogpgcheck --skip-broken --exclude bash localupdate *.fc11.i?86.rpm *.fc11.noarch.rpm
[yum did notice that I didn't run yum-complete-transaction]
shows that freetype-2.3.9-3.fc11.i586 is the first package to be updated:
-----
   [snip]
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating       : freetype                                                                                                            1/933 
   [snip: ... Complete!]
-----

-----yum.log [snipped]
Apr 04 16:15:41 Updated: bash-4.0-5.fc11.i586
Apr 04 18:16:03 Updated: freetype-2.3.9-3.fc11.i586
Apr 04 18:16:05 Updated: pango-1.24.0-2.fc11.i586
-----
so the freetype package was there if the first yum was looking in the right place.

I'll keep the strace.out for a while, but it is big and not obviously informative:
-----
# ls -l strace.out
-rw-r--r--. 1 root root 256076920 2009-04-04 19:16 strace.out
# gzip strace.out
# ls -l strace.out.gz
-rw-r--r--. 1 root root 19219080 2009-04-04 19:16 strace.out.gz
# 
-----

SELinux was in targeted enforcing mode, and I did not see any complaints from the troubleshooter daemon.

Comment 5 James Antill 2009-04-05 05:28:15 UTC
 I think this is another example of:

https://bugzilla.redhat.com/show_bug.cgi?id=491523

...which is fixed, although will be fixed again a different way soonish. "yum update yum" should solve it, AIUI. If not please reopen.

Comment 6 John Reiser 2009-04-10 22:34:48 UTC
The problem re-appears in yum-3.2.22-4.fc11.noarch.  The only bugzilla Status choice I'm offered is ASSIGNED; I don't see REOPEN.
-----text console
[/var/cache/pungi/rawhide/packages]# yum --nogpgcheck --exclude kernel-PAE localupdate *.fc11.i?86.rpm *.fc11.noarch.rpm
   [snip]
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating       : bash                                                                                                             1/260 
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/yum/rpmtrans.py", line 366, in callback
    return self._instOpenFile( bytes, total, h )
  File "/usr/lib/python2.6/site-packages/yum/rpmtrans.py", line 411, in _instOpenFile
    fd = os.open(rpmloc, os.O_RDONLY)
OSError: [Errno 2] No such file or directory: 'openoffice.org-ure-3.1.0-9.2.fc11.i586.rpm'
-----

Relevant installed packages:
yum-3.2.22-4.fc11.noarch
yum-metadata-parser-1.1.2-12.fc11.i586
yum-utils-1.1.21-2.fc11.noarch
rpm-4.7.0-0.rc1.1.fc11.i586
rpm-build-4.7.0-0.rc1.1.fc11.i586
rpm-devel-4.7.0-0.rc1.1.fc11.i586
rpm-libs-4.7.0-0.rc1.1.fc11.i586
rpm-python-4.7.0-0.rc1.1.fc11.i586

Comment 7 John Reiser 2009-04-10 22:43:18 UTC
The localupdate succeeded later using:

# yum-complete-transaction --cleanup-only
# rpm --erase bash-4.0-5.fc11.i586   ## the only pending action that was canceled
# yum --nogpgcheck --exclude kernel-PAE --exclude bash localupdate *.fc11.i?86.rpm *.fc11.noarch.rpm

Comment 8 seth vidal 2009-04-13 16:31:10 UTC
so this is ultimately related to the case in rpm with removing duplicates.

However, the traceback shouldn't have happened and we can catch it easily enough. A good question is what happened to that pkg after you downloaded but before it was used for the transaction.

I've checked in a patch to catch this exception from attempting to open what is, apparently, a non-existing file.

http://yum.baseurl.org/gitweb?p=yum.git;a=commit;h=43f9c7a1febfd75c8cb68bdf34b3688edbc85a52

Comment 9 John Reiser 2009-04-13 18:41:49 UTC
I have asked Eric Sandeen to look at this.  The directory /var/cache/pungi/rawhide/packages is on an ext4 filesystem and contains thousands of .rpms (see attachment "ls -l".)