Description of problem: Update failed see attached output. Version-Release number of selected component (if applicable): How reproducible: Use the update client and try to update the only update from 10-23-07 Steps to Reproduce: 1. 2. 3. Actual results: Component: pirut Summary: TB01d293f7 struct.py:87:unpack:error: unpack requires a string argument of length 4 Traceback (most recent call last): File "/usr/sbin/pup", line 650, in <module> main() File "/usr/sbin/pup", line 646, in main pup.run() File "/usr/sbin/pup", line 470, in run self.doRefresh() File "/usr/sbin/pup", line 295, in doRefresh self.populateUpdates() File "/usr/sbin/pup", line 351, in populateUpdates self.updateMetadata.add(repo) File "/usr/lib/python2.5/site-packages/yum/update_md.py", line 253, in add for event, elem in iterparse(infile): File "<string>", line 61, in __iter__ File "/usr/lib/python2.5/gzip.py", line 227, in read self._read(readsize) File "/usr/lib/python2.5/gzip.py", line 275, in _read self._read_eof() File "/usr/lib/python2.5/gzip.py", line 308, in _read_eof crc32 = read32(self.fileobj) File "/usr/lib/python2.5/gzip.py", line 40, in read32 return struct.unpack("<l", input.read(4))[0] File "/usr/lib/python2.5/struct.py", line 87, in unpack return o.unpack(s) error: unpack requires a string argument of length 4 Local variables in innermost frame: s: fmt: <l o: <Struct object at 0xb4ea660> Expected results: Additional info:
Thank you for the report. However this has been reported to the incorrect component. Reassigning from "up2date" to "pirut". Feel free to report any further bugs you find to our bug tracking system.
We should probably fail more gracefully on bad files
you've got an ioerror catch in update_md.py for this one - do you want a more generic exception catch or just additional exceptions?
Jeremy, Can we still make this happen? I can't seem to get it to fallover on a bad file in this way anymore but I may not be trying hard enough.
Attaching a patch that catches unknown exceptions while parsing the update metadata, and throws an UpdateNoticeException. This will allow pup to fail more gracefully.
Created attachment 305194 [details] 0001-Catch-unknown-errors-when-parsing-the-update-metadat.patch
Created attachment 305195 [details] 0001-Catch-unknown-errors-when-parsing-the-update-metadat.patch Patch to catch unknown exceptions while parsing the update metadata (potentially due to corruption), spit out the traceback, and throw an UpdateNoticeException.
Seth, what do you think about this patch? I'm not quite sure of a better way that we can handle unknown updateinfo corruption, other than spitting out the traceback and masking the exception...
This message is a reminder that Fedora 7 is nearing the end of life. Approximately 30 (thirty) days from now Fedora will stop maintaining and issuing updates for Fedora 7. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '7'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 7's end of life. Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 7 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora please change the 'version' of this bug. If you are unable to change the version, please add a comment here and someone will do it for you. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. If possible, it is recommended that you try the newest available Fedora distribution to see if your bug still exists. Please read the Release Notes for the newest Fedora distribution to make sure it will meet your needs: http://docs.fedoraproject.org/release-notes/ The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Luke, the global except is just going to get us in trouble. If we could isolate the type of exceptions a bit more I'd be happier with it.
Created attachment 307226 [details] An updated patch to catch struct.error when parsing the update metadata.
Updated patch attached, which catches struct.error, and throws an UpdateNoticeException mentioning that the metadata is corrupted.
Fedora 7 changed to end-of-life (EOL) status on June 13, 2008. Fedora 7 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.