Bug 509360

Summary: Preupgrade F9 to F10 fails with IOError too many files open
Product: [Fedora] Fedora Reporter: Oisin C. Feeley <ofeeley>
Component: preupgradeAssignee: Seth Vidal <skvidal>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: low    
Version: 9CC: wwoods
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 715149 (view as bug list) Environment:
Last Closed: 2009-07-14 12:30:01 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:

Description Oisin C. Feeley 2009-07-02 09:09:53 EDT
Description of problem:

Fedora 9 preupgrade to Fedora 10 fails with:

Downloading 570.4MB
Available disk space for /var/cache/yum/preupgrade: 1.8GB
Upgrade requires 500.0MB
Available disk space for /usr: 1.8GB
Traceback (most recent call last):
  File "/usr/share/preupgrade/preupgrade-gtk.py", line 766, in <module>
  File "/usr/share/preupgrade/preupgrade-gtk.py", line 374, in __init__
  File "/usr/share/preupgrade/preupgrade-gtk.py", line 257, in _do_main
  File "/usr/share/preupgrade/preupgrade-gtk.py", line 539, in main_preupgrade
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 1396, in retrieveMD
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 1400, in _retrieveMD
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 1305, in <lambda>
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 1297, in _getRepoXML
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 1287, in _loadRepoXML
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 1271, in _groupLoadRepoXML
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 1117, in _commonLoadRepoXML
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 1087, in _latestRepoXML
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 948, in _saveOldRepoXML
  File "/usr/lib/python2.5/shutil.py", line 91, in copy2
  File "/usr/lib/python2.5/shutil.py", line 46, in copyfile
IOError: [Errno 24] Too many open files: '/var/cache/yum/preupgrade/repomd.xml'


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

preupgrade-1.1.0-1.fc9.noarch

How reproducible:

Every time.  Also fails with same message if I try to do a Fedora9 -> Fedora 11.

Steps to Reproduce:
1. sudo preupgrade
2. preupgrade reports that /boot has too little space for the install.img but will download it later over the wired network.  Machine is correctly connected with wired network and downloads packages

3. let preupgrade proceed without intervention
  
Actual results:

Preupgrade steps through its GUI steps and I go to bed while it happily downloads packages. Upon return in the morning the GUI has disappeared and all that's left is the backtrace above and apparently a cache full of packages which should do the trick. I've tried it twice since then with the same error.

Expected results:

painless, magical upgrade to a later version of Fedora

Additional info:

/var/cache/yum is full of needed packages:
[ush@localhost ~]$ ls /var/cache/yum/preupgrade | wc -l
2225

[ush@localhost ~]$ ls /var/cache/yum/preupgrade | egrep -v "*.rpm"
4254aba126bd4df25bc40ebf1db3427b5726626f44286fdb0bced49dfdcec70b-Fedora-11-comps.xml
cachecookie
d8d34dabbba6003a7d8742aa95d5463f8c32cf744830641a5bb016a654b28cdc-primary.sqlite
mirrorlist.txt
packages
repodata
repomd.xml
Comment 1 Oisin C. Feeley 2009-07-02 19:09:17 EDT
I'm guessing this will be closed as a WONTFIX due to EOL of Fedora 9.  Fair enough. Thought it might be of interest anyway.
Comment 2 Oisin C. Feeley 2009-07-03 07:32:41 EDT
For anyone interested a brute-force solution of this was achieved by:
1. Disabling all but the official fedora repositories
2. yum removing several large package groups including openoffice and all of KDE

Unfortunately I did these as one single action and cannot say if only one of them would suffice or if both are needed.

It was then necessary to do a grub-install to which mapped hd(0,1) to /dev/sda

After that all was successful
Comment 3 Will Woods 2009-07-05 12:35:30 EDT
Sounds like a bug in F9 yum or createrepo.. or you have waaay more packages installed than anyone else has ever tested with. Heh.

It'd help if you could use lsof to figure out what files preupgrade has open, but since you've apparently finished your upgrade that may not be so easy for you to reproduce.

So: how many packages did you have installed? 

Seth, are you aware of any bugs in F9 yum/createrepo/python that would leave files open after they've been used?
Comment 4 seth vidal 2009-07-06 10:56:14 EDT
A very old urlgrabber had some file handle leaks - but that's the last think I recall
Comment 5 Bug Zapper 2009-07-14 12:30:01 EDT
Fedora 9 changed to end-of-life (EOL) status on 2009-07-10. Fedora 9 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.